Move controller binding to client.common, and some global stuff

This commit is contained in:
adelikat 2013-10-25 17:14:24 +00:00
parent 40f143e4ad
commit cf6e72aad4
8 changed files with 10 additions and 12 deletions

View File

@ -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" />

View File

@ -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
{

View File

@ -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;
}
}

View File

@ -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" />

View File

@ -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();

View File

@ -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);

View File

@ -392,7 +392,7 @@ namespace BizHawk.MultiClient
{
get
{
if (GlobalWinF.ForceNoThrottle)
if (Global.ForceNoThrottle)
return false;
return Global.Config.VSyncThrottle || Global.Config.VSync;
}

View File

@ -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