diff --git a/core/emulator.cpp b/core/emulator.cpp index ee058cf37..27beaadf9 100644 --- a/core/emulator.cpp +++ b/core/emulator.cpp @@ -151,8 +151,8 @@ static void loadSpecialSettings() INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s", prod_id.c_str()); config::ExtraDepthScale.override(1000000.f); // Mali needs 1M, 10K is enough for others } - // Re-Volt (US, EU) - else if (prod_id == "T-8109N" || prod_id == "T8107D 50") + // Re-Volt (US, EU, JP) + else if (prod_id == "T-8109N" || prod_id == "T8107D 50" || prod_id == "T-8101M") { INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s", prod_id.c_str()); config::ExtraDepthScale.override(100.f); @@ -169,12 +169,6 @@ static void loadSpecialSettings() INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s", prod_id.c_str()); config::ExtraDepthScale.override(1000.f); } - // Re-Volt (JP) - else if (prod_id == "T-8101M") - { - INFO_LOG(BOOT, "Enabling Extra depth scaling for game %s", prod_id.c_str()); - config::ExtraDepthScale.override(100.f); - } std::string areas(ip_meta.area_symbols, sizeof(ip_meta.area_symbols)); bool region_usa = areas.find('U') != std::string::npos; @@ -311,9 +305,6 @@ static void loadSpecialSettings() config::ForceFreePlay.override(false); } } - // Graphics context isn't available yet in libretro - if (GraphicsContext::Instance() != nullptr && GraphicsContext::Instance()->isAMD()) - config::NativeDepthInterpolation.override(true); } void dc_reset(bool hard) @@ -510,6 +501,7 @@ void Emulator::loadGame(const char *path, LoadProgress *progress) { // Elf only supported with HLE BIOS nvmem::loadHle(); + InitDrive(""); } } @@ -692,6 +684,10 @@ void Emulator::requestReset() void loadGameSpecificSettings() { + // Graphics context isn't available yet in libretro + if (GraphicsContext::Instance() != nullptr && GraphicsContext::Instance()->isAMD()) + config::NativeDepthInterpolation.override(true); + if (settings.platform.isConsole()) { reios_disk_id(); diff --git a/core/stdclass.cpp b/core/stdclass.cpp index c3f419482..b46215226 100644 --- a/core/stdclass.cpp +++ b/core/stdclass.cpp @@ -20,6 +20,8 @@ static std::string user_data_dir; static std::vector system_config_dirs; static std::vector system_data_dirs; +const std::string defaultWs(" \0", 2); + bool file_exists(const std::string& filename) { return (flycast::access(filename.c_str(), R_OK) == 0); diff --git a/core/stdclass.h b/core/stdclass.h index d2e83a78a..36fe655be 100644 --- a/core/stdclass.h +++ b/core/stdclass.h @@ -129,8 +129,10 @@ static inline std::string get_file_basename(const std::string& s) return s.substr(0, dot); } +extern const std::string defaultWs; + static inline std::string trim_trailing_ws(const std::string& str, - const std::string& whitespace = " ") + const std::string& whitespace = defaultWs) { const auto strEnd = str.find_last_not_of(whitespace); if (strEnd == std::string::npos) @@ -140,7 +142,7 @@ static inline std::string trim_trailing_ws(const std::string& str, } static inline std::string trim_ws(const std::string& str, - const std::string& whitespace = " ") + const std::string& whitespace = defaultWs) { const auto strStart = str.find_first_not_of(whitespace); if (strStart == std::string::npos)