diff --git a/common/src/Utilities/wxHelpers.cpp b/common/src/Utilities/wxHelpers.cpp index 33d06f4f03..3b50e52584 100644 --- a/common/src/Utilities/wxHelpers.cpp +++ b/common/src/Utilities/wxHelpers.cpp @@ -189,7 +189,7 @@ void wxDialogWithHelpers::DoAutoCenter() { const wxSize parentSize( parent->GetSize() ); - if( (parentSize.x > ((int)GetSize().x * 1.75)) && (parentSize.y > ((int)GetSize().y * 1.75)) ) + if( (parentSize.x > ((int)GetSize().x * 1.5)) || (parentSize.y > ((int)GetSize().y * 1.5)) ) { CenterOnParent(); centerfail = false; diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 5923db56fc..c6d8f4e60c 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -314,6 +314,7 @@ set(pcsx2GuiSources gui/Dialogs/ConfirmationDialogs.cpp gui/Dialogs/CreateMemoryCardDialog.cpp gui/Dialogs/FirstTimeWizard.cpp + gui/Dialogs/GameDatabaseDialog.cpp gui/Dialogs/ImportSettingsDialog.cpp gui/Dialogs/LogOptionsDialog.cpp gui/Dialogs/McdConfigDialog.cpp diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 0433f5f666..5c623e67c4 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -381,6 +381,7 @@ + diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index a5622f6a51..280a40fa2c 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -323,6 +323,12 @@ public: { return DisableSpeedhacks || ApplyCustomGamefixes; } + + void RemoveCustomHacks() + { + DisableSpeedhacks = false; + ApplyCustomGamefixes = false; + } bool HasSettingsOverride() const { @@ -690,9 +696,6 @@ extern __aligned16 AppCoreThread CoreThread; extern __aligned16 SysMtgsThread mtgsThread; extern __aligned16 AppPluginManager CorePlugins; -extern wxString AddAppName( const wxChar* fmt ); -extern wxString AddAppName( const char* fmt ); - extern void UI_UpdateSysControls(); extern void UI_DisableStateActions(); diff --git a/pcsx2/gui/AppCommon.h b/pcsx2/gui/AppCommon.h index f5c667d9a9..082fb56a86 100644 --- a/pcsx2/gui/AppCommon.h +++ b/pcsx2/gui/AppCommon.h @@ -27,4 +27,7 @@ #include "AppForwardDefs.h" #include "AppConfig.h" -#include "AppEventListeners.h" \ No newline at end of file +#include "AppEventListeners.h" + +extern wxString AddAppName( const wxChar* fmt ); +extern wxString AddAppName( const char* fmt ); diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index 24abd9bd0e..6c994833fa 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -353,8 +353,9 @@ wxString AppConfig::FullpathToMcd( uint slot ) const AppConfig::AppConfig() : MainGuiPosition( wxDefaultPosition ) , SysSettingsTabName( L"Cpu" ) - , McdSettingsTabName( L"Standard" ) + , McdSettingsTabName( L"none" ) , AppSettingsTabName( L"Plugins" ) + , GameDatabaseTabName( L"none" ) , DeskTheme( L"default" ) { LanguageId = wxLANGUAGE_DEFAULT; @@ -459,6 +460,7 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini ) IniEntry( SysSettingsTabName ); IniEntry( McdSettingsTabName ); IniEntry( AppSettingsTabName ); + IniEntry( GameDatabaseTabName ); ini.EnumEntry( L"LanguageId", LanguageId, NULL, defaults.LanguageId ); IniEntry( RecentIsoCount ); IniEntry( DeskTheme ); diff --git a/pcsx2/gui/AppConfig.h b/pcsx2/gui/AppConfig.h index 9f79ee6cc8..388ab625cc 100644 --- a/pcsx2/gui/AppConfig.h +++ b/pcsx2/gui/AppConfig.h @@ -189,6 +189,7 @@ public: wxString SysSettingsTabName; wxString McdSettingsTabName; wxString AppSettingsTabName; + wxString GameDatabaseTabName; // Current language in use (correlates to a wxWidgets wxLANGUAGE specifier) wxLanguage LanguageId; diff --git a/pcsx2/gui/Dialogs/ConfigurationDialog.h b/pcsx2/gui/Dialogs/ConfigurationDialog.h index 802e1cacb2..c783e759d6 100644 --- a/pcsx2/gui/Dialogs/ConfigurationDialog.h +++ b/pcsx2/gui/Dialogs/ConfigurationDialog.h @@ -113,6 +113,21 @@ namespace Dialogs void OnMultitapClicked( wxCommandEvent& evt ); }; + // -------------------------------------------------------------------------------------- + // GameDatabaseDialog + // -------------------------------------------------------------------------------------- + class GameDatabaseDialog : public BaseConfigurationDialog + { + public: + virtual ~GameDatabaseDialog() throw() {} + GameDatabaseDialog(wxWindow* parent=NULL); + static wxString GetNameStatic() { return L"GameDatabase"; } + wxString GetDialogName() const { return GetNameStatic(); } + + protected: + virtual wxString& GetConfSettingsTabName() const { return g_Conf->GameDatabaseTabName; } + }; + // -------------------------------------------------------------------------------------- // ComponentsConfigDialog // -------------------------------------------------------------------------------------- diff --git a/pcsx2/gui/Dialogs/GameDatabaseDialog.cpp b/pcsx2/gui/Dialogs/GameDatabaseDialog.cpp new file mode 100644 index 0000000000..c286e3387f --- /dev/null +++ b/pcsx2/gui/Dialogs/GameDatabaseDialog.cpp @@ -0,0 +1,28 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2010 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#include "PrecompiledHeader.h" +#include "ConfigurationDialog.h" +#include "Panels/ConfigurationPanels.h" + +Dialogs::GameDatabaseDialog::GameDatabaseDialog(wxWindow* parent) + : BaseConfigurationDialog( parent, AddAppName(_("Game Database - %s")), 580 ) +{ + ScopedBusyCursor busy( Cursor_ReallyBusy ); + + *this += new Panels::GameDatabasePanel(this); + + AddOkCancel(); +} diff --git a/pcsx2/gui/Dialogs/SysConfigDialog.cpp b/pcsx2/gui/Dialogs/SysConfigDialog.cpp index 06592a1224..94486539d2 100644 --- a/pcsx2/gui/Dialogs/SysConfigDialog.cpp +++ b/pcsx2/gui/Dialogs/SysConfigDialog.cpp @@ -24,6 +24,46 @@ using namespace Panels; +static void CheckHacksOverrides() +{ + if( !wxGetApp().Overrides.HasCustomHacks() ) return; + + // The user has commandline overrides enabled, so the options they see here and/or apply won't match + // the commandline overrides. Let them know! + + wxDialogWithHelpers dialog( wxFindWindowByName( L"Dialog:" + Dialogs::SysConfigDialog::GetNameStatic() ), _("Config Overrides Warning") ); + + dialog += dialog.Text( pxE(".Panel:HasHacksOverrides", + L"Warning! You are running PCSX2 with command line options that override your configured settings. " + L"These command line options will not be reflected in the Settings dialog, and will be disabled " + L"if you apply any changes here." + )); + + // [TODO] : List command line option overrides in action? + + pxIssueConfirmation( dialog, MsgButtons().OK(), L"Dialog:SysConfig:Overrides" ); +} + +static void CheckPluginsOverrides() +{ + if( !wxGetApp().Overrides.HasPluginsOverride() ) return; + + // The user has commandline overrides enabled, so the options they see here and/or apply won't match + // the commandline overrides. Let them know! + + wxDialogWithHelpers dialog( NULL, _("Components Overrides Warning") ); + + dialog += dialog.Text( pxE(".Panel:HasPluginsOverrides", + L"Warning! You are running PCSX2 with command line options that override your configured plugin and/or folder settings. " + L"These command line options will not be reflected in the settings dialog, and will be disabled " + L"when you apply settings changes here." + )); + + // [TODO] : List command line option overrides in action? + + pxIssueConfirmation( dialog, MsgButtons().OK(), L"Dialog:ComponentsConfig:Overrides" ); +} + Dialogs::SysConfigDialog::SysConfigDialog(wxWindow* parent) : BaseConfigurationDialog( parent, AddAppName(_("Emulation Settings - %s")), 580 ) { @@ -38,10 +78,13 @@ Dialogs::SysConfigDialog::SysConfigDialog(wxWindow* parent) AddPage ( wxLt("GS Window"), cfgid.Video ); AddPage ( wxLt("Speedhacks"), cfgid.Speedhacks ); AddPage ( wxLt("Game Fixes"), cfgid.Gamefixes ); - AddPage ( wxLt("Game Database"),cfgid.Plugins ); + //AddPage ( wxLt("Game Database"),cfgid.Plugins ); AddListbook(); AddOkCancel(); + + if( wxGetApp().Overrides.HasCustomHacks() ) + wxGetApp().PostMethod( CheckHacksOverrides ); } Dialogs::ComponentsConfigDialog::ComponentsConfigDialog(wxWindow* parent) @@ -58,4 +101,7 @@ Dialogs::ComponentsConfigDialog::ComponentsConfigDialog(wxWindow* parent) AddListbook(); AddOkCancel(); + + if( wxGetApp().Overrides.HasPluginsOverride() ) + wxGetApp().PostMethod( CheckPluginsOverrides ); } diff --git a/pcsx2/gui/Panels/GameFixesPanel.cpp b/pcsx2/gui/Panels/GameFixesPanel.cpp index c0119ef618..65edd85570 100644 --- a/pcsx2/gui/Panels/GameFixesPanel.cpp +++ b/pcsx2/gui/Panels/GameFixesPanel.cpp @@ -14,6 +14,7 @@ */ #include "PrecompiledHeader.h" +#include "App.h" #include "ConfigurationPanels.h" using namespace pxSizerFlags; @@ -109,6 +110,9 @@ void Panels::GameFixesPanel::Apply() Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes ); for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i) opts.Set((GamefixId)i, m_checkbox[i]->GetValue()); + + // make sure the user's command line specifications are disabled (if present). + wxGetApp().Overrides.ApplyCustomGamefixes = false; } void Panels::GameFixesPanel::EnableStuff() diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 3638cf5f1c..16ef6f556d 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -14,10 +14,9 @@ */ #include "PrecompiledHeader.h" +#include "App.h" #include "ConfigurationPanels.h" -#include "System.h" - using namespace pxSizerFlags; const wxChar* Panels::SpeedHacksPanel::GetEEcycleSliderMsg( int val ) @@ -324,6 +323,10 @@ void Panels::SpeedHacksPanel::Apply() opts.IntcStat = m_check_intc->GetValue(); opts.vuFlagHack = m_check_vuFlagHack->GetValue(); opts.vuMinMax = m_check_vuMinMax->GetValue(); + + // If the user has a command line override specified, we need to disable it + // so that their changes take effect + wxGetApp().Overrides.DisableSpeedhacks = false; } void Panels::SpeedHacksPanel::OnEnable_Toggled( wxCommandEvent& evt ) diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index 36a29547be..73a727118e 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -20,7 +20,6 @@ + + diff --git a/pcsx2/x86/sVU_Lower.cpp b/pcsx2/x86/sVU_Lower.cpp index d923ca6a26..0ac9e9e0e9 100644 --- a/pcsx2/x86/sVU_Lower.cpp +++ b/pcsx2/x86/sVU_Lower.cpp @@ -2004,13 +2004,11 @@ void __fastcall VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr) } else { - pxAssumeMsg((Path1WritePos+size < sizeof(Path1Buffer)), "XGKick Buffer Overflow detected on Path1Buffer!"); - //DevCon.Warning("GIF APATH busy %x Holding for later W %x, R %x", gifRegs->stat.APATH, Path1WritePos, Path1ReadPos); size = GIFPath_ParseTag(GIF_PATH_1, data, diff, true); pDest = &Path1Buffer[Path1WritePos*16]; - + pxAssumeMsg((Path1WritePos+size < sizeof(Path1Buffer)), "XGKick Buffer Overflow detected on Path1Buffer!"); //DevCon.Warning("Storing size %x PATH 1", size); if (size > diff) {