Finishing up widescreen patch support: Add GUI toggle and connect it.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5716 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2.code 2013-08-14 09:48:36 +00:00
parent 0f603a98d5
commit 05d5051096
8 changed files with 28 additions and 10 deletions

View File

@ -410,7 +410,7 @@ struct Pcsx2Config
CdvdDumpBlocks :1, // enables cdvd block dumping
EnablePatches :1, // enables patch detection and application
EnableCheats :1, // enables cheat detection and application
EnableWideScreenPatches :1,
// when enabled uses BOOT2 injection, skipping sony bios splashes
UseBOOT2Injection :1,
BackupSavestate :1,

View File

@ -387,6 +387,7 @@ void Pcsx2Config::LoadSave( IniInterface& ini )
IniBitBool( CdvdDumpBlocks );
IniBitBool( EnablePatches );
IniBitBool( EnableCheats );
IniBitBool( EnableWideScreenPatches );
IniBitBool( ConsoleToStdio );
IniBitBool( HostFs );

View File

@ -219,6 +219,7 @@ void SysCoreThread::VsyncInThread()
{
if (EmuConfig.EnablePatches) ApplyPatch();
if (EmuConfig.EnableCheats) ApplyCheat();
if (EmuConfig.EnableWideScreenPatches) ApplyCheat();
}
void SysCoreThread::GameStartingInThread()

View File

@ -102,6 +102,7 @@ enum MenuIdentifiers
MenuId_EnableBackupStates, // Checkbox to enable/disables savestates backup
MenuId_EnablePatches,
MenuId_EnableCheats,
MenuId_EnableWideScreenPatches,
MenuId_EnableHostFs,
MenuId_State_Load,

View File

@ -305,11 +305,14 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
wxString gamePatch;
wxString gameFixes;
wxString gameCheats;
wxString gameWsHacks;
wxString gameWsHacks;
wxString gameName;
wxString gameCompat;
int numberLoadedCheats;
int numberLoadedWideScreenPatches;
if (ElfCRC) gameCRC.Printf( L"%8.8x", ElfCRC );
if (!DiscSerial.IsEmpty()) gameSerial = L" [" + DiscSerial + L"]";
@ -352,17 +355,17 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
ResetCheatsCount();
if (EmuConfig.EnableCheats) {
if (int cheats = LoadCheats(gameCRC, PathDefs::GetCheats(), L"Cheats")) {
gameCheats.Printf(L" [%d Cheats]", cheats);
if (numberLoadedCheats = LoadCheats(gameCRC, PathDefs::GetCheats(), L"Cheats")) {
gameCheats.Printf(L" [%d Cheats]", numberLoadedCheats);
}
}
// FIXME: we should have a widescreen hacks config
if (EmuConfig.EnableCheats) {
if (int cheats = LoadCheats(gameCRC, PathDefs::GetCheatsWS(), L"Widescreen hacks")) {
gameWsHacks.Printf(L" [%d WS hacks]", cheats);
}
}
// FIXME: we should have a widescreen hacks config
if (EmuConfig.EnableWideScreenPatches) {
if (numberLoadedWideScreenPatches = LoadCheats(gameCRC, PathDefs::GetCheatsWS(), L"Widescreen hacks")) {
gameWsHacks.Printf(L" [%d WS hacks]", numberLoadedWideScreenPatches);
}
}
Console.SetTitle(gameName+gameSerial+gameCompat+gameFixes+gamePatch+gameCheats+gameWsHacks);

View File

@ -211,6 +211,7 @@ void MainEmuFrame::ConnectMenus()
ConnectMenu( MenuId_EnableBackupStates, Menu_EnableBackupStates_Click );
ConnectMenu( MenuId_EnablePatches, Menu_EnablePatches_Click );
ConnectMenu( MenuId_EnableCheats, Menu_EnableCheats_Click );
ConnectMenu( MenuId_EnableWideScreenPatches, Menu_EnableWideScreenPatches_Click );
ConnectMenu( MenuId_EnableHostFs, Menu_EnableHostFs_Click );
ConnectMenu( MenuId_Exit, Menu_Exit_Click );
@ -423,6 +424,9 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
m_menuSys.Append(MenuId_EnableCheats, _("Enable Cheats"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.Append(MenuId_EnableWideScreenPatches, _("Enable WideScreen Patches"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.Append(MenuId_EnableHostFs, _("Enable Host Filesystem"),
wxEmptyString, wxITEM_CHECK);
@ -668,6 +672,7 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags)
{//these should not be affected by presets
menubar.Check( MenuId_EnableBackupStates, configToApply.EmuOptions.BackupSavestate );
menubar.Check( MenuId_EnableCheats, configToApply.EmuOptions.EnableCheats );
menubar.Check( MenuId_EnableWideScreenPatches, configToApply.EmuOptions.EnableWideScreenPatches );
menubar.Check( MenuId_EnableHostFs, configToApply.EmuOptions.HostFs );
#ifdef __LINUX__
menubar.Check( MenuId_Console_Stdio, configToApply.EmuOptions.ConsoleToStdio );

View File

@ -178,6 +178,7 @@ protected:
void Menu_EnableBackupStates_Click(wxCommandEvent &event);
void Menu_EnablePatches_Click(wxCommandEvent &event);
void Menu_EnableCheats_Click(wxCommandEvent &event);
void Menu_EnableWideScreenPatches_Click(wxCommandEvent &event);
void Menu_EnableHostFs_Click(wxCommandEvent &event);
void Menu_BootCdvd_Click(wxCommandEvent &event);

View File

@ -436,6 +436,12 @@ void MainEmuFrame::Menu_EnableCheats_Click( wxCommandEvent& )
AppSaveSettings();
}
void MainEmuFrame::Menu_EnableWideScreenPatches_Click( wxCommandEvent& )
{
g_Conf->EmuOptions.EnableWideScreenPatches = GetMenuBar()->IsChecked( MenuId_EnableWideScreenPatches );
AppSaveSettings();
}
void MainEmuFrame::Menu_EnableHostFs_Click( wxCommandEvent& )
{
g_Conf->EmuOptions.HostFs = GetMenuBar()->IsChecked( MenuId_EnableHostFs );