mirror of https://github.com/PCSX2/pcsx2.git
Indentation: Converted some spaces to tabs under pcsx2/gui.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4205 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5386779b82
commit
7fe180015e
|
@ -713,21 +713,22 @@ int AppConfig::GeMaxPresetIndex()
|
|||
return 5;
|
||||
}
|
||||
|
||||
bool AppConfig::isOkGetPresetTextAndColor(int n, wxString& label, wxColor& c){
|
||||
static const wxString presetNamesAndColors[][2]=
|
||||
{
|
||||
{ pxE("!Panel:Presets:Name:1", L"Safest"), L"Forest GREEN" },
|
||||
{ pxE("!Panel:Presets:Name:2", L"Safe (faster)"), L"Dark Green" },
|
||||
{ pxE("!Panel:Presets:Name:3", L"Balanced"), L"Blue" },
|
||||
{ pxE("!Panel:Presets:Name:4", L"Aggressive"), L"Purple" },
|
||||
{ pxE("!Panel:Presets:Name:5", L"Aggressive plus"), L"Orange"},
|
||||
{ pxE("!Panel:Presets:Name:6", L"Mostly Harmful"), L"Red" }
|
||||
};
|
||||
if ( n<0 || n>GeMaxPresetIndex() )
|
||||
return false;
|
||||
bool AppConfig::isOkGetPresetTextAndColor( int n, wxString& label, wxColor& c )
|
||||
{
|
||||
static const wxString presetNamesAndColors[][2] =
|
||||
{
|
||||
{ pxE("!Panel:Presets:Name:1", L"Safest"), L"Forest GREEN" },
|
||||
{ pxE("!Panel:Presets:Name:2", L"Safe (faster)"), L"Dark Green" },
|
||||
{ pxE("!Panel:Presets:Name:3", L"Balanced"), L"Blue" },
|
||||
{ pxE("!Panel:Presets:Name:4", L"Aggressive"), L"Purple" },
|
||||
{ pxE("!Panel:Presets:Name:5", L"Aggressive plus"), L"Orange"},
|
||||
{ pxE("!Panel:Presets:Name:6", L"Mostly Harmful"), L"Red" }
|
||||
};
|
||||
if( n<0 || n>GeMaxPresetIndex() )
|
||||
return false;
|
||||
|
||||
label = wxString::Format(L"%d - ", n) + presetNamesAndColors[n][0];
|
||||
c = wxColor(presetNamesAndColors[n][1]);
|
||||
label = wxString::Format(L"%d - ", n) + presetNamesAndColors[n][0];
|
||||
c = wxColor(presetNamesAndColors[n][1]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -795,12 +796,12 @@ bool AppConfig::IsOkApplyPreset(int n)
|
|||
eeUsed?0:(eeUsed=true, EmuOptions.Speedhacks.EECycleRate = 1);
|
||||
EnableGameFixes = true;
|
||||
EmuOptions.Gamefixes.EETimingHack = true;
|
||||
EmuOptions.Speedhacks.vuFlagHack = true;
|
||||
EmuOptions.Speedhacks.vuFlagHack = true;
|
||||
|
||||
case 1 : //Apply recommended speed hacks (which are individually "ckecked" by default) without mvu flag hack.
|
||||
EnableSpeedHacks = true;
|
||||
EmuOptions.Speedhacks.IntcStat = true;
|
||||
EmuOptions.Speedhacks.WaitLoop = true;
|
||||
EmuOptions.Speedhacks.IntcStat = true;
|
||||
EmuOptions.Speedhacks.WaitLoop = true;
|
||||
|
||||
case 0 : //default application config. + all individual speed hacks unticked to make it visually clear none is used.
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace PathDefs
|
|||
// user checks "Use Default paths" option provided on most path selectors. These are not
|
||||
// used otherwise, in favor of the user-configurable specifications in the ini files.
|
||||
|
||||
extern wxDirName GetUserLocalDataDir();
|
||||
extern wxDirName GetUserLocalDataDir();
|
||||
extern wxDirName GetDocuments();
|
||||
extern wxDirName GetDocuments( DocsModeType mode );
|
||||
extern wxDirName GetThemes();
|
||||
|
@ -50,7 +50,7 @@ namespace PathDefs
|
|||
|
||||
extern DocsModeType DocsFolderMode; //
|
||||
extern bool UseDefaultSettingsFolder; // when TRUE, pcsx2 derives the settings folder from the DocsFolderMode
|
||||
extern bool UseDefaultLogFolder;
|
||||
extern bool UseDefaultLogFolder;
|
||||
extern bool UseDefaultPluginsFolder;
|
||||
extern bool UseDefaultThemesFolder;
|
||||
|
||||
|
@ -175,7 +175,7 @@ public:
|
|||
bool IsMaximized;
|
||||
bool IsFullscreen;
|
||||
|
||||
bool IsToggleFullscreenOnDoubleClick;
|
||||
bool IsToggleFullscreenOnDoubleClick;
|
||||
|
||||
GSWindowOptions();
|
||||
|
||||
|
@ -245,10 +245,10 @@ public:
|
|||
bool EnableGameFixes;
|
||||
|
||||
// Presets try to prevent users from overwhelming when they want to change settings (usually to make a game run faster).
|
||||
// The presets allow to modify the balance between emulation accuracy and emulation speed using a pseudo-linear control.
|
||||
// It's pseudo since there's no way to arrange groups of all of pcsx2's settings such that each next group makes it slighty faster and slightly less compatiible for all games.
|
||||
//However, By carefully selecting these preset config groups, it's hopefully possible to achieve this goal for a reasonable percentage (hopefully above 50%) of the games.
|
||||
//when presets are enabled, the user has practically no control over the emulation settings, and can only choose the preset to use.
|
||||
// The presets allow to modify the balance between emulation accuracy and emulation speed using a pseudo-linear control.
|
||||
// It's pseudo since there's no way to arrange groups of all of pcsx2's settings such that each next group makes it slighty faster and slightly less compatiible for all games.
|
||||
//However, By carefully selecting these preset config groups, it's hopefully possible to achieve this goal for a reasonable percentage (hopefully above 50%) of the games.
|
||||
//when presets are enabled, the user has practically no control over the emulation settings, and can only choose the preset to use.
|
||||
|
||||
// The next 2 vars enable/disable presets alltogether, and select/reflect current preset, respectively.
|
||||
bool EnablePresets;
|
||||
|
|
|
@ -439,7 +439,7 @@ void Pcsx2App::LogicalVsync()
|
|||
// Only call PADupdate here if we're using GSopen2. Legacy GSopen plugins have the
|
||||
// GS window belonging to the MTGS thread.
|
||||
if( (PADupdate != NULL) && (GSopen2 != NULL) && (wxGetApp().GetGsFramePtr() != NULL) )
|
||||
PADupdate(0);
|
||||
PADupdate(0);
|
||||
|
||||
while( const keyEvent* ev = PADkeyEvent() )
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ void pxLogConsole::DoLog( wxLogLevel level, const wxChar *szString, time_t t )
|
|||
case wxLOG_Warning:
|
||||
Console.Warning( L"[wx] %s", szString );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,17 +107,17 @@ void ConsoleTestThread::ExecuteTaskInThread()
|
|||
//
|
||||
static bool OpenLogFile(wxFile& file, wxString& filename, wxWindow *parent)
|
||||
{
|
||||
filename = wxSaveFileSelector(L"log", L"txt", L"log.txt", parent);
|
||||
if ( !filename ) return false; // canceled
|
||||
filename = wxSaveFileSelector(L"log", L"txt", L"log.txt", parent);
|
||||
if ( !filename ) return false; // canceled
|
||||
|
||||
if( wxFile::Exists(filename) )
|
||||
{
|
||||
bool bAppend = false;
|
||||
wxString strMsg;
|
||||
strMsg.Printf(L"Append log to file '%s' (choosing [No] will overwrite it)?",
|
||||
filename.c_str());
|
||||
if( wxFile::Exists(filename) )
|
||||
{
|
||||
bool bAppend = false;
|
||||
wxString strMsg;
|
||||
strMsg.Printf(L"Append log to file '%s' (choosing [No] will overwrite it)?",
|
||||
filename.c_str());
|
||||
|
||||
switch ( Msgbox::ShowModal( _("Save log question"), strMsg, MsgButtons().YesNo().Cancel() ) )
|
||||
switch ( Msgbox::ShowModal( _("Save log question"), strMsg, MsgButtons().YesNo().Cancel() ) )
|
||||
{
|
||||
case wxID_YES:
|
||||
bAppend = true;
|
||||
|
@ -132,12 +132,12 @@ static bool OpenLogFile(wxFile& file, wxString& filename, wxWindow *parent)
|
|||
|
||||
default:
|
||||
pxFailDev( "invalid message box return value" );
|
||||
}
|
||||
}
|
||||
|
||||
return ( bAppend ) ?
|
||||
file.Open(filename, wxFile::write_append) :
|
||||
file.Create(filename, true /* overwrite */);
|
||||
}
|
||||
file.Create(filename, true /* overwrite */);
|
||||
}
|
||||
|
||||
return file.Create(filename);
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ void ConsoleLogFrame::ColorArray::Create( int fontsize )
|
|||
new (&m_table[Color_StrongBlue]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
new (&m_table[Color_StrongMagenta]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
new (&m_table[Color_StrongOrange]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
new (&m_table[Color_StrongGray]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
new (&m_table[Color_StrongGray]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
|
||||
new (&m_table[Color_StrongCyan]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
new (&m_table[Color_StrongYellow]) wxTextAttr( wxNullColour, wxNullColour, fixedB );
|
||||
|
@ -745,20 +745,20 @@ void ConsoleLogFrame::OnClose( wxCommandEvent& event )
|
|||
|
||||
void ConsoleLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString filename;
|
||||
wxFile file;
|
||||
bool rc = OpenLogFile( file, filename, this );
|
||||
if ( !rc )
|
||||
{
|
||||
// canceled
|
||||
return;
|
||||
}
|
||||
wxString filename;
|
||||
wxFile file;
|
||||
bool rc = OpenLogFile( file, filename, this );
|
||||
if ( !rc )
|
||||
{
|
||||
// canceled
|
||||
return;
|
||||
}
|
||||
|
||||
// retrieve text and save it
|
||||
// -------------------------
|
||||
int nLines = m_TextCtrl.GetNumberOfLines();
|
||||
for ( int nLine = 0; nLine < nLines; nLine++ )
|
||||
{
|
||||
// retrieve text and save it
|
||||
// -------------------------
|
||||
int nLines = m_TextCtrl.GetNumberOfLines();
|
||||
for ( int nLine = 0; nLine < nLines; nLine++ )
|
||||
{
|
||||
if( !file.Write(m_TextCtrl.GetLineText(nLine) + wxTextFile::GetEOL()) )
|
||||
{
|
||||
wxLogError( L"Can't save log contents to file." );
|
||||
|
@ -769,7 +769,7 @@ void ConsoleLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
|
|||
|
||||
void ConsoleLogFrame::OnClear(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_TextCtrl.Clear();
|
||||
m_TextCtrl.Clear();
|
||||
}
|
||||
|
||||
void ConsoleLogFrame::OnToggleSource( wxCommandEvent& evt )
|
||||
|
@ -1022,16 +1022,16 @@ static void __concall ConsoleToFile_DoWriteLn( const wxString& fmt )
|
|||
|
||||
static void __concall ConsoleToFile_SetTitle( const wxString& title )
|
||||
{
|
||||
ConsoleWriter_Stdout.SetTitle(title);
|
||||
ConsoleWriter_Stdout.SetTitle(title);
|
||||
}
|
||||
|
||||
static void __concall ConsoleToFile_DoSetColor( ConsoleColors color )
|
||||
{
|
||||
ConsoleWriter_Stdout.DoSetColor(color);
|
||||
ConsoleWriter_Stdout.DoSetColor(color);
|
||||
}
|
||||
|
||||
extern const IConsoleWriter ConsoleWriter_File;
|
||||
const IConsoleWriter ConsoleWriter_File =
|
||||
const IConsoleWriter ConsoleWriter_File =
|
||||
{
|
||||
ConsoleToFile_DoWrite,
|
||||
ConsoleToFile_DoWriteLn,
|
||||
|
@ -1055,7 +1055,7 @@ Mutex& Pcsx2App::GetProgramLogLock()
|
|||
template< const IConsoleWriter& secondary >
|
||||
static void __concall ConsoleToWindow_SetTitle( const wxString& title )
|
||||
{
|
||||
secondary.SetTitle(title);
|
||||
secondary.SetTitle(title);
|
||||
wxCommandEvent evt( pxEvt_SetTitleText );
|
||||
evt.SetString( title );
|
||||
wxGetApp().ProgramLog_PostEvent( evt );
|
||||
|
@ -1064,7 +1064,7 @@ static void __concall ConsoleToWindow_SetTitle( const wxString& title )
|
|||
template< const IConsoleWriter& secondary >
|
||||
static void __concall ConsoleToWindow_DoSetColor( ConsoleColors color )
|
||||
{
|
||||
secondary.DoSetColor(color);
|
||||
secondary.DoSetColor(color);
|
||||
}
|
||||
|
||||
template< const IConsoleWriter& secondary >
|
||||
|
|
|
@ -54,10 +54,10 @@ extern PipeRedirectionBase* NewPipeRedir( FILE* stdstream );
|
|||
class pxLogConsole : public wxLog
|
||||
{
|
||||
public:
|
||||
pxLogConsole() {}
|
||||
pxLogConsole() {}
|
||||
|
||||
protected:
|
||||
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);
|
||||
virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
}
|
||||
|
||||
// Use this to prevent the Apply buton from being re-enabled.
|
||||
//avih: Does this work?? As far as I know Apply is always enabled...
|
||||
//avih: Does this work?? As far as I know Apply is always enabled...
|
||||
void DetachApply()
|
||||
{
|
||||
m_apply = NULL;
|
||||
|
@ -223,7 +223,7 @@ void Dialogs::BaseConfigurationDialog::OnOk_Click( wxCommandEvent& evt )
|
|||
{
|
||||
ScopedOkButtonDisabler disabler(this);
|
||||
|
||||
Apply();
|
||||
Apply();
|
||||
|
||||
if( m_ApplyState.ApplyAll() )
|
||||
{
|
||||
|
@ -239,13 +239,13 @@ void Dialogs::BaseConfigurationDialog::OnApply_Click( wxCommandEvent& evt )
|
|||
{
|
||||
ScopedOkButtonDisabler disabler(this);
|
||||
|
||||
//if current instance also holds settings that need application. Apply it.
|
||||
//Currently only used by SysConfigDialog, which applies the preset.
|
||||
//Needs to come before actual panels Apply since they enable/disable themselves upon Preset state,
|
||||
// so the preset needs to be applied first.
|
||||
Apply();
|
||||
//if current instance also holds settings that need application. Apply it.
|
||||
//Currently only used by SysConfigDialog, which applies the preset.
|
||||
//Needs to come before actual panels Apply since they enable/disable themselves upon Preset state,
|
||||
// so the preset needs to be applied first.
|
||||
Apply();
|
||||
|
||||
if( m_ApplyState.ApplyAll() )
|
||||
if( m_ApplyState.ApplyAll() )
|
||||
disabler.DetachApply();
|
||||
|
||||
if( m_listbook ) GetConfSettingsTabName() = m_labels[m_listbook->GetSelection()];
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace Dialogs
|
|||
|
||||
virtual wxString& GetConfSettingsTabName() const=0;
|
||||
|
||||
virtual void Apply() {};
|
||||
virtual void Apply() {};
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -97,7 +97,7 @@ namespace Dialogs
|
|||
void AddPresetsControl();
|
||||
void Preset_Scroll(wxScrollEvent &event);
|
||||
void Presets_Toggled(wxCommandEvent &event);
|
||||
void UpdateGuiForPreset ( int presetIndex, bool presetsEnabled );
|
||||
void UpdateGuiForPreset ( int presetIndex, bool presetsEnabled );
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -75,32 +75,32 @@ static void CheckPluginsOverrides()
|
|||
//#define PRESETS_USE_APPLIED_CONFIG_ON_UNCHECK
|
||||
void Dialogs::SysConfigDialog::UpdateGuiForPreset ( int presetIndex, bool presetsEnabled )
|
||||
{
|
||||
AppConfig preset = *g_Conf;
|
||||
preset.IsOkApplyPreset(presetIndex);
|
||||
preset.EnablePresets=presetsEnabled;//override IsOkApplyPreset to actual required state
|
||||
AppConfig preset = *g_Conf;
|
||||
preset.IsOkApplyPreset(presetIndex);
|
||||
preset.EnablePresets=presetsEnabled;//override IsOkApplyPreset to actual required state
|
||||
|
||||
if( m_listbook ){
|
||||
//Console.WriteLn("Applying config to Gui: preset #%d, presets enabled: %s", presetIndex, presetsEnabled?"true":"false");
|
||||
//Console.WriteLn("Applying config to Gui: preset #%d, presets enabled: %s", presetIndex, presetsEnabled?"true":"false");
|
||||
size_t pages = m_labels.GetCount();
|
||||
for( size_t i=0; i<pages; ++i ){
|
||||
bool origPresetsEnabled = g_Conf->EnablePresets;
|
||||
if( !presetsEnabled )
|
||||
g_Conf->EnablePresets = false; // unly used when PRESETS_USE_APPLIED_CONFIG_WHEN_UNCHECKED is NOT defined
|
||||
for( size_t i=0; i<pages; ++i ){
|
||||
bool origPresetsEnabled = g_Conf->EnablePresets;
|
||||
if( !presetsEnabled )
|
||||
g_Conf->EnablePresets = false; // unly used when PRESETS_USE_APPLIED_CONFIG_WHEN_UNCHECKED is NOT defined
|
||||
|
||||
(
|
||||
(BaseApplicableConfigPanel_SpecificConfig*)(m_listbook->GetPage(i))
|
||||
|
||||
#ifdef PRESETS_USE_APPLIED_CONFIG_ON_UNCHECK
|
||||
)->ApplyConfigToGui( presetsEnabled?preset:*g_Conf, true );
|
||||
//Console.WriteLn("SysConfigDialog::UpdateGuiForPreset: Using object: %s", presetsEnabled?"preset":"*g_Conf");
|
||||
)->ApplyConfigToGui( presetsEnabled?preset:*g_Conf, true );
|
||||
//Console.WriteLn("SysConfigDialog::UpdateGuiForPreset: Using object: %s", presetsEnabled?"preset":"*g_Conf");
|
||||
#else
|
||||
)->ApplyConfigToGui( preset, true );
|
||||
//Console.WriteLn("SysConfigDialog::UpdateGuiForPreset: Using object: %s", "preset");
|
||||
)->ApplyConfigToGui( preset, true );
|
||||
//Console.WriteLn("SysConfigDialog::UpdateGuiForPreset: Using object: %s", "preset");
|
||||
#endif
|
||||
g_Conf->EnablePresets = origPresetsEnabled;
|
||||
}
|
||||
g_Conf->EnablePresets = origPresetsEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ void Dialogs::SysConfigDialog::AddPresetsControl()
|
|||
wxDefaultPosition, wxDefaultSize, wxHORIZONTAL /*| wxSL_AUTOTICKS | wxSL_LABELS */);
|
||||
|
||||
m_slider_presets->SetToolTip(
|
||||
pxE( "!Notice:Tooltip:Presets:Slider",
|
||||
pxE( "!Notice:Tooltip:Presets:Slider",
|
||||
L"The Presets apply speed hacks, some recompiler options and some game fixes known to boost speed.\n"
|
||||
L"Known important game fixes ('Patches') will be applied automatically.\n\n"
|
||||
L"Presets info:\n"
|
||||
|
@ -124,7 +124,7 @@ void Dialogs::SysConfigDialog::AddPresetsControl()
|
|||
|
||||
m_check_presets = new pxCheckBox( this, pxE("!Panel:", L"Preset:"), 0);
|
||||
m_check_presets->SetToolTip(
|
||||
pxE( "!Notice:Tooltip:Presets:Checkbox",
|
||||
pxE( "!Notice:Tooltip:Presets:Checkbox",
|
||||
L"The Presets apply speed hacks, some recompiler options and some game fixes known to boost speed.\n"
|
||||
L"Known important game fixes ('Patches') will be applied automatically.\n\n"
|
||||
//This creates nested macros = not working. Un/comment manually if needed.
|
||||
|
@ -137,10 +137,10 @@ void Dialogs::SysConfigDialog::AddPresetsControl()
|
|||
)
|
||||
);
|
||||
m_check_presets->SetValue(!!g_Conf->EnablePresets);
|
||||
//Console.WriteLn("--> SysConfigDialog::AddPresetsControl: EnablePresets: %s", g_Conf->EnablePresets?"true":"false");
|
||||
//Console.WriteLn("--> SysConfigDialog::AddPresetsControl: EnablePresets: %s", g_Conf->EnablePresets?"true":"false");
|
||||
|
||||
wxString l; wxColor c(wxColour( L"Red" ));
|
||||
AppConfig::isOkGetPresetTextAndColor(g_Conf->PresetIndex, l, c);
|
||||
AppConfig::isOkGetPresetTextAndColor(g_Conf->PresetIndex, l, c);
|
||||
m_msg_preset = new pxStaticText(this, l, wxALIGN_LEFT);
|
||||
m_msg_preset->Enable(g_Conf->EnablePresets);
|
||||
m_msg_preset->SetForegroundColour( c );
|
||||
|
@ -157,9 +157,9 @@ void Dialogs::SysConfigDialog::AddPresetsControl()
|
|||
*m_extraButtonSizer += 5;
|
||||
*m_extraButtonSizer += *m_msg_preset | pxMiddle;
|
||||
|
||||
Connect( m_slider_presets->GetId(), wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Dialogs::SysConfigDialog::Preset_Scroll ) );
|
||||
Connect( m_slider_presets->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Dialogs::SysConfigDialog::Preset_Scroll ) );
|
||||
Connect( m_check_presets->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( Dialogs::SysConfigDialog::Presets_Toggled ) );
|
||||
Connect( m_slider_presets->GetId(), wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Dialogs::SysConfigDialog::Preset_Scroll ) );
|
||||
Connect( m_slider_presets->GetId(), wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Dialogs::SysConfigDialog::Preset_Scroll ) );
|
||||
Connect( m_check_presets->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( Dialogs::SysConfigDialog::Presets_Toggled ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,9 +168,9 @@ void Dialogs::SysConfigDialog::Presets_Toggled(wxCommandEvent &event)
|
|||
{
|
||||
m_slider_presets->Enable( m_check_presets->IsChecked() );
|
||||
m_msg_preset->Enable( m_check_presets->IsChecked() );
|
||||
UpdateGuiForPreset( m_slider_presets->GetValue(), m_check_presets->IsChecked() );
|
||||
UpdateGuiForPreset( m_slider_presets->GetValue(), m_check_presets->IsChecked() );
|
||||
|
||||
event.Skip();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
|
@ -178,19 +178,19 @@ void Dialogs::SysConfigDialog::Preset_Scroll(wxScrollEvent &event)
|
|||
{
|
||||
wxString pl;
|
||||
wxColor c;
|
||||
AppConfig::isOkGetPresetTextAndColor(m_slider_presets->GetValue(), pl, c);
|
||||
AppConfig::isOkGetPresetTextAndColor(m_slider_presets->GetValue(), pl, c);
|
||||
m_msg_preset->SetLabel(pl);
|
||||
m_msg_preset->SetForegroundColour( c );
|
||||
|
||||
UpdateGuiForPreset( m_slider_presets->GetValue(), m_check_presets->IsChecked() );
|
||||
UpdateGuiForPreset( m_slider_presets->GetValue(), m_check_presets->IsChecked() );
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void Dialogs::SysConfigDialog::Apply()
|
||||
{
|
||||
//Console.WriteLn("Applying preset to to g_Conf: Preset index: %d, EnablePresets: %s", (int)m_slider_presets->GetValue(), m_check_presets->IsChecked()?"true":"false");
|
||||
g_Conf->EnablePresets = m_check_presets->IsChecked();
|
||||
g_Conf->PresetIndex = m_slider_presets->GetValue();
|
||||
//Console.WriteLn("Applying preset to to g_Conf: Preset index: %d, EnablePresets: %s", (int)m_slider_presets->GetValue(), m_check_presets->IsChecked()?"true":"false");
|
||||
g_Conf->EnablePresets = m_check_presets->IsChecked();
|
||||
g_Conf->PresetIndex = m_slider_presets->GetValue();
|
||||
}
|
||||
|
||||
|
||||
|
@ -205,7 +205,7 @@ Dialogs::SysConfigDialog::SysConfigDialog(wxWindow* parent)
|
|||
AddPage<CpuPanelEE> ( pxL("EE/IOP"), cfgid.Cpu );
|
||||
AddPage<CpuPanelVU> ( pxL("VUs"), cfgid.Cpu );
|
||||
AddPage<VideoPanel> ( pxL("GS"), cfgid.Cpu );
|
||||
AddPage<GSWindowSettingsPanel> ( pxL("GS Window"), cfgid.Video );
|
||||
AddPage<GSWindowSettingsPanel> ( pxL("GS Window"), cfgid.Video );
|
||||
AddPage<SpeedHacksPanel> ( pxL("Speedhacks"), cfgid.Speedhacks );
|
||||
AddPage<GameFixesPanel> ( pxL("Game Fixes"), cfgid.Gamefixes );
|
||||
|
||||
|
|
|
@ -243,8 +243,8 @@ void GSPanel::AppStatusEvent_OnSettingsApplied()
|
|||
|
||||
void GSPanel::OnLeftDclick(wxMouseEvent& evt)
|
||||
{
|
||||
if( !g_Conf->GSWindow.IsToggleFullscreenOnDoubleClick )
|
||||
return;
|
||||
if( !g_Conf->GSWindow.IsToggleFullscreenOnDoubleClick )
|
||||
return;
|
||||
|
||||
Console.WriteLn("GSPanel::OnDoubleClick: Invoking Fullscreen-Toggle accelerator.");
|
||||
DirectKeyCommand(FULLSCREEN_TOGGLE_ACCELERATOR_GSPANEL);
|
||||
|
|
|
@ -33,10 +33,10 @@ wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid ) const
|
|||
{
|
||||
wxMenu* mnuSubstates = new wxMenu();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
mnuSubstates->Append( baseid+i+1, wxsFormat(L"Slot %d", i) );
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
mnuSubstates->Append( baseid+i+1, wxsFormat(L"Slot %d", i) );
|
||||
}
|
||||
mnuSubstates->AppendSeparator();
|
||||
mnuSubstates->Append( baseid - 1, _("Other...") );
|
||||
return mnuSubstates;
|
||||
|
@ -200,9 +200,9 @@ void MainEmuFrame::ConnectMenus()
|
|||
ConnectMenu( MenuId_Boot_CDVD2, Menu_BootCdvd2_Click );
|
||||
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_EnableHostFs, Menu_EnableHostFs_Click );
|
||||
ConnectMenu( MenuId_EnablePatches, Menu_EnablePatches_Click );
|
||||
ConnectMenu( MenuId_EnableCheats, Menu_EnableCheats_Click );
|
||||
ConnectMenu( MenuId_EnableHostFs, Menu_EnableHostFs_Click );
|
||||
ConnectMenu( MenuId_Exit, Menu_Exit_Click );
|
||||
|
||||
ConnectMenu( MenuId_Sys_SuspendResume, Menu_SuspendResume_Click );
|
||||
|
@ -211,11 +211,11 @@ void MainEmuFrame::ConnectMenus()
|
|||
|
||||
ConnectMenu( MenuId_State_LoadOther, Menu_LoadStateOther_Click );
|
||||
|
||||
ConnectMenuRange(MenuId_State_Load01+1, 10, Menu_LoadStates_Click);
|
||||
ConnectMenuRange(MenuId_State_Load01+1, 10, Menu_LoadStates_Click);
|
||||
|
||||
ConnectMenu( MenuId_State_SaveOther, Menu_SaveStateOther_Click );
|
||||
|
||||
ConnectMenuRange(MenuId_State_Save01+1, 10, Menu_SaveStates_Click);
|
||||
ConnectMenuRange(MenuId_State_Save01+1, 10, Menu_SaveStates_Click);
|
||||
|
||||
ConnectMenu( MenuId_Debug_Open, Menu_Debug_Open_Click );
|
||||
ConnectMenu( MenuId_Debug_MemoryDump, Menu_Debug_MemoryDump_Click );
|
||||
|
@ -296,7 +296,7 @@ static int GetPluginMenuId_Name( PluginsEnum_t pid )
|
|||
|
||||
// ------------------------------------------------------------------------
|
||||
MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
||||
: wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE & ~(wxMAXIMIZE_BOX | wxRESIZE_BORDER) )
|
||||
: wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE & ~(wxMAXIMIZE_BOX | wxRESIZE_BORDER) )
|
||||
|
||||
, m_statusbar( *CreateStatusBar(2, 0) )
|
||||
, m_background( this, wxID_ANY, wxGetApp().GetLogoBitmap() )
|
||||
|
@ -442,7 +442,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
|
|||
//m_menuCDVD.Append( MenuId_SkipBiosToggle,_("Enable BOOT2 injection"),
|
||||
// _("Skips PS2 splash screens when booting from Iso or DVD media"), wxITEM_CHECK );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
m_menuConfig.Append(MenuId_Config_SysSettings, _("Emulation &Settings") );
|
||||
m_menuConfig.Append(MenuId_Config_McdSettings, _("&Memory cards") );
|
||||
|
@ -646,7 +646,7 @@ void MainEmuFrame::ApplySettings()
|
|||
menubar.Check( MenuId_EnablePatches, g_Conf->EmuOptions.EnablePatches );
|
||||
menubar.Check( MenuId_EnableCheats, g_Conf->EmuOptions.EnableCheats );
|
||||
menubar.Check( MenuId_EnableHostFs, g_Conf->EmuOptions.HostFs );
|
||||
menubar.Check( MenuId_CDVD_Info, g_Conf->EmuOptions.CdvdVerboseReads );
|
||||
menubar.Check( MenuId_CDVD_Info, g_Conf->EmuOptions.CdvdVerboseReads );
|
||||
#ifdef __LINUX__
|
||||
menubar.Check( MenuId_Console_Stdio, g_Conf->EmuOptions.ConsoleToStdio );
|
||||
#endif
|
||||
|
|
|
@ -111,8 +111,8 @@ class MainEmuFrame : public wxFrame,
|
|||
protected:
|
||||
bool m_RestartEmuOnDelete;
|
||||
|
||||
wxStatusBar& m_statusbar;
|
||||
wxStaticBitmap m_background;
|
||||
wxStatusBar& m_statusbar;
|
||||
wxStaticBitmap m_background;
|
||||
|
||||
wxMenuBar& m_menubar;
|
||||
|
||||
|
@ -136,8 +136,8 @@ protected:
|
|||
virtual void AppStatusEvent_OnSettingsApplied();
|
||||
|
||||
public:
|
||||
MainEmuFrame(wxWindow* parent, const wxString& title);
|
||||
virtual ~MainEmuFrame() throw();
|
||||
MainEmuFrame(wxWindow* parent, const wxString& title);
|
||||
virtual ~MainEmuFrame() throw();
|
||||
|
||||
void OnLogBoxHidden();
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ namespace Panels
|
|||
virtual ~AdvancedOptionsFPU() throw() { }
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
};
|
||||
|
||||
class AdvancedOptionsVU : public BaseAdvancedCpuOptions
|
||||
|
@ -162,19 +162,19 @@ namespace Panels
|
|||
virtual ~AdvancedOptionsVU() throw() { }
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------------------
|
||||
// CpuPanelEE / CpuPanelVU : Actual Panels
|
||||
// --------------------------------------------------------------------------------------
|
||||
class CpuPanelEE : public BaseApplicableConfigPanel_SpecificConfig
|
||||
{
|
||||
protected:
|
||||
pxRadioPanel* m_panel_RecEE;
|
||||
pxRadioPanel* m_panel_RecIOP;
|
||||
AdvancedOptionsFPU* m_advancedOptsFpu;
|
||||
pxRadioPanel* m_panel_RecEE;
|
||||
pxRadioPanel* m_panel_RecIOP;
|
||||
AdvancedOptionsFPU* m_advancedOptsFpu;
|
||||
|
||||
public:
|
||||
CpuPanelEE( wxWindow* parent );
|
||||
|
@ -182,7 +182,7 @@ namespace Panels
|
|||
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui(AppConfig& configToApply, bool manuallyPropagate=false);
|
||||
void ApplyConfigToGui(AppConfig& configToApply, bool manuallyPropagate=false);
|
||||
|
||||
protected:
|
||||
void OnRestoreDefaults( wxCommandEvent& evt );
|
||||
|
@ -191,9 +191,9 @@ namespace Panels
|
|||
class CpuPanelVU : public BaseApplicableConfigPanel_SpecificConfig
|
||||
{
|
||||
protected:
|
||||
pxRadioPanel* m_panel_VU0;
|
||||
pxRadioPanel* m_panel_VU1;
|
||||
Panels::AdvancedOptionsVU* m_advancedOptsVu;
|
||||
pxRadioPanel* m_panel_VU0;
|
||||
pxRadioPanel* m_panel_VU1;
|
||||
Panels::AdvancedOptionsVU* m_advancedOptsVu;
|
||||
|
||||
public:
|
||||
CpuPanelVU( wxWindow* parent );
|
||||
|
@ -201,7 +201,7 @@ namespace Panels
|
|||
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
|
||||
protected:
|
||||
void OnRestoreDefaults( wxCommandEvent& evt );
|
||||
|
@ -226,7 +226,7 @@ namespace Panels
|
|||
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -253,7 +253,7 @@ namespace Panels
|
|||
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -270,7 +270,7 @@ namespace Panels
|
|||
pxCheckBox* m_check_Fullscreen;
|
||||
pxCheckBox* m_check_ExclusiveFS;
|
||||
pxCheckBox* m_check_HideMouse;
|
||||
pxCheckBox* m_check_DclickFullscreen;
|
||||
pxCheckBox* m_check_DclickFullscreen;
|
||||
|
||||
wxTextCtrl* m_text_WindowWidth;
|
||||
wxTextCtrl* m_text_WindowHeight;
|
||||
|
@ -280,23 +280,23 @@ namespace Panels
|
|||
virtual ~GSWindowSettingsPanel() throw() {}
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
};
|
||||
|
||||
class VideoPanel : public BaseApplicableConfigPanel_SpecificConfig
|
||||
{
|
||||
protected:
|
||||
pxCheckBox* m_check_SynchronousGS;
|
||||
pxCheckBox* m_check_DisableOutput;
|
||||
FrameSkipPanel* m_span;
|
||||
FramelimiterPanel* m_fpan;
|
||||
pxCheckBox* m_check_SynchronousGS;
|
||||
pxCheckBox* m_check_DisableOutput;
|
||||
FrameSkipPanel* m_span;
|
||||
FramelimiterPanel* m_fpan;
|
||||
|
||||
public:
|
||||
VideoPanel( wxWindow* parent );
|
||||
virtual ~VideoPanel() throw() {}
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
|
||||
protected:
|
||||
void OnOpenWindowSettings( wxCommandEvent& evt );
|
||||
|
@ -362,7 +362,7 @@ namespace Panels
|
|||
void OnEnable_Toggled( wxCommandEvent& evt );
|
||||
void Apply();
|
||||
void AppStatusEvent_OnSettingsApplied();
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
void ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate=false );
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -237,7 +237,7 @@ void Panels::CpuPanelEE::Apply()
|
|||
|
||||
void Panels::CpuPanelEE::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate ){
|
||||
|
@ -255,10 +255,10 @@ void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, bool manual
|
|||
|
||||
this->Enable(!configToApply.EnablePresets);
|
||||
|
||||
if( manuallyPropagate )
|
||||
{
|
||||
m_advancedOptsFpu->ApplyConfigToGui( configToApply, true );
|
||||
}
|
||||
if( manuallyPropagate )
|
||||
{
|
||||
m_advancedOptsFpu->ApplyConfigToGui( configToApply, true );
|
||||
}
|
||||
}
|
||||
|
||||
void Panels::CpuPanelEE::OnRestoreDefaults(wxCommandEvent &evt)
|
||||
|
@ -285,7 +285,7 @@ void Panels::CpuPanelVU::Apply()
|
|||
|
||||
void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
@ -314,10 +314,10 @@ void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, bool manual
|
|||
m_panel_VU0->Enable(!configToApply.EnablePresets);
|
||||
m_panel_VU1->Enable(!configToApply.EnablePresets);
|
||||
|
||||
if ( manuallyPropagate )
|
||||
{
|
||||
m_advancedOptsVu->ApplyConfigToGui( configToApply, true );
|
||||
}
|
||||
if ( manuallyPropagate )
|
||||
{
|
||||
m_advancedOptsVu->ApplyConfigToGui( configToApply, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -358,7 +358,7 @@ void Panels::AdvancedOptionsFPU::Apply()
|
|||
|
||||
void Panels::AdvancedOptionsFPU::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::AdvancedOptionsFPU::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
@ -398,7 +398,7 @@ void Panels::AdvancedOptionsVU::Apply()
|
|||
|
||||
void Panels::AdvancedOptionsVU::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::AdvancedOptionsVU::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
|
|
@ -46,7 +46,7 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel( wxWindow* parent )
|
|||
m_check_CloseGS = new pxCheckBox( this, _("Hide window on suspend") );
|
||||
m_check_Fullscreen = new pxCheckBox( this, _("Default to fullscreen mode on open") );
|
||||
m_check_VsyncEnable = new pxCheckBox( this, _("Wait for vsync on refresh") );
|
||||
m_check_DclickFullscreen = new pxCheckBox( this, _("Double-click Toggles Full-Screen mode") );
|
||||
m_check_DclickFullscreen = new pxCheckBox( this, _("Double-click Toggles Full-Screen mode") );
|
||||
m_check_ExclusiveFS = new pxCheckBox( this, _("Use exclusive fullscreen mode (if available)") );
|
||||
|
||||
m_check_VsyncEnable->SetToolTip( pxEt( "!ContextTip:Window:Vsync",
|
||||
|
@ -99,7 +99,7 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel( wxWindow* parent )
|
|||
*this += new wxStaticLine( this ) | StdExpand();
|
||||
|
||||
*this += m_check_Fullscreen;
|
||||
*this += m_check_DclickFullscreen;;
|
||||
*this += m_check_DclickFullscreen;;
|
||||
|
||||
*this += m_check_ExclusiveFS;
|
||||
*this += m_check_VsyncEnable;
|
||||
|
@ -113,7 +113,7 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel( wxWindow* parent )
|
|||
|
||||
void Panels::GSWindowSettingsPanel::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::GSWindowSettingsPanel::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
@ -129,7 +129,7 @@ void Panels::GSWindowSettingsPanel::ApplyConfigToGui( AppConfig& configToApply,
|
|||
|
||||
m_check_VsyncEnable ->SetValue( configToApply.EmuOptions.GS.VsyncEnable );
|
||||
|
||||
m_check_DclickFullscreen ->SetValue ( conf.IsToggleFullscreenOnDoubleClick );
|
||||
m_check_DclickFullscreen ->SetValue ( conf.IsToggleFullscreenOnDoubleClick );
|
||||
|
||||
m_text_WindowWidth ->SetValue( wxsFormat( L"%d", conf.WindowSize.GetWidth() ) );
|
||||
m_text_WindowHeight ->SetValue( wxsFormat( L"%d", conf.WindowSize.GetHeight() ) );
|
||||
|
@ -151,7 +151,7 @@ void Panels::GSWindowSettingsPanel::Apply()
|
|||
|
||||
gsconf.VsyncEnable = m_check_VsyncEnable->GetValue();
|
||||
|
||||
appconf.IsToggleFullscreenOnDoubleClick = m_check_DclickFullscreen->GetValue();
|
||||
appconf.IsToggleFullscreenOnDoubleClick = m_check_DclickFullscreen->GetValue();
|
||||
|
||||
long xr, yr;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
|
|||
m_check_Enable = new pxCheckBox( this, _("Enable game fixes"),
|
||||
pxE( "!Panel:Gamefixes:Compat Warning",
|
||||
L"Gamefixes can fix wrong emulation in some games. However "
|
||||
L"it can cause compatibility or performance issues in other games. You "
|
||||
L"it can cause compatibility or performance issues in other games. You "
|
||||
L"will need to turn off fixes manually when changing games."
|
||||
)
|
||||
);
|
||||
|
@ -117,7 +117,7 @@ void Panels::GameFixesPanel::Apply()
|
|||
g_Conf->EnableGameFixes = m_check_Enable->GetValue();
|
||||
|
||||
Pcsx2Config::GamefixOptions& opts( g_Conf->EmuOptions.Gamefixes );
|
||||
for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i)
|
||||
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).
|
||||
|
@ -126,23 +126,23 @@ void Panels::GameFixesPanel::Apply()
|
|||
|
||||
void Panels::GameFixesPanel::EnableStuff( AppConfig* configToUse )
|
||||
{
|
||||
if( !configToUse ) configToUse = g_Conf;
|
||||
for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i)
|
||||
m_checkbox[i]->Enable(m_check_Enable->GetValue() && !configToUse->EnablePresets);
|
||||
if( !configToUse ) configToUse = g_Conf;
|
||||
for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i)
|
||||
m_checkbox[i]->Enable(m_check_Enable->GetValue() && !configToUse->EnablePresets);
|
||||
}
|
||||
|
||||
void Panels::GameFixesPanel::OnEnable_Toggled( wxCommandEvent& evt )
|
||||
{
|
||||
AppConfig tmp=*g_Conf;
|
||||
tmp.EnablePresets=false; //if clicked, button was enabled, so not using a preset --> let EnableStuff work
|
||||
AppConfig tmp=*g_Conf;
|
||||
tmp.EnablePresets=false; //if clicked, button was enabled, so not using a preset --> let EnableStuff work
|
||||
|
||||
EnableStuff( &tmp );
|
||||
EnableStuff( &tmp );
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void Panels::GameFixesPanel::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::GameFixesPanel::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
|
|
@ -80,9 +80,9 @@ protected:
|
|||
wxString m_plugpath;
|
||||
wxDynamicLibrary m_plugin;
|
||||
|
||||
_PS2EgetLibType m_GetLibType;
|
||||
_PS2EgetLibName m_GetLibName;
|
||||
_PS2EgetLibVersion2 m_GetLibVersion2;
|
||||
_PS2EgetLibType m_GetLibType;
|
||||
_PS2EgetLibName m_GetLibName;
|
||||
_PS2EgetLibVersion2 m_GetLibVersion2;
|
||||
|
||||
u32 m_type;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ const wxChar* Panels::SpeedHacksPanel::GetEEcycleSliderMsg( int val )
|
|||
);
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return L"Unreachable Warning Suppressor!!";
|
||||
|
@ -71,8 +71,8 @@ const wxChar* Panels::SpeedHacksPanel::GetVUcycleSliderMsg( int val )
|
|||
L"3 - Maximum VU Cycle Stealing. Usefulness is limited, as this will cause flickering "
|
||||
L"visuals or slowdown in most games."
|
||||
);
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return L"Unreachable Warning Suppressor!!";
|
||||
|
@ -276,9 +276,9 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent )
|
|||
|
||||
void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse )
|
||||
{
|
||||
//Console.WriteLn("SpeedHacksPanel::EnableStuff: Using %s", configToUse?"Object":"NULL");
|
||||
if( !configToUse ) configToUse = g_Conf;
|
||||
//Console.WriteLn("SpeedHacksPanel::EnableStuff: EnabledPresets: %s", configToUse->EnablePresets?"true":"false");
|
||||
//Console.WriteLn("SpeedHacksPanel::EnableStuff: Using %s", configToUse?"Object":"NULL");
|
||||
if( !configToUse ) configToUse = g_Conf;
|
||||
//Console.WriteLn("SpeedHacksPanel::EnableStuff: EnabledPresets: %s", configToUse->EnablePresets?"true":"false");
|
||||
wxSizerItemList& items( s_table->GetChildren() );
|
||||
|
||||
wxSizerItemList::iterator it = items.begin();
|
||||
|
@ -293,14 +293,14 @@ void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse )
|
|||
|
||||
void Panels::SpeedHacksPanel::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
//Console.WriteLn("SpeedHacksPanel::AppStatusEvent_OnSettingsApplied()");
|
||||
//Console.WriteLn("SpeedHacksPanel::AppStatusEvent_OnSettingsApplied()");
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::SpeedHacksPanel::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
{
|
||||
const bool enabled = configToApply.EnableSpeedHacks;
|
||||
Pcsx2Config::SpeedhackOptions& opts=configToApply.EmuOptions.Speedhacks;
|
||||
Pcsx2Config::SpeedhackOptions& opts=configToApply.EmuOptions.Speedhacks;
|
||||
|
||||
m_check_Enable ->SetValue( !!enabled );
|
||||
|
||||
|
@ -322,9 +322,9 @@ void Panels::SpeedHacksPanel::ApplyConfigToGui( AppConfig& configToApply, bool m
|
|||
// Layout necessary to ensure changed slider text gets re-aligned properly
|
||||
Layout();
|
||||
|
||||
//Console.WriteLn("SpeedHacksPanel::ApplyConfigToGui: EnabledPresets: %s", configToApply.EnablePresets?"true":"false");
|
||||
//Console.WriteLn("SpeedHacksPanel::ApplyConfigToGui: EnabledPresets: %s", configToApply.EnablePresets?"true":"false");
|
||||
|
||||
this->Enable(!configToApply.EnablePresets);
|
||||
this->Enable(!configToApply.EnablePresets);
|
||||
}
|
||||
|
||||
|
||||
|
@ -351,20 +351,20 @@ void Panels::SpeedHacksPanel::Apply()
|
|||
|
||||
void Panels::SpeedHacksPanel::OnEnable_Toggled( wxCommandEvent& evt )
|
||||
{
|
||||
AppConfig tmp=*g_Conf;
|
||||
tmp.EnablePresets=false; //if clicked, button was enabled, so not using a preset --> let EnableStuff work
|
||||
AppConfig tmp=*g_Conf;
|
||||
tmp.EnablePresets=false; //if clicked, button was enabled, so not using a preset --> let EnableStuff work
|
||||
|
||||
EnableStuff( &tmp );
|
||||
EnableStuff( &tmp );
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void Panels::SpeedHacksPanel::Defaults_Click( wxCommandEvent& evt )
|
||||
{
|
||||
//Can only get here presets are disabled at the GUI (= the 'Defaults' button is enabled).
|
||||
AppConfig currentConfigWithHacksReset = *g_Conf;
|
||||
currentConfigWithHacksReset.EmuOptions.Speedhacks = Pcsx2Config::SpeedhackOptions();
|
||||
currentConfigWithHacksReset.EnablePresets=false;//speed hacks gui depends on preset, apply it as if presets are disabled
|
||||
ApplyConfigToGui( currentConfigWithHacksReset );
|
||||
//Can only get here presets are disabled at the GUI (= the 'Defaults' button is enabled).
|
||||
AppConfig currentConfigWithHacksReset = *g_Conf;
|
||||
currentConfigWithHacksReset.EmuOptions.Speedhacks = Pcsx2Config::SpeedhackOptions();
|
||||
currentConfigWithHacksReset.EnablePresets=false;//speed hacks gui depends on preset, apply it as if presets are disabled
|
||||
ApplyConfigToGui( currentConfigWithHacksReset );
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
|
@ -394,12 +394,12 @@ void Panels::SpeedHacksPanel::Slider_Click(wxScrollEvent &event) {
|
|||
|
||||
void Panels::SpeedHacksPanel::EECycleRate_Scroll(wxScrollEvent &event)
|
||||
{
|
||||
SetEEcycleSliderMsg();
|
||||
SetEEcycleSliderMsg();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void Panels::SpeedHacksPanel::VUCycleRate_Scroll(wxScrollEvent &event)
|
||||
{
|
||||
SetVUcycleSliderMsg();
|
||||
SetVUcycleSliderMsg();
|
||||
event.Skip();
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ Panels::FramelimiterPanel::FramelimiterPanel( wxWindow* parent )
|
|||
|
||||
void Panels::FramelimiterPanel::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::FramelimiterPanel::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
@ -131,11 +131,11 @@ void Panels::FramelimiterPanel::ApplyConfigToGui( AppConfig& configToApply, bool
|
|||
m_text_BaseNtsc ->SetValue( gsconf.FramerateNTSC.ToString() );
|
||||
m_text_BasePal ->SetValue( gsconf.FrameratePAL.ToString() );
|
||||
|
||||
m_spin_NominalPct ->Enable(!configToApply.EnablePresets);
|
||||
m_spin_TurboPct ->Enable(!configToApply.EnablePresets);
|
||||
m_spin_SlomoPct ->Enable(!configToApply.EnablePresets);
|
||||
m_text_BaseNtsc ->Enable(!configToApply.EnablePresets);
|
||||
m_text_BasePal ->Enable(!configToApply.EnablePresets);
|
||||
m_spin_NominalPct ->Enable(!configToApply.EnablePresets);
|
||||
m_spin_TurboPct ->Enable(!configToApply.EnablePresets);
|
||||
m_spin_SlomoPct ->Enable(!configToApply.EnablePresets);
|
||||
m_text_BaseNtsc ->Enable(!configToApply.EnablePresets);
|
||||
m_text_BasePal ->Enable(!configToApply.EnablePresets);
|
||||
}
|
||||
|
||||
void Panels::FramelimiterPanel::Apply()
|
||||
|
@ -248,7 +248,7 @@ Panels::FrameSkipPanel::FrameSkipPanel( wxWindow* parent )
|
|||
|
||||
void Panels::FrameSkipPanel::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
ApplyConfigToGui( *g_Conf );
|
||||
}
|
||||
|
||||
void Panels::FrameSkipPanel::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate )
|
||||
|
@ -369,7 +369,7 @@ void Panels::VideoPanel::Apply()
|
|||
|
||||
void Panels::VideoPanel::AppStatusEvent_OnSettingsApplied()
|
||||
{
|
||||
ApplyConfigToGui(*g_Conf);
|
||||
ApplyConfigToGui(*g_Conf);
|
||||
}
|
||||
|
||||
void Panels::VideoPanel::ApplyConfigToGui( AppConfig& configToApply, bool manuallyPropagate ){
|
||||
|
@ -380,10 +380,10 @@ void Panels::VideoPanel::ApplyConfigToGui( AppConfig& configToApply, bool manual
|
|||
m_check_SynchronousGS->Enable(!configToApply.EnablePresets);
|
||||
m_check_DisableOutput->Enable(!configToApply.EnablePresets);
|
||||
|
||||
if( manuallyPropagate )
|
||||
{
|
||||
m_span->ApplyConfigToGui( configToApply, true );
|
||||
m_fpan->ApplyConfigToGui( configToApply, true );
|
||||
}
|
||||
if( manuallyPropagate )
|
||||
{
|
||||
m_span->ApplyConfigToGui( configToApply, true );
|
||||
m_fpan->ApplyConfigToGui( configToApply, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue