Move controller binding to client.common, and some global stuff
This commit is contained in:
parent
40f143e4ad
commit
cf6e72aad4
|
@ -89,6 +89,7 @@
|
|||
<Compile Include="config\Binding.cs" />
|
||||
<Compile Include="config\Config.cs" />
|
||||
<Compile Include="config\ConfigService.cs" />
|
||||
<Compile Include="ControllerBinding.cs" />
|
||||
<Compile Include="CoreFileProvider.cs" />
|
||||
<Compile Include="FirmwareManager.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
namespace BizHawk.Client.Common
|
||||
{
|
||||
public class Controller : IController
|
||||
{
|
|
@ -14,5 +14,10 @@
|
|||
/// </summary>
|
||||
public static MultitrackRewiringControllerAdapter MultitrackRewiringControllerAdapter = new MultitrackRewiringControllerAdapter();
|
||||
public static MovieSession MovieSession = new MovieSession();
|
||||
|
||||
/// <summary>
|
||||
/// whether throttling is force-disabled by use of fast forward
|
||||
/// </summary>
|
||||
public static bool ForceNoThrottle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,7 +280,6 @@
|
|||
<Compile Include="DisplayManager\DisplayManager.cs" />
|
||||
<Compile Include="DisplayManager\Filters\Hq2x.cs" />
|
||||
<Compile Include="GlobalWinF.cs" />
|
||||
<Compile Include="Input\ControllerBinding.cs" />
|
||||
<Compile Include="Input\GamePad.cs" Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
<Compile Include="Input\GamePad360.cs" />
|
||||
<Compile Include="Input\Input.cs" />
|
||||
|
|
|
@ -22,11 +22,6 @@ namespace BizHawk.MultiClient
|
|||
public static Controller NullControls;
|
||||
public static AutofireController AutofireNullControls;
|
||||
|
||||
/// <summary>
|
||||
/// whether throttling is force-disabled by use of fast forward
|
||||
/// </summary>
|
||||
public static bool ForceNoThrottle;
|
||||
|
||||
//the movie will be spliced inbetween these if it is present
|
||||
public static CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter();
|
||||
public static CopyControllerAdapter MovieOutputHardpoint = new CopyControllerAdapter();
|
||||
|
|
|
@ -625,7 +625,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
bool fastforward = GlobalWinF.ClientControls["Fast Forward"] || FastForward;
|
||||
bool superfastforward = GlobalWinF.ClientControls["Turbo"];
|
||||
GlobalWinF.ForceNoThrottle = unthrottled || fastforward;
|
||||
Global.ForceNoThrottle = unthrottled || fastforward;
|
||||
|
||||
// realtime throttle is never going to be so exact that using a double here is wrong
|
||||
throttle.SetCoreFps(Global.Emulator.CoreComm.VsyncRate);
|
||||
|
|
|
@ -392,7 +392,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
get
|
||||
{
|
||||
if (GlobalWinF.ForceNoThrottle)
|
||||
if (Global.ForceNoThrottle)
|
||||
return false;
|
||||
return Global.Config.VSyncThrottle || Global.Config.VSync;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
samplesProvided = 2 * nsampgot;
|
||||
|
||||
if (!GlobalWinF.ForceNoThrottle)
|
||||
if (!Global.ForceNoThrottle)
|
||||
while (samplesNeeded < samplesProvided)
|
||||
{
|
||||
System.Threading.Thread.Sleep((samplesProvided - samplesNeeded) / 88); // let audio clock control sleep time
|
||||
|
|
Loading…
Reference in New Issue