Compare commits

...

14 Commits

Author SHA1 Message Date
OatmealDome 5e7cc91d8c ScmRevGen: Bump version to 2603a 2026-03-17 18:05:04 -04:00
JosJuice 8b5a50da8f RetroAchievements: Block loading discs that don't match current title 2026-03-17 17:57:25 -04:00
Dentomologist 5c9e4f8e47 FifoPlayer: Fix hang when taking screenshot during FIFO log playback
Don't copy null terminators from the log's `header.gameid` into
`FifoDataFile`'s `m_game_id`.

Doing so would cause an infinite loop in `Core::GenerateScreenshotName`
as the various concatenations and `fmt::format` calls would then
effectively drop all the timestamps and disambiguating arbitrary numbers
since they followed the null terminator in the gameid, and so the
`File::Exists` calls would always return true.

Fixes https://bugs.dolphin-emu.org/issues/14002.
2026-03-17 17:30:23 -04:00
OatmealDome c9ea4e3b8e GeneralWidget: Add protections against invalid values in BackendWarning() 2026-03-17 17:30:12 -04:00
OatmealDome 2dee66d57a cURL: Disable Brotli 2026-03-17 17:30:01 -04:00
Craig Carnell 6242de7b25 fmt: change use of fmt/base.h to fmt/format.h as not provided until fmt>=11.0 2026-03-17 17:29:46 -04:00
Joshua Vandaële f272382cd1 SDL: Use bundled LibUSB when desirable
Previously, SDL would `find_package(libusb)` which would actually overwrite the user preference in the case where both USE_SYSTEM_LIBUSB and USE_SYSTEM_SDL were OFF. This coincidentally also allows SDL to use libusb on Windows.
2026-03-17 17:29:22 -04:00
Joshua Vandaële 6a22e57fe8 LibUSB: Improve library detection
Our FindLibUSB.cmake was previously entirely unused unless SDL was being built from Externals, we now rely on it again. It will use PkgConfig if applicable or fall back to looking around on the system, and more importantly it will always create an imported target.
2026-03-17 17:29:18 -04:00
Joshua Vandaële d2198dbb67 cURL: Actually disable ZLIB/ZSTD
cURL tries to find ZSTD anyways due to the lack of setting it in CACHE, and for both ZLIB and ZSTD if we had done find_package previously, cURL would still use ZLIB/ZSTD regardless of the set variable.
2026-03-17 17:29:14 -04:00
Joshua Vandaële b66d9b707f minizip-ng: Properly use libraries from Externals
This also fixes the CMake build on Windows, since it would fail to find our target defined in Externals and would fall back to trying to redefine it, which produces an error.
2026-03-17 17:29:09 -04:00
Joshua Vandaële 65d3d76cfe CMake: Error out when switching sources for dependencies
Currently, configuring from System>Bundled doesn't work, it instead produces cryptic errors. And configuring from Bundled>System wont produce errors, but wont use the system libraries either. This change produces a clear error in both cases.
2026-03-17 17:29:05 -04:00
JosJuice a2f9626051 Disable page table fastmem for TimeSplitters: Future Perfect
TimeSplitters: Future Perfect is crashing if page table fastmem is
enabled. The reason hasn't been analyzed yet. For the time being, let's
use GameSettings to bring back the old behavior of not having page table
fastmem.

Fixes https://bugs.dolphin-emu.org/issues/14000.
2026-03-17 17:28:28 -04:00
JosJuice b85eda152c Core: Add INI-only setting for page table fastmem 2026-03-17 17:28:24 -04:00
JosJuice 4d4e975a90 Move achievements code out of DVDInterface::SetDisc
This should stop AchievementManager::LoadGame from being called for the
default ISO when CBoot::BootUp is booting something other than a disc or
IPL (most notably, the Wii Menu), while still detecting all disc changes
that happen while a disc game is running.
2026-03-17 17:28:07 -04:00
21 changed files with 168 additions and 54 deletions
+15 -4
View File
@@ -50,6 +50,17 @@ function(dolphin_add_bundled_library library use_system bundled_path)
add_subdirectory(${bundled_path} EXCLUDE_FROM_ALL)
endfunction()
function(dolphin_set_library_type library type)
if(DEFINED ${library}_TYPE AND NOT ${${library}_TYPE} STREQUAL "${type}")
message(FATAL_ERROR
"The selection for ${library} changed from '${${library}_TYPE}' to '${type}' after configuration.\n"
"Please delete the build directory (or at least CMakeCache.txt) and reconfigure."
)
endif()
set(${library}_TYPE "${type}" CACHE INTERNAL "")
endfunction()
function(dolphin_find_optional_system_library library bundled_path)
dolphin_optional_system_library(use_system ${library})
string(TOUPPER ${library} upperlib)
@@ -101,11 +112,11 @@ function(dolphin_find_optional_system_library library bundled_path)
endif()
endif()
if(${prefix}_FOUND)
dolphin_set_library_type(${library} "System")
message(STATUS "Using system ${library}")
set(${prefix}_TYPE "System" PARENT_SCOPE)
else()
dolphin_set_library_type(${library} "Bundled")
dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
set(${prefix}_TYPE "Bundled" PARENT_SCOPE)
endif()
endfunction()
@@ -119,11 +130,11 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
endif()
endif()
if(${library}_FOUND)
dolphin_set_library_type(${library} "System")
message(STATUS "Using system ${library}")
dolphin_alias_library(${alias} PkgConfig::${library})
set(${library}_TYPE "System" PARENT_SCOPE)
else()
dolphin_set_library_type(${library} "Bundled")
dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
set(${library}_TYPE "Bundled" PARENT_SCOPE)
endif()
endfunction()
+18 -13
View File
@@ -11,8 +11,15 @@
if(ANDROID)
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "libusb-1.0 not found.")
elseif (NOT LIBUSB_FOUND)
pkg_check_modules (LIBUSB_PKG libusb-1.0)
return()
endif()
if(TARGET LibUSB::LibUSB)
return()
endif()
if(NOT LIBUSB_FOUND)
pkg_check_modules(LIBUSB_PKG libusb-1.0)
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h
PATHS
@@ -30,21 +37,19 @@ elseif (NOT LIBUSB_FOUND)
/usr/local/lib
)
if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}")
else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "libusb-1.0 not found.")
endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
endif ()
if(LIBUSB_FOUND AND NOT TARGET LibUSB::LibUSB)
endif()
if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
add_library(LibUSB::LibUSB UNKNOWN IMPORTED)
set_target_properties(LibUSB::LibUSB PROPERTIES
IMPORTED_LOCATION "${LIBUSB_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBUSB_INCLUDE_DIR}"
)
set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}")
else()
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "libusb-1.0 not found.")
endif()
+1 -1
View File
@@ -34,7 +34,7 @@ string(TIMESTAMP DOLPHIN_WC_BUILD_DATE "%Y-%m-%d" UTC)
# version number
set(DOLPHIN_VERSION_MAJOR "2603")
set(DOLPHIN_VERSION_MINOR "0")
set(DOLPHIN_VERSION_MINOR "1")
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
# If Dolphin is not built from a Git repository, default the version info to
+12 -16
View File
@@ -582,10 +582,6 @@ if(UNIX)
add_definitions(-DUSE_MEMORYWATCHER=1)
endif()
if(ENABLE_SDL)
dolphin_find_optional_system_library(SDL3 Externals/SDL 3.2.0)
endif()
if(ENABLE_ANALYTICS)
message(STATUS "Enabling analytics collection (subject to end-user opt-in)")
add_definitions(-DUSE_ANALYTICS=1)
@@ -658,6 +654,13 @@ if(NOT (WIN32 AND _M_ARM_64))
add_definitions(-DHAS_OPENGL)
endif()
if(NOT WIN32)
if(ANDROID)
set(USE_SYSTEM_Iconv OFF)
endif()
dolphin_find_optional_system_library(Iconv Externals/libiconv 1.14)
endif()
dolphin_find_optional_system_library(pugixml Externals/pugixml)
dolphin_find_optional_system_library_pkgconfig(ENET libenet>=1.3.18 enet::enet Externals/enet)
@@ -701,12 +704,14 @@ if(ENABLE_CUBEB)
endif()
if(NOT ANDROID)
dolphin_find_optional_system_library_pkgconfig(
LibUSB libusb-1.0 LibUSB::LibUSB Externals/libusb
)
dolphin_find_optional_system_library(LibUSB Externals/libusb)
add_definitions(-D__LIBUSB__)
endif()
if(ENABLE_SDL)
dolphin_find_optional_system_library(SDL3 Externals/SDL 3.2.0)
endif()
dolphin_find_optional_system_library(SFML Externals/SFML 3.0 COMPONENTS Network System)
if(USE_UPNP)
@@ -718,15 +723,6 @@ dolphin_find_optional_system_library(MBEDTLS Externals/mbedtls 2.28)
dolphin_find_optional_system_library(CURL Externals/curl)
if(NOT WIN32)
if(NOT ANDROID)
dolphin_find_optional_system_library(Iconv Externals/libiconv 1.14)
else()
message(STATUS "Using static iconv from Externals")
add_subdirectory(Externals/libiconv EXCLUDE_FROM_ALL)
endif()
endif()
if(NOT ANDROID)
dolphin_find_optional_system_library(HIDAPI Externals/hidapi)
endif()
+2
View File
@@ -3,6 +3,8 @@
[Core]
# Values set here will override the main Dolphin settings.
MMU = True
# Fixes freeze on second loading screen
PageTableFastmem = False
[OnFrame]
# Add memory patches to be applied every frame here.
+5
View File
@@ -20,6 +20,11 @@ if(CCACHE_BIN)
set(CCACHE_BINARY ${CCACHE_BIN})
endif()
if(LibUSB_TYPE STREQUAL Bundled)
set(LibUSB_FOUND TRUE)
set(SDL_HIDAPI_LIBUSB_SHARED OFF)
endif()
add_subdirectory(SDL)
if (TARGET SDL3)
+5 -1
View File
@@ -13,7 +13,11 @@ set(HTTP_ONLY ON)
set(CURL_USE_LIBPSL OFF)
set(CURL_USE_LIBSSH2 OFF)
set(CURL_ZLIB OFF CACHE BOOL "" FORCE)
set(CURL_ZSTD OFF)
set(CURL_ZSTD OFF CACHE BOOL "" FORCE)
set(CURL_BROTLI OFF CACHE BOOL "" FORCE)
set(ZLIB_FOUND FALSE) # TODO: Remove once we update to cURL >=8.17.1 https://github.com/curl/curl/pull/20147
set(ZSTD_FOUND FALSE) # TODO: Same as above
set(BROTLI_FOUND FALSE) # TODO: Same as above
set(USE_LIBIDN2 OFF)
set(USE_NGHTTP2 OFF)
+12 -1
View File
@@ -125,4 +125,15 @@ check_include_files(sys/timerfd.h HAVE_TIMERFD)
check_include_files(unistd.h HAVE_UNISTD_H)
configure_file(config.h.in config.h)
add_library(LibUSB::LibUSB ALIAS usb)
# We don't create an ALIAS here so that dependencies (SDL) that try_compile libusb
# don't fail due to LibUSB::LibUSB being an alias target
add_library(LibUSB::LibUSB INTERFACE IMPORTED GLOBAL)
target_link_libraries(LibUSB::LibUSB
INTERFACE
usb
)
target_include_directories(LibUSB::LibUSB
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/libusb/libusb
)
+35
View File
@@ -3,7 +3,42 @@ set(MZ_BUILD_TESTS OFF)
set(MZ_BUILD_UNIT_TESTS OFF)
set(MZ_BUILD_FUZZ_TESTS OFF)
set(MZ_CODE_COVERAGE OFF)
set(MZ_FETCH_LIBS OFF)
set(MZ_BZIP2 OFF)
set(MZ_PKCRYPT OFF)
set(MZ_WZAES OFF)
set(MZ_OPENSSL OFF)
set(MZ_LIBBSD OFF)
set(SKIP_INSTALL_ALL ON)
if(Iconv_TYPE STREQUAL Bundled)
set(CMAKE_DISABLE_FIND_PACKAGE_Iconv TRUE)
set(Iconv_FOUND TRUE)
set(Iconv_LIBRARIES Iconv::Iconv)
get_target_property(Iconv_INCLUDE_DIRS ${Iconv_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(LibLZMA_TYPE STREQUAL Bundled)
set(CMAKE_DISABLE_FIND_PACKAGE_LibLZMA TRUE)
set(LIBLZMA_FOUND TRUE)
set(LIBLZMA_LIBRARIES LibLZMA::LibLZMA)
get_target_property(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(ZLIB_TYPE STREQUAL Bundled)
set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB TRUE)
set(ZLIB_FOUND TRUE)
set(ZLIB_LIBRARIES ZLIB::ZLIB)
get_target_property(ZLIB_INCLUDE_DIRS ${ZLIB_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(ZSTD_TYPE STREQUAL Bundled)
set(CMAKE_DISABLE_FIND_PACKAGE_ZSTD TRUE)
set(ZSTD_FOUND TRUE)
set(ZSTD_LIBRARIES zstd::zstd)
get_target_property(ZSTD_INCLUDE_DIRS ${ZSTD_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
endif()
# minizip-ng otherwise uses system libraries when we provide them above
set(CMAKE_DISABLE_FIND_PACKAGE_PkgConfig TRUE)
set(PKGCONFIG_FOUND FALSE)
add_subdirectory(minizip-ng)
dolphin_disable_warnings(minizip-ng)
+1 -1
View File
@@ -14,7 +14,7 @@
#include <unordered_map>
#include <vector>
#include <fmt/base.h>
#include <fmt/format.h>
#ifdef HAVE_LIBSYSTEMD
#include <systemd/sd-daemon.h>
+20
View File
@@ -26,6 +26,7 @@
#include "Core/Config/FreeLookSettings.h"
#include "Core/Config/MainSettings.h"
#include "Core/ConfigLoaders/GameConfigLoader.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/GeckoCode.h"
#include "Core/HW/Memmap.h"
@@ -215,6 +216,25 @@ void AchievementManager::LoadGame(const DiscIO::Volume* volume)
}
}
void AchievementManager::ChangeDisc(const DiscIO::Volume* volume)
{
if (volume == nullptr)
{
INFO_LOG_FMT(ACHIEVEMENTS, "Ejecting disc.");
LoadGame(nullptr);
}
else if (volume->GetGameID() != SConfig::GetInstance().GetGameID())
{
INFO_LOG_FMT(ACHIEVEMENTS, "Inserting disc that doesn't belong to the running game.");
LoadGame(nullptr);
}
else
{
INFO_LOG_FMT(ACHIEVEMENTS, "Inserting disc.");
LoadGame(volume);
}
}
bool AchievementManager::IsGameLoaded() const
{
auto* game_info = rc_client_get_game_info(m_client);
+3
View File
@@ -121,6 +121,7 @@ public:
void Login(const std::string& password);
bool HasAPIToken() const;
void LoadGame(const DiscIO::Volume* volume);
void ChangeDisc(const DiscIO::Volume* volume);
bool IsGameLoaded() const;
void SetBackgroundExecutionAllowed(bool allowed);
@@ -333,6 +334,8 @@ public:
constexpr void LoadGame(const DiscIO::Volume*) {}
constexpr void ChangeDisc(const DiscIO::Volume*) {}
constexpr void SetBackgroundExecutionAllowed(bool allowed) {}
constexpr void DoFrame() {}
+7 -6
View File
@@ -524,6 +524,7 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard,
NOTICE_LOG_FMT(BOOT, "Booting from disc: {}", disc.path);
const DiscIO::VolumeDisc* volume =
SetDisc(system.GetDVDInterface(), std::move(disc.volume), disc.auto_disc_change_paths);
AchievementManager::GetInstance().LoadGame(volume);
if (!volume)
return false;
@@ -642,17 +643,17 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard,
if (!Load_BS2(system, ipl.path))
return false;
const DiscIO::VolumeDisc* volume = nullptr;
if (ipl.disc)
{
NOTICE_LOG_FMT(BOOT, "Inserting disc: {}", ipl.disc->path);
SetDisc(system.GetDVDInterface(), DiscIO::CreateDiscForCore(ipl.disc->path),
ipl.disc->auto_disc_change_paths);
}
else
{
AchievementManager::GetInstance().LoadGame(nullptr);
volume = SetDisc(system.GetDVDInterface(), DiscIO::CreateDiscForCore(ipl.disc->path),
ipl.disc->auto_disc_change_paths);
}
AchievementManager::GetInstance().LoadGame(volume);
SConfig::OnTitleDirectlyBooted(guard);
return true;
}
+1
View File
@@ -44,6 +44,7 @@ const Info<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
PowerPC::DefaultCPUCore()};
const Info<bool> MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true};
const Info<bool> MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true};
const Info<bool> MAIN_PAGE_TABLE_FASTMEM{{System::Main, "Core", "PageTableFastmem"}, true};
const Info<bool> MAIN_FASTMEM_ARENA{{System::Main, "Core", "FastmemArena"}, true};
const Info<bool> MAIN_LARGE_ENTRY_POINTS_MAP{{System::Main, "Core", "LargeEntryPointsMap"}, true};
const Info<bool> MAIN_ACCURATE_CPU_CACHE{{System::Main, "Core", "AccurateCPUCache"}, false};
+1
View File
@@ -57,6 +57,7 @@ extern const Info<bool> MAIN_SKIP_IPL;
extern const Info<PowerPC::CPUCore> MAIN_CPU_CORE;
extern const Info<bool> MAIN_JIT_FOLLOW_BRANCH;
extern const Info<bool> MAIN_FASTMEM;
extern const Info<bool> MAIN_PAGE_TABLE_FASTMEM;
extern const Info<bool> MAIN_FASTMEM_ARENA;
extern const Info<bool> MAIN_LARGE_ENTRY_POINTS_MAP;
extern const Info<bool> MAIN_ACCURATE_CPU_CACHE;
+1 -1
View File
@@ -7,7 +7,7 @@
#include <string>
#include <vector>
#include <fmt/base.h>
#include <fmt/format.h>
#include "Core/DSP/DSPTables.h"
+2 -1
View File
@@ -274,7 +274,8 @@ std::unique_ptr<FifoDataFile> FifoDataFile::Load(const std::string& filename, bo
}
else
{
dataFile->m_game_id = std::string{header.gameid, DEFAULT_GAME_ID.size()};
const size_t gameid_length = strnlen(header.gameid, DEFAULT_GAME_ID.size());
dataFile->m_game_id = std::string{header.gameid, gameid_length};
}
if (flagsOnly)
+6 -2
View File
@@ -420,8 +420,6 @@ void DVDInterface::SetDisc(std::unique_ptr<DiscIO::VolumeDisc> disc,
m_auto_disc_change_index = 0;
}
AchievementManager::GetInstance().LoadGame(disc.get());
// Assume that inserting a disc requires having an empty disc before
if (had_disc != has_disc)
ExpansionInterface::g_rtc_flags[ExpansionInterface::RTCFlag::DiscChanged] = true;
@@ -444,6 +442,7 @@ void DVDInterface::AutoChangeDiscCallback(Core::System& system, u64 userdata, s6
void DVDInterface::EjectDiscCallback(Core::System& system, u64 userdata, s64 cyclesLate)
{
AchievementManager::GetInstance().ChangeDisc(nullptr);
system.GetDVDInterface().SetDisc(nullptr, {});
}
@@ -454,9 +453,14 @@ void DVDInterface::InsertDiscCallback(Core::System& system, u64 userdata, s64 cy
DiscIO::CreateDiscForCore(di.m_disc_path_to_insert);
if (new_disc)
{
AchievementManager::GetInstance().ChangeDisc(new_disc.get());
di.SetDisc(std::move(new_disc), {});
}
else
{
PanicAlertFmtT("The disc that was about to be inserted couldn't be found.");
}
di.m_disc_path_to_insert.clear();
}
@@ -58,7 +58,7 @@
// After resetting the stack to the top, we call _resetstkoflw() to restore
// the guard page at the 256kb mark.
const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JitBase::JIT_SETTINGS{{
const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 25> JitBase::JIT_SETTINGS{{
{&JitBase::bJITOff, &Config::MAIN_DEBUG_JIT_OFF},
{&JitBase::bJITLoadStoreOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF},
{&JitBase::bJITLoadStorelXzOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF},
@@ -82,6 +82,7 @@ const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JitB
{&JitBase::m_accurate_nans, &Config::MAIN_ACCURATE_NANS},
{&JitBase::m_accurate_fmadds, &Config::MAIN_ACCURATE_FMADDS},
{&JitBase::m_fastmem_enabled, &Config::MAIN_FASTMEM},
{&JitBase::m_page_table_fastmem_enabled, &Config::MAIN_PAGE_TABLE_FASTMEM},
{&JitBase::m_accurate_cpu_cache_enabled, &Config::MAIN_ACCURATE_CPU_CACHE},
}};
@@ -145,9 +146,9 @@ void JitBase::RefreshConfig()
jo.fp_exceptions = m_enable_float_exceptions;
jo.div_by_zero_exceptions = m_enable_div_by_zero_exceptions;
if (!wanted_page_table_mappings && WantsPageTableMappings())
if (wanted_page_table_mappings != WantsPageTableMappings())
{
// Mustn't call this if we're still initializing
// Mustn't call this if we're still initializing - it'll cause a crash
if (Core::IsRunning(m_system))
m_system.GetMMU().PageTableUpdated();
}
@@ -155,7 +156,7 @@ void JitBase::RefreshConfig()
bool JitBase::WantsPageTableMappings() const
{
return jo.fastmem;
return jo.fastmem && m_page_table_fastmem_enabled;
}
void JitBase::InitFastmemArena()
+2 -1
View File
@@ -161,13 +161,14 @@ protected:
bool m_accurate_nans = false;
bool m_accurate_fmadds = false;
bool m_fastmem_enabled = false;
bool m_page_table_fastmem_enabled = false;
bool m_accurate_cpu_cache_enabled = false;
bool m_enable_blr_optimization = false;
bool m_cleanup_after_stackfault = false;
u8* m_stack_guard = nullptr;
static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JIT_SETTINGS;
static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 25> JIT_SETTINGS;
bool DoesConfigNeedRefresh() const;
void RefreshConfig();
@@ -173,8 +173,20 @@ void GeneralWidget::BackendWarning()
{
if (Config::GetActiveLayerForConfig(Config::MAIN_GFX_BACKEND) == Config::LayerType::Base)
{
auto warningMessage = VideoBackendBase::GetAvailableBackends()[m_backend_combo->currentIndex()]
->GetWarningMessage();
const auto& backends = VideoBackendBase::GetAvailableBackends();
if (backends.empty())
{
return;
}
const int current_idx = m_backend_combo->currentIndex();
if (current_idx == -1)
{
// Don't attempt to get the current backend if it doesn't match any available backends.
return;
}
auto warningMessage = backends[current_idx]->GetWarningMessage();
if (warningMessage)
{
ModalMessageBox confirm_sw(this);