void Framelimiter_TurboToggle() { ScopedCoreThreadPause pauser; if( !g_Conf->EmuOptions.GS.FrameLimitEnable ) { g_Conf->EmuOptions.GS.FrameLimitEnable = true; g_LimiterMode = Limit_Turbo; g_Conf->EmuOptions.GS.LimitScalar = g_Conf->Framerate.TurboScalar; Console.WriteLn("(FrameLimiter) Turbo + FrameLimit ENABLED." ); if ( g_Conf->Framerate.SkipOnTurbo == true) g_Conf->EmuOptions.GS.FrameSkipEnable = true; else g_Conf->EmuOptions.GS.FrameSkipEnable = false; } else if( g_LimiterMode == Limit_Turbo ) { GSsetVsync( g_Conf->EmuOptions.GS.VsyncEnable ); g_LimiterMode = Limit_Nominal; g_Conf->EmuOptions.GS.LimitScalar = g_Conf->Framerate.NominalScalar; if ( g_Conf->Framerate.SkipOnLimit == true) { Console.WriteLn("(FrameLimiter) Turbo DISABLED. Frameskip ENABLED" ); g_Conf->EmuOptions.GS.FrameSkipEnable = true; } else { Console.WriteLn("(FrameLimiter) Turbo DISABLED." ); g_Conf->EmuOptions.GS.FrameSkipEnable = false; } } else { GSsetVsync( false ); g_LimiterMode = Limit_Turbo; g_Conf->EmuOptions.GS.LimitScalar = g_Conf->Framerate.TurboScalar; if ( g_Conf->Framerate.SkipOnTurbo == true) { Console.WriteLn("(FrameLimiter) Turbo + Frameskip ENABLED." ); g_Conf->EmuOptions.GS.FrameSkipEnable = true; } else { Console.WriteLn("(FrameLimiter) Turbo ENABLED." ); g_Conf->EmuOptions.GS.FrameSkipEnable = false; } } pauser.AllowResume(); }
void Framelimiter_SlomoToggle() { // Slow motion auto-enables the framelimiter even if it's disabled. // This seems like desirable and expected behavior. // FIXME: Inconsistent use of g_Conf->EmuOptions vs. EmuConfig. Should figure // out a better consistency approach... -air ScopedCoreThreadPause pauser; GSsetVsync( g_Conf->EmuOptions.GS.VsyncEnable ); if( g_LimiterMode == Limit_Slomo ) { g_LimiterMode = Limit_Nominal; g_Conf->EmuOptions.GS.LimitScalar = g_Conf->Framerate.NominalScalar; Console.WriteLn("(FrameLimiter) SlowMotion DISABLED." ); } else { g_LimiterMode = Limit_Slomo; g_Conf->EmuOptions.GS.LimitScalar = g_Conf->Framerate.SlomoScalar; Console.WriteLn("(FrameLimiter) SlowMotion ENABLED." ); g_Conf->EmuOptions.GS.FrameLimitEnable = true; } pauser.AllowResume(); }
void AppCoreThread::ApplySettings( const Pcsx2Config& src ) { // Re-entry guard protects against cases where code wants to manually set core settings // which are not part of g_Conf. The subsequent call to apply g_Conf settings (which is // usually the desired behavior) will be ignored. Pcsx2Config fixup; _ApplySettings(src, fixup); static int localc = 0; RecursionGuard guard( localc ); if( guard.IsReentrant() ) return; if( fixup == EmuConfig ) return; if( m_ExecMode >= ExecMode_Opened ) { ScopedCoreThreadPause paused_core; _parent::ApplySettings( fixup ); paused_core.AllowResume(); } else { _parent::ApplySettings( fixup ); } if (m_ExecMode >= ExecMode_Paused) GSsetVsync(EmuConfig.GS.GetVsync()); }
void Framelimiter_MasterToggle() { ScopedCoreThreadPause pauser; g_Conf->EmuOptions.GS.FrameLimitEnable = !g_Conf->EmuOptions.GS.FrameLimitEnable; GSsetVsync( g_Conf->EmuOptions.GS.FrameLimitEnable && g_Conf->EmuOptions.GS.VsyncEnable ); Console.WriteLn("(FrameLimiter) %s.", g_Conf->EmuOptions.GS.FrameLimitEnable ? "ENABLED" : "DISABLED" ); pauser.AllowResume(); }