Add novel throttle experiment (locked behind build flag for now)
:)
This commit is contained in:
parent
72f880db27
commit
d3362f5e0c
|
@ -48,6 +48,11 @@ namespace BizHawk.Client.Common
|
|||
|
||||
private readonly Dictionary<string, FeedbackBind> _feedbackBindings = new Dictionary<string, FeedbackBind>();
|
||||
|
||||
#if BIZHAWKBUILD_SUPERHAWK
|
||||
public bool AnyInputHeld
|
||||
=> _buttons.ContainsValue(true) || _axes.Any(kvp => kvp.Value != _axisRanges[kvp.Key].Neutral);
|
||||
#endif
|
||||
|
||||
public bool this[string button] => IsPressed(button);
|
||||
|
||||
// Looks for bindings which are activated by the supplied physical button.
|
||||
|
|
|
@ -203,6 +203,9 @@ namespace BizHawk.Client.Common
|
|||
public bool Unthrottled { get; set; } = false;
|
||||
public bool AutoMinimizeSkipping { get; set; } = true;
|
||||
public bool VSyncThrottle { get; set; } = false;
|
||||
#if BIZHAWKBUILD_SUPERHAWK
|
||||
public bool SuperHawkThrottle { get; set; } = false;
|
||||
#endif
|
||||
|
||||
public RewindConfig Rewind { get; set; } = new RewindConfig();
|
||||
|
||||
|
|
|
@ -75,6 +75,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
#if BIZHAWKBUILD_SUPERHAWK
|
||||
ToolStripMenuItemEx superHawkThrottleMenuItem = new() { Text = "SUPER·HAWK" };
|
||||
superHawkThrottleMenuItem.Click += (_, _) => Config.SuperHawkThrottle = !Config.SuperHawkThrottle;
|
||||
SpeedSkipSubMenu.DropDownItems.Insert(
|
||||
SpeedSkipSubMenu.DropDownItems.IndexOf(MinimizeSkippingMenuItem),
|
||||
superHawkThrottleMenuItem);
|
||||
ConfigSubMenu.DropDownOpened += (_, _) => superHawkThrottleMenuItem.Checked = Config.SuperHawkThrottle;
|
||||
#endif
|
||||
|
||||
foreach (var (appliesTo, coreNames) in Config.CorePickerUIData)
|
||||
{
|
||||
var submenu = new ToolStripMenuItem { Text = string.Join(" | ", appliesTo) };
|
||||
|
@ -2976,7 +2985,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
_frameAdvanceTimestamp = 0;
|
||||
}
|
||||
|
||||
#if BIZHAWKBUILD_SUPERHAWK
|
||||
if (!EmulatorPaused && (!Config.SuperHawkThrottle || InputManager.ClientControls.AnyInputHeld))
|
||||
#else
|
||||
if (!EmulatorPaused)
|
||||
#endif
|
||||
{
|
||||
runFrame = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue