From 24d4173396c3b5dd738a2f7f2e0c68bd516d55d9 Mon Sep 17 00:00:00 2001 From: Simone Coco Date: Wed, 28 Aug 2024 14:48:27 +0200 Subject: [PATCH] Windows compiles in Debug profile, issue persists in Release profile --- src/backend/Core.cpp | 2 +- src/frontend/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/Core.cpp b/src/backend/Core.cpp index 6552af13..29edbb83 100644 --- a/src/backend/Core.cpp +++ b/src/backend/Core.cpp @@ -29,7 +29,7 @@ void Core::LoadROM(const std::string &rom_) { cpu->GetMem().LoadROM(isArchive, rom); GameDB::match(cpu->GetMem()); if (cpu->GetMem().rom.gameNameDB.empty()) { - cpu->GetMem().rom.gameNameDB = fs::path(rom).stem(); + cpu->GetMem().rom.gameNameDB = fs::path(rom).stem().string(); } cpu->GetMem().mmio.vi.isPal = cpu->GetMem().IsROMPAL(); cpu->GetMem().mmio.si.pif.InitDevices(cpu->GetMem().saveType); diff --git a/src/frontend/CMakeLists.txt b/src/frontend/CMakeLists.txt index b206d04a..c853514a 100644 --- a/src/frontend/CMakeLists.txt +++ b/src/frontend/CMakeLists.txt @@ -6,6 +6,10 @@ set(CMAKE_CXX_STANDARD 17) find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) find_package(SDL2 CONFIG REQUIRED) +if(WIN32) + add_compile_definitions(NOMINMAX) +endif() + include_directories( . ../