GUI: Exclude Turbo/SlowMo factors from the presets. (Now can keep custom turbo/slowmo speeds while still using the presets)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5029 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
avihal 2011-12-28 22:59:16 +00:00
parent 6f97ca35e2
commit f550ffe991
2 changed files with 16 additions and 8 deletions

View File

@ -870,6 +870,7 @@ bool AppConfig::IsOkApplyPreset(int n)
//Have some original and default values at hand to be used later.
Pcsx2Config::GSOptions original_GS = EmuOptions.GS;
AppConfig::FramerateOptions original_Framerate = Framerate;
AppConfig default_AppConfig;
Pcsx2Config default_Pcsx2Config;
@ -878,7 +879,7 @@ bool AppConfig::IsOkApplyPreset(int n)
// 1. The panels/entities should prevent manual modifications (by graying out) of settings which the presets control.
// 2. The panels should not apply values which the presets don't control if the value is initiated by a preset.
// Currently controlled by the presets:
// - AppConfig: Framerate, EnableSpeedHacks, EnableGameFixes.
// - AppConfig: Framerate (except turbo/slowmo factors), EnableSpeedHacks, EnableGameFixes.
// - EmuOptions: Cpu, Gamefixes, SpeedHacks, EnablePatches, GS (except for FrameLimitEnable, VsyncEnable and ManagedVsync).
//
// This essentially currently covers all the options on all the panels except for framelimiter which isn't
@ -891,6 +892,9 @@ bool AppConfig::IsOkApplyPreset(int n)
//Force some settings as a (current) base for all presets.
Framerate = default_AppConfig.Framerate;
Framerate.SlomoScalar = original_Framerate.SlomoScalar;
Framerate.TurboScalar = original_Framerate.TurboScalar;
EnableSpeedHacks = false;
EnableGameFixes = false;
@ -898,7 +902,7 @@ bool AppConfig::IsOkApplyPreset(int n)
EmuOptions.GS = default_Pcsx2Config.GS;
EmuOptions.GS.FrameLimitEnable = original_GS.FrameLimitEnable; //Frame limiter is not modified by presets
//EmuOptions.GS.VsyncEnable = original_GS.VsyncEnable;
//EmuOptions.GS.ManagedVsync = original_GS.ManagedVsync;
//EmuOptions.GS.ManagedVsync = original_GS.ManagedVsync;
EmuOptions.Cpu = default_Pcsx2Config.Cpu;
EmuOptions.Gamefixes = default_Pcsx2Config.Gamefixes;

View File

@ -114,19 +114,23 @@ void Panels::FramelimiterPanel::ApplyConfigToGui( AppConfig& configToApply, int
const AppConfig::FramerateOptions& appfps( configToApply.Framerate );
const Pcsx2Config::GSOptions& gsconf( configToApply.EmuOptions.GS );
if( ! (flags & AppConfig::APPLY_FLAG_FROM_PRESET) ) //Presets don't control this: only change if config doesn't come from preset.
if( ! (flags & AppConfig::APPLY_FLAG_FROM_PRESET) ){ //Presets don't control these: only change if config doesn't come from preset.
m_check_LimiterDisable->SetValue( !gsconf.FrameLimitEnable );
m_spin_NominalPct ->SetValue( appfps.NominalScalar.Raw );
m_spin_TurboPct ->SetValue( appfps.TurboScalar.Raw );
m_spin_SlomoPct ->SetValue( appfps.SlomoScalar.Raw );
m_spin_TurboPct ->SetValue( appfps.TurboScalar.Raw );
m_spin_SlomoPct ->SetValue( appfps.SlomoScalar.Raw );
m_spin_TurboPct ->Enable( 1 );
m_spin_SlomoPct ->Enable( 1 );
}
m_text_BaseNtsc ->ChangeValue( gsconf.FramerateNTSC.ToString() );
m_text_BasePal ->ChangeValue( gsconf.FrameratePAL.ToString() );
m_spin_NominalPct ->SetValue( appfps.NominalScalar.Raw );
m_spin_NominalPct ->Enable(!configToApply.EnablePresets);
m_spin_TurboPct ->Enable(!configToApply.EnablePresets);
m_spin_SlomoPct ->Enable(!configToApply.EnablePresets);
// Vsync timing controls only on devel builds / via manual ini editing
#ifdef PCSX2_DEVBUILD
m_text_BaseNtsc ->Enable(!configToApply.EnablePresets);