From f852be74e8763b459f10008ba257e122ca5c2921 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 21 Aug 2020 00:26:14 +1000 Subject: [PATCH] Compile fix for Linux/libretro --- README.md | 1 + src/core/game_settings.cpp | 6 +++--- src/duckstation-libretro/libretro_host_interface.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8d3e53a6..5b78ebf41 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Other features include: - CPU Recompiler/JIT (x86-64 and AArch64) - Hardware (D3D11, OpenGL, Vulkan) and software rendering - Upscaling and true colour (24-bit) in hardware renderers + - PGXP for geometry precision and texture correction - "Fast boot" for skipping BIOS splash/intro - Save state support - Windows, Linux, **highly experimental** macOS support diff --git a/src/core/game_settings.cpp b/src/core/game_settings.cpp index 5b0aab51d..d1ec1c370 100644 --- a/src/core/game_settings.cpp +++ b/src/core/game_settings.cpp @@ -205,7 +205,7 @@ bool Database::Load(const char* path) CSimpleIniA ini; SI_Error err = ini.LoadFile(fp.get()); - if (err != S_OK) + if (err != SI_OK) { Log_ErrorPrintf("Failed to parse game settings ini: %d", static_cast(err)); return false; @@ -243,7 +243,7 @@ void Database::SetEntry(const std::string& code, const std::string& name, const if (fp) { SI_Error err = ini.LoadFile(fp.get()); - if (err != S_OK) + if (err != SI_OK) Log_ErrorPrintf("Failed to parse game settings ini: %d. Contents will be lost.", static_cast(err)); } else @@ -266,7 +266,7 @@ void Database::SetEntry(const std::string& code, const std::string& name, const std::fputs("# DuckStation Game Settings\n\n", fp.get()); SI_Error err = ini.SaveFile(fp.get()); - if (err != S_OK) + if (err != SI_OK) Log_ErrorPrintf("Failed to save game settings ini: %d", static_cast(err)); } else diff --git a/src/duckstation-libretro/libretro_host_interface.cpp b/src/duckstation-libretro/libretro_host_interface.cpp index 52292824c..52ec60a3d 100644 --- a/src/duckstation-libretro/libretro_host_interface.cpp +++ b/src/duckstation-libretro/libretro_host_interface.cpp @@ -101,7 +101,7 @@ bool LibretroHostInterface::Initialize() return false; LoadSettings(); - FixIncompatibleSettings(); + FixIncompatibleSettings(true); UpdateLogging(); return true; } @@ -632,7 +632,7 @@ void LibretroHostInterface::UpdateSettings() { Settings old_settings(std::move(g_settings)); LoadSettings(); - FixIncompatibleSettings(); + FixIncompatibleSettings(false); if (g_settings.gpu_resolution_scale != old_settings.gpu_resolution_scale && g_settings.gpu_renderer != GPURenderer::Software)