From 92aa426bbacf6f62e7e9d87912c4377e5e900d84 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 6 Nov 2021 13:40:19 +1000 Subject: [PATCH] Move cheats_ws.zip to resources directory --- bin/{ => resources}/cheats_ws.zip | Bin pcsx2/gui/AppCoreThread.cpp | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) rename bin/{ => resources}/cheats_ws.zip (100%) diff --git a/bin/cheats_ws.zip b/bin/resources/cheats_ws.zip similarity index 100% rename from bin/cheats_ws.zip rename to bin/resources/cheats_ws.zip diff --git a/pcsx2/gui/AppCoreThread.cpp b/pcsx2/gui/AppCoreThread.cpp index 374afac547..1ff9ecfd1b 100644 --- a/pcsx2/gui/AppCoreThread.cpp +++ b/pcsx2/gui/AppCoreThread.cpp @@ -22,6 +22,7 @@ #include #include "fmt/core.h" +#include "common/FileSystem.h" #include "common/StringUtil.h" #include "common/Threading.h" @@ -497,10 +498,11 @@ static void _ApplySettings(const Pcsx2Config& src, Pcsx2Config& fixup) else { // No ws cheat files found at the cheats_ws folder, try the ws cheats zip file. - wxString cheats_ws_archive = Path::Combine(PathDefs::GetProgramDataDir(), wxFileName(L"cheats_ws.zip")); + const wxString cheats_ws_archive(Path::Combine(EmuFolders::Resources, wxFileName(L"cheats_ws.zip"))); if (wxFile::Exists(cheats_ws_archive)) { - int numberDbfCheatsLoaded = LoadPatchesFromZip(GameInfo::gameCRC, cheats_ws_archive, new wxFFileInputStream(cheats_ws_archive)); + wxFFileInputStream* strm = new wxFFileInputStream(cheats_ws_archive); + int numberDbfCheatsLoaded = LoadPatchesFromZip(GameInfo::gameCRC, cheats_ws_archive, strm); PatchesCon->WriteLn(Color_Green, "(Wide Screen Cheats DB) Patches Loaded: %d", numberDbfCheatsLoaded); gameWsHacks.Printf(L" [%d widescreen hacks]", numberDbfCheatsLoaded); }