Similar property in Multihawk
This commit is contained in:
parent
d95df349a1
commit
f0e6574def
|
@ -107,6 +107,14 @@ namespace BizHawk.Client.MultiHawk
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: make this an actual property, set it when loading a Rom, and pass it dialogs, etc
|
||||||
|
// This is a quick hack to reduce the dependency on Global.Emulator
|
||||||
|
public IEmulator Emulator
|
||||||
|
{
|
||||||
|
get { return Global.Emulator; }
|
||||||
|
set { Global.Emulator = value; }
|
||||||
|
}
|
||||||
|
|
||||||
private static bool StateErrorAskUser(string title, string message)
|
private static bool StateErrorAskUser(string title, string message)
|
||||||
{
|
{
|
||||||
var result = MessageBox.Show(
|
var result = MessageBox.Show(
|
||||||
|
@ -191,7 +199,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
Global.ClientControls = controls;
|
Global.ClientControls = controls;
|
||||||
Global.AutofireNullControls = new AutofireController(NullEmulator.NullController, Global.Emulator);
|
Global.AutofireNullControls = new AutofireController(NullEmulator.NullController, Emulator);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenRomMenuItem_Click(object sender, EventArgs e)
|
private void OpenRomMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -272,7 +280,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
if (EmulatorWindows.First() == ew)
|
if (EmulatorWindows.First() == ew)
|
||||||
{
|
{
|
||||||
Global.Emulator = ew.Emulator;
|
Emulator = ew.Emulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -363,7 +371,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
if (EmulatorWindows.Count == 1)
|
if (EmulatorWindows.Count == 1)
|
||||||
{
|
{
|
||||||
Global.Emulator = ew.Emulator;
|
Emulator = ew.Emulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
_inputManager.SyncControls();
|
_inputManager.SyncControls();
|
||||||
|
@ -629,7 +637,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
//Global.ActiveController.ApplyAxisConstraints(
|
//Global.ActiveController.ApplyAxisConstraints(
|
||||||
// (Global.Emulator is N64 && Global.Config.N64UseCircularAnalogConstraint) ? "Natural Circle" : null);
|
// (Emulator is N64 && Global.Config.N64UseCircularAnalogConstraint) ? "Natural Circle" : null);
|
||||||
|
|
||||||
Global.ActiveController.OR_FromLogical(Global.ClickyVirtualPadController);
|
Global.ActiveController.OR_FromLogical(Global.ClickyVirtualPadController);
|
||||||
Global.AutoFireController.LatchFromPhysical(Global.ControllerInputCoalescer);
|
Global.AutoFireController.LatchFromPhysical(Global.ControllerInputCoalescer);
|
||||||
|
@ -1192,7 +1200,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Global.MovieSession.QueueNewMovie(movie, record, Global.Emulator);
|
Global.MovieSession.QueueNewMovie(movie, record, Emulator);
|
||||||
}
|
}
|
||||||
catch (MoviePlatformMismatchException ex)
|
catch (MoviePlatformMismatchException ex)
|
||||||
{
|
{
|
||||||
|
@ -1202,7 +1210,7 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
RebootCoresMenuItem_Click(null, null);
|
RebootCoresMenuItem_Click(null, null);
|
||||||
|
|
||||||
Global.Emulator = EmulatorWindows.Master.Emulator;
|
Emulator = EmulatorWindows.Master.Emulator;
|
||||||
|
|
||||||
if (Global.MovieSession.PreviousNES_InQuickNES.HasValue)
|
if (Global.MovieSession.PreviousNES_InQuickNES.HasValue)
|
||||||
{
|
{
|
||||||
|
@ -1272,15 +1280,15 @@ namespace BizHawk.Client.MultiHawk
|
||||||
EmulatorWindows.Remove(ew);
|
EmulatorWindows.Remove(ew);
|
||||||
WorkspacePanel.Controls.Remove(ew);
|
WorkspacePanel.Controls.Remove(ew);
|
||||||
|
|
||||||
if (ew.Emulator == Global.Emulator)
|
if (ew.Emulator == Emulator)
|
||||||
{
|
{
|
||||||
if (EmulatorWindows.Any())
|
if (EmulatorWindows.Any())
|
||||||
{
|
{
|
||||||
Global.Emulator = EmulatorWindows.Master.Emulator;
|
Emulator = EmulatorWindows.Master.Emulator;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Global.Emulator = null;
|
Emulator = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1474,33 +1482,33 @@ namespace BizHawk.Client.MultiHawk
|
||||||
|
|
||||||
private void ViewSubMenu_DropDownOpened(object sender, EventArgs e)
|
private void ViewSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_1xMenuItem.Checked = Global.Config.TargetZoomFactors[Global.Emulator.SystemId] == 1;
|
_1xMenuItem.Checked = Global.Config.TargetZoomFactors[Emulator.SystemId] == 1;
|
||||||
_2xMenuItem.Checked = Global.Config.TargetZoomFactors[Global.Emulator.SystemId] == 2;
|
_2xMenuItem.Checked = Global.Config.TargetZoomFactors[Emulator.SystemId] == 2;
|
||||||
_3xMenuItem.Checked = Global.Config.TargetZoomFactors[Global.Emulator.SystemId] == 3;
|
_3xMenuItem.Checked = Global.Config.TargetZoomFactors[Emulator.SystemId] == 3;
|
||||||
_4xMenuItem.Checked = Global.Config.TargetZoomFactors[Global.Emulator.SystemId] == 4;
|
_4xMenuItem.Checked = Global.Config.TargetZoomFactors[Emulator.SystemId] == 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _1xMenuItem_Click(object sender, EventArgs e)
|
private void _1xMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Global.Config.TargetZoomFactors[Global.Emulator.SystemId] = 1;
|
Global.Config.TargetZoomFactors[Emulator.SystemId] = 1;
|
||||||
ReRenderAllWindows();
|
ReRenderAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _2xMenuItem_Click(object sender, EventArgs e)
|
private void _2xMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Global.Config.TargetZoomFactors[Global.Emulator.SystemId] = 2;
|
Global.Config.TargetZoomFactors[Emulator.SystemId] = 2;
|
||||||
ReRenderAllWindows();
|
ReRenderAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _3xMenuItem_Click(object sender, EventArgs e)
|
private void _3xMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Global.Config.TargetZoomFactors[Global.Emulator.SystemId] = 3;
|
Global.Config.TargetZoomFactors[Emulator.SystemId] = 3;
|
||||||
ReRenderAllWindows();
|
ReRenderAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _4xMenuItem_Click(object sender, EventArgs e)
|
private void _4xMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Global.Config.TargetZoomFactors[Global.Emulator.SystemId] = 4;
|
Global.Config.TargetZoomFactors[Emulator.SystemId] = 4;
|
||||||
ReRenderAllWindows();
|
ReRenderAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue