* Cmdline: Added warnings when opening settings panels with command line overrides enabled, and force-disable overrides when new settings are manually applied.

* GameDB: Remove the game database from the Settings panel, since it's kinda slow still and it started to drive me nuts.  I haven't added another menu option to open it up yet (it will be in its own dialog), but I will soon.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3290 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-06-24 17:39:18 +00:00
parent 35b05e3836
commit e1890f369e
14 changed files with 121 additions and 13 deletions

View File

@ -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;

View File

@ -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

View File

@ -381,6 +381,7 @@
<Unit filename="../gui/Dialogs/ConfirmationDialogs.cpp" />
<Unit filename="../gui/Dialogs/CreateMemoryCardDialog.cpp" />
<Unit filename="../gui/Dialogs/FirstTimeWizard.cpp" />
<Unit filename="../gui/Dialogs/GameDatabaseDialog.cpp" />
<Unit filename="../gui/Dialogs/ImportSettingsDialog.cpp" />
<Unit filename="../gui/Dialogs/LogOptionsDialog.cpp" />
<Unit filename="../gui/Dialogs/LogOptionsDialog.h" />

View File

@ -324,6 +324,12 @@ public:
return DisableSpeedhacks || ApplyCustomGamefixes;
}
void RemoveCustomHacks()
{
DisableSpeedhacks = false;
ApplyCustomGamefixes = false;
}
bool HasSettingsOverride() const
{
return SettingsFolder.IsOk() || SettingsFile.IsOk();
@ -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();

View File

@ -28,3 +28,6 @@
#include "AppForwardDefs.h"
#include "AppConfig.h"
#include "AppEventListeners.h"
extern wxString AddAppName( const wxChar* fmt );
extern wxString AddAppName( const char* fmt );

View File

@ -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 );

View File

@ -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;

View File

@ -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
// --------------------------------------------------------------------------------------

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#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();
}

View File

@ -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<GSWindowSettingsPanel> ( wxLt("GS Window"), cfgid.Video );
AddPage<SpeedHacksPanel> ( wxLt("Speedhacks"), cfgid.Speedhacks );
AddPage<GameFixesPanel> ( wxLt("Game Fixes"), cfgid.Gamefixes );
AddPage<GameDatabasePanel> ( wxLt("Game Database"),cfgid.Plugins );
//AddPage<GameDatabasePanel> ( 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 );
}

View File

@ -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()

View File

@ -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 )

View File

@ -20,7 +20,6 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)\bin\$(PcsxSubsection)"
ConfigurationType="1"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;.\vsprops\devbuild.vsprops;..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops;..\..\..\common\vsprops\wxWidgetsGui.vsprops"
UseOfMFC="0"
@ -2040,6 +2039,10 @@
RelativePath="..\..\gui\Dialogs\FirstTimeWizard.cpp"
>
</File>
<File
RelativePath="..\..\gui\Dialogs\GameDatabaseDialog.cpp"
>
</File>
<File
RelativePath="..\..\gui\Dialogs\ImportSettingsDialog.cpp"
>

View File

@ -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) {