Move cheats_ws.zip to resources directory

This commit is contained in:
Connor McLaughlin 2021-11-06 13:40:19 +10:00 committed by refractionpcsx2
parent 96a1ce2fb2
commit 92aa426bba
2 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,7 @@
#include <wx/wfstream.h>
#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);
}