- Add "Enable Cheats" menu item.

Enable Cheats means enabling support from the files in "cheats\*.pnach"
Enable Patches means enabling support for the gamefixes/patches inside the game database...


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3033 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2010-05-17 05:37:32 +00:00
parent 5597a5e575
commit 4de1b432c1
9 changed files with 20 additions and 6 deletions

View File

@ -483,6 +483,7 @@ struct Pcsx2Config
CdvdVerboseReads :1, // enables cdvd read activity verbosely dumped to the console
CdvdDumpBlocks :1, // enables cdvd block dumping
EnablePatches :1, // enables patch detection and application
EnableCheats :1, // enables cheat detection and application
// when enabled uses BOOT2 injection, skipping sony bios splashes
UseBOOT2Injection :1,

View File

@ -25,8 +25,8 @@
IniPatch Patch[ MAX_PATCH ];
IniPatch Cheat[ MAX_CHEAT ];
int patchnumber;
int cheatnumber;
int patchnumber = 0;
int cheatnumber = 0;
wxString strgametitle;

View File

@ -273,6 +273,7 @@ void Pcsx2Config::LoadSave( IniInterface& ini )
IniBitBool( CdvdVerboseReads );
IniBitBool( CdvdDumpBlocks );
IniBitBool( EnablePatches );
IniBitBool( EnableCheats );
IniBitBool( ConsoleToStdio );
IniBitBool( McdEnableEjection );

View File

@ -600,8 +600,7 @@ void __fastcall eeGameStarting()
loadGameSettings(GameDB);
}
// ToDo: EmuConfig.EnableCheats option...
if (EmuConfig.EnablePatches) {
if (EmuConfig.EnableCheats) {
int cheats = InitCheats(gameCRC);
if (cheats) {
wxString cString( wxsFormat( L"%d", cheats ) );

View File

@ -199,7 +199,7 @@ void SysCoreThread::VsyncInThread()
{
PostVsyncToUI();
if (EmuConfig.EnablePatches) ApplyPatch();
if (EmuConfig.EnablePatches) ApplyCheat(); // ToDo: EnableCheats Option...
if (EmuConfig.EnableCheats) ApplyCheat();
}
void SysCoreThread::StateCheckInThread()

View File

@ -96,6 +96,7 @@ enum MenuIdentifiers
MenuId_Sys_LoadStates, // Opens load states submenu
MenuId_Sys_SaveStates, // Opens save states submenu
MenuId_EnablePatches,
MenuId_EnableCheats,
MenuId_State_Load,
MenuId_State_LoadOther,

View File

@ -170,6 +170,7 @@ void MainEmuFrame::ConnectMenus()
ConnectMenu( MenuId_Boot_ELF, Menu_OpenELF_Click );
ConnectMenu( MenuId_IsoBrowse, Menu_IsoBrowse_Click );
ConnectMenu( MenuId_EnablePatches, Menu_EnablePatches_Click );
ConnectMenu( MenuId_EnableCheats, Menu_EnableCheats_Click );
ConnectMenu( MenuId_Exit, Menu_Exit_Click );
ConnectMenu( MenuId_Sys_SuspendResume, Menu_SuspendResume_Click );
@ -379,6 +380,9 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
m_menuSys.Append(MenuId_EnablePatches, _("Enable Patches"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.Append(MenuId_EnableCheats, _("Enable Cheats"),
wxEmptyString, wxITEM_CHECK);
m_menuSys.AppendSeparator();
m_menuSys.Append(MenuId_Sys_Shutdown, _("Shutdown"),
@ -602,7 +606,8 @@ void MainEmuFrame::ApplySettings()
wxMenuBar& menubar( *GetMenuBar() );
menubar.Check( MenuId_EnablePatches, g_Conf->EmuOptions.EnablePatches );
menubar.Check( MenuId_CDVD_Info, g_Conf->EmuOptions.CdvdVerboseReads );
menubar.Check( MenuId_EnableCheats, g_Conf->EmuOptions.EnableCheats );
menubar.Check( MenuId_CDVD_Info, g_Conf->EmuOptions.CdvdVerboseReads );
#ifdef __LINUX__
menubar.Check( MenuId_Console_Stdio, g_Conf->EmuOptions.ConsoleToStdio );
#endif

View File

@ -169,6 +169,7 @@ protected:
void Menu_IsoBrowse_Click(wxCommandEvent &event);
void Menu_EnablePatches_Click(wxCommandEvent &event);
void Menu_EnableCheats_Click(wxCommandEvent &event);
void Menu_BootCdvd_Click(wxCommandEvent &event);
void Menu_BootCdvd2_Click(wxCommandEvent &event);

View File

@ -360,6 +360,12 @@ void MainEmuFrame::Menu_EnablePatches_Click( wxCommandEvent& )
SaveEmuOptions();
}
void MainEmuFrame::Menu_EnableCheats_Click( wxCommandEvent& )
{
g_Conf->EmuOptions.EnableCheats = GetMenuBar()->IsChecked( MenuId_EnableCheats );
SaveEmuOptions();
}
void MainEmuFrame::Menu_OpenELF_Click(wxCommandEvent&)
{
ScopedCoreThreadClose stopped_core;