mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-03 20:24:14 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e7cc91d8c | |||
| 8b5a50da8f | |||
| 5c9e4f8e47 | |||
| c9ea4e3b8e | |||
| 2dee66d57a | |||
| 6242de7b25 | |||
| f272382cd1 | |||
| 6a22e57fe8 | |||
| d2198dbb67 | |||
| b66d9b707f | |||
| 65d3d76cfe | |||
| a2f9626051 | |||
| b85eda152c | |||
| 4d4e975a90 |
@@ -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
@@ -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()
|
||||
|
||||
|
||||
@@ -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
@@ -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()
|
||||
|
||||
@@ -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.
|
||||
|
||||
Vendored
+5
@@ -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)
|
||||
|
||||
Vendored
+5
-1
@@ -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)
|
||||
|
||||
|
||||
Vendored
+12
-1
@@ -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
|
||||
)
|
||||
|
||||
Vendored
+35
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <fmt/base.h>
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "Core/DSP/DSPTables.h"
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user