From 4fa6b94c1dd1da480b45766a73ba0d186b4b030e Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 17 May 2014 20:02:10 +0000 Subject: [PATCH] Hook up N64 to circular analog constraint, put in config, on by default. Still todo: UI for the user to modify this variable --- BizHawk.Client.Common/config/Config.cs | 3 +++ BizHawk.Client.EmuHawk/MainForm.cs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 94d56df7f6..a921b57d1f 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -97,6 +97,9 @@ namespace BizHawk.Client.Common public enum SaveStateTypeE { Default, Binary, Text }; public SaveStateTypeE SaveStateType = SaveStateTypeE.Default; + // N64 + public bool N64UseCircularAnalogConstraint = true; + // Run-Control settings public int FrameProgressDelayMs = 500; // how long until a frame advance hold turns into a frame progress? public int FrameSkip = 4; diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 668ce2fe54..8df776a42f 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -24,6 +24,7 @@ using BizHawk.Emulation.Cores.Sega.MasterSystem; using BizHawk.Emulation.Cores.Sega.Saturn; using BizHawk.Emulation.Cores.Sony.PSP; using BizHawk.Emulation.DiscSystem; +using BizHawk.Emulation.Cores.Nintendo.N64; namespace BizHawk.Client.EmuHawk { @@ -430,8 +431,8 @@ namespace BizHawk.Client.EmuHawk Global.ActiveController.LatchFromPhysical(Global.ControllerInputCoalescer); - //TODO - use preferences to apply this - Global.ActiveController.ApplyAxisConstraints("Natural Circle"); + Global.ActiveController.ApplyAxisConstraints( + (Global.Emulator is N64 && Global.Config.N64UseCircularAnalogConstraint) ? "Natural Circle" : null); Global.ActiveController.OR_FromLogical(Global.ClickyVirtualPadController); Global.ActiveController.Overrides(Global.LuaAndAdaptor);