Skip to content

Commit

Permalink
Fix dead strings being given to the Wi-fi adapters settings
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTG committed Aug 15, 2024
1 parent 981991d commit 173db98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libretro/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,11 +897,13 @@ bool MelonDsDs::RegisterCoreOptions() noexcept {

#ifdef HAVE_NETWORKING_DIRECT_MODE
// holds on to strings used in dynamic options until we finish submitting the options to the frontend
// DO NOT move this into a deeper scope, or else the strings that the options point to will be destroyed
// ReSharper disable once CppTooWideScope
vector<AdapterOption> adapters;
if (std::optional<LibPCap> pcap = LibPCap::New(); pcap) {
ZoneScopedN("MelonDsDs::config::set_core_options::init_adapter_options");
// If we successfully initialized PCap and got some adapters...
vector<AdapterData> availableAdapters = pcap->GetAdapters();
vector<AdapterOption> adapters;
retro_core_option_v2_definition* wifiAdapterOption = find_if(definitions.begin(), definitions.end(), [](const auto& def) {
return string_is_equal(def.key, MelonDsDs::config::network::DIRECT_NETWORK_INTERFACE);
});
Expand Down

0 comments on commit 173db98

Please sign in to comment.