"Unthrottled" should be saved to config
This commit is contained in:
parent
007442773a
commit
853b0fdd85
|
@ -155,7 +155,8 @@ namespace BizHawk.Client.Common
|
|||
public int FrameSkip { get; set; } = 4;
|
||||
public int SpeedPercent { get; set; } = 100;
|
||||
public int SpeedPercentAlternate { get; set; } = 400;
|
||||
public bool ClockThrottle { get; set; }= true;
|
||||
public bool ClockThrottle { get; set; } = true;
|
||||
public bool Unthrottled { get; set; } = false;
|
||||
public bool AutoMinimizeSkipping { get; set; } = true;
|
||||
public bool VSyncThrottle { get; set; } = false;
|
||||
|
||||
|
|
|
@ -815,7 +815,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Speed400MenuItem.Enabled =
|
||||
Config.ClockThrottle;
|
||||
|
||||
miUnthrottled.Checked = _unthrottled;
|
||||
miUnthrottled.Checked = Config.Unthrottled;
|
||||
}
|
||||
|
||||
private void KeyPriorityMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
|
@ -1047,7 +1047,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void UnthrottledMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
_unthrottled ^= true;
|
||||
Config.Unthrottled ^= true;
|
||||
ThrottleMessage();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
FrameInch = true;
|
||||
return false;
|
||||
case "Toggle Throttle":
|
||||
_unthrottled ^= true;
|
||||
Config.Unthrottled ^= true;
|
||||
ThrottleMessage();
|
||||
break;
|
||||
case "Soft Reset":
|
||||
|
|
|
@ -1374,12 +1374,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void Unthrottle()
|
||||
{
|
||||
_unthrottled = true;
|
||||
Config.Unthrottled = true;
|
||||
}
|
||||
|
||||
public void Throttle()
|
||||
{
|
||||
_unthrottled = false;
|
||||
Config.Unthrottled = false;
|
||||
}
|
||||
|
||||
private void ThrottleMessage()
|
||||
|
@ -1400,7 +1400,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
type = ":Clock";
|
||||
}
|
||||
|
||||
string throttled = _unthrottled ? "Unthrottled" : "Throttled";
|
||||
string throttled = Config.Unthrottled ? "Unthrottled" : "Throttled";
|
||||
string msg = $"{throttled}{type} ";
|
||||
|
||||
AddOnScreenMessage(msg);
|
||||
|
@ -1617,7 +1617,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
public int GetApproxFramerate() => _lastFpsRounded;
|
||||
|
||||
private readonly Throttle _throttle;
|
||||
private bool _unthrottled;
|
||||
|
||||
// For handling automatic pausing when entering the menu
|
||||
private bool _wasPaused;
|
||||
|
@ -2201,12 +2200,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
speedPercent = Math.Max(speedPercent / Rewinder.RewindFrequency, 5);
|
||||
}
|
||||
|
||||
DisableSecondaryThrottling = _unthrottled || turbo || fastForward || rewind;
|
||||
DisableSecondaryThrottling = Config.Unthrottled || turbo || fastForward || rewind;
|
||||
|
||||
// realtime throttle is never going to be so exact that using a double here is wrong
|
||||
_throttle.SetCoreFps(Emulator.VsyncRate());
|
||||
_throttle.signal_paused = EmulatorPaused;
|
||||
_throttle.signal_unthrottle = _unthrottled || turbo;
|
||||
_throttle.signal_unthrottle = Config.Unthrottled || turbo;
|
||||
|
||||
// zero 26-mar-2016 - vsync and vsync throttle here both is odd, but see comments elsewhere about triple buffering
|
||||
_throttle.signal_overrideSecondaryThrottle = (fastForward || rewind) && (Config.SoundThrottle || Config.VSyncThrottle || Config.VSync);
|
||||
|
@ -3034,7 +3033,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if ((runFrame || force) && !BlockFrameAdvance)
|
||||
{
|
||||
var isFastForwarding = InputManager.ClientControls["Fast Forward"] || IsTurboing || InvisibleEmulation;
|
||||
var isFastForwardingOrRewinding = isFastForwarding || isRewinding || _unthrottled;
|
||||
var isFastForwardingOrRewinding = isFastForwarding || isRewinding || Config.Unthrottled;
|
||||
|
||||
if (isFastForwardingOrRewinding != _lastFastForwardingOrRewinding)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue