fix #1862, also rename front facing setting ("non-vi" makes no sense here)
This commit is contained in:
parent
bc432de43a
commit
94f6616e74
|
@ -1765,7 +1765,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//
|
//
|
||||||
// MupenStyleLagMenuItem
|
// MupenStyleLagMenuItem
|
||||||
//
|
//
|
||||||
this.MupenStyleLagMenuItem.Text = "&Non-VI Lag Frames";
|
this.MupenStyleLagMenuItem.Text = "&Mupen Style Lag Frames";
|
||||||
this.MupenStyleLagMenuItem.Click += new System.EventHandler(this.MupenStyleLagMenuItem_Click);
|
this.MupenStyleLagMenuItem.Click += new System.EventHandler(this.MupenStyleLagMenuItem_Click);
|
||||||
//
|
//
|
||||||
// N64ExpansionSlotMenuItem
|
// N64ExpansionSlotMenuItem
|
||||||
|
|
|
@ -1818,7 +1818,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Config.N64UseCircularAnalogConstraint ^= true;
|
Config.N64UseCircularAnalogConstraint ^= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Mupen64PlusSetNonVILagFrames(bool newValue, ISettingsAdapter settable)
|
private static void Mupen64PlusSetMupenStyleLag(bool newValue, ISettingsAdapter settable)
|
||||||
{
|
{
|
||||||
var s = (N64Settings) settable.GetSettings();
|
var s = (N64Settings) settable.GetSettings();
|
||||||
s.UseMupenStyleLag = newValue;
|
s.UseMupenStyleLag = newValue;
|
||||||
|
@ -1826,7 +1826,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MupenStyleLagMenuItem_Click(object sender, EventArgs e)
|
private void MupenStyleLagMenuItem_Click(object sender, EventArgs e)
|
||||||
=> Mupen64PlusSetNonVILagFrames(!((ToolStripMenuItem) sender).Checked, GetSettingsAdapterForLoadedCore<N64>());
|
=> Mupen64PlusSetMupenStyleLag(!((ToolStripMenuItem) sender).Checked, GetSettingsAdapterForLoadedCore<N64>());
|
||||||
|
|
||||||
private void Mupen64PlusSetUseExpansionSlot(bool newValue, ISettingsAdapter settable)
|
private void Mupen64PlusSetUseExpansionSlot(bool newValue, ISettingsAdapter settable)
|
||||||
{
|
{
|
||||||
|
@ -2842,9 +2842,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var mupen64PlusGraphicsSettingsItem = CreateSettingsItem("Video Plugins...", N64PluginSettingsMenuItem_Click);
|
var mupen64PlusGraphicsSettingsItem = CreateSettingsItem("Video Plugins...", N64PluginSettingsMenuItem_Click);
|
||||||
var mupen64PlusGamepadSettingsItem = CreateSettingsItem("Controller Settings...", (_, _) => OpenMupen64PlusGamepadSettingsDialog(GetSettingsAdapterFor<N64>()));
|
var mupen64PlusGamepadSettingsItem = CreateSettingsItem("Controller Settings...", (_, _) => OpenMupen64PlusGamepadSettingsDialog(GetSettingsAdapterFor<N64>()));
|
||||||
var mupen64PlusAnalogConstraintItem = CreateSettingsItem("Circular Analog Range", N64CircularAnalogRangeMenuItem_Click);
|
var mupen64PlusAnalogConstraintItem = CreateSettingsItem("Circular Analog Range", N64CircularAnalogRangeMenuItem_Click);
|
||||||
var mupen64PlusNonVILagFramesItem = CreateSettingsItem("Non-VI Lag Frames", (sender, _) => Mupen64PlusSetNonVILagFrames(!((ToolStripMenuItem) sender).Checked, GetSettingsAdapterFor<N64>()));
|
var mupen64PlusMupenStyleLagFramesItem = CreateSettingsItem("Mupen Style Lag Frames", (sender, _) => Mupen64PlusSetMupenStyleLag(!((ToolStripMenuItem) sender).Checked, GetSettingsAdapterFor<N64>()));
|
||||||
var mupen64PlusUseExpansionSlotItem = CreateSettingsItem("Use Expansion Slot", (sender, _) => Mupen64PlusSetUseExpansionSlot(!((ToolStripMenuItem) sender).Checked, GetSettingsAdapterFor<N64>()));
|
var mupen64PlusUseExpansionSlotItem = CreateSettingsItem("Use Expansion Slot", (sender, _) => Mupen64PlusSetUseExpansionSlot(!((ToolStripMenuItem) sender).Checked, GetSettingsAdapterFor<N64>()));
|
||||||
var mupen64PlusSubmenu = CreateCoreSubmenu(VSystemCategory.Consoles, CoreNames.Mupen64Plus, mupen64PlusGraphicsSettingsItem, mupen64PlusGamepadSettingsItem, mupen64PlusAnalogConstraintItem, mupen64PlusNonVILagFramesItem, mupen64PlusUseExpansionSlotItem);
|
var mupen64PlusSubmenu = CreateCoreSubmenu(VSystemCategory.Consoles, CoreNames.Mupen64Plus, mupen64PlusGraphicsSettingsItem, mupen64PlusGamepadSettingsItem, mupen64PlusAnalogConstraintItem, mupen64PlusMupenStyleLagFramesItem, mupen64PlusUseExpansionSlotItem);
|
||||||
mupen64PlusSubmenu.DropDownOpened += (_, _) =>
|
mupen64PlusSubmenu.DropDownOpened += (_, _) =>
|
||||||
{
|
{
|
||||||
var settable = GetSettingsAdapterFor<N64>();
|
var settable = GetSettingsAdapterFor<N64>();
|
||||||
|
@ -2855,7 +2855,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
mupen64PlusGraphicsSettingsItem.Enabled = !loadedCoreIsMupen64Plus || !isMovieActive;
|
mupen64PlusGraphicsSettingsItem.Enabled = !loadedCoreIsMupen64Plus || !isMovieActive;
|
||||||
mupen64PlusGamepadSettingsItem.Enabled = !loadedCoreIsMupen64Plus || !isMovieActive;
|
mupen64PlusGamepadSettingsItem.Enabled = !loadedCoreIsMupen64Plus || !isMovieActive;
|
||||||
mupen64PlusAnalogConstraintItem.Checked = Config.N64UseCircularAnalogConstraint;
|
mupen64PlusAnalogConstraintItem.Checked = Config.N64UseCircularAnalogConstraint;
|
||||||
mupen64PlusNonVILagFramesItem.Checked = s.UseMupenStyleLag;
|
mupen64PlusMupenStyleLagFramesItem.Checked = s.UseMupenStyleLag;
|
||||||
if (loadedCoreIsMupen64Plus)
|
if (loadedCoreIsMupen64Plus)
|
||||||
{
|
{
|
||||||
mupen64PlusUseExpansionSlotItem.Checked = mupen64Plus.UsingExpansionSlot;
|
mupen64PlusUseExpansionSlotItem.Checked = mupen64Plus.UsingExpansionSlot;
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
{
|
{
|
||||||
if (_settings.UseMupenStyleLag)
|
if (_settings.UseMupenStyleLag)
|
||||||
{
|
{
|
||||||
return !IsVIFrame;
|
return !FrameFinished;
|
||||||
}
|
}
|
||||||
|
|
||||||
return !_inputProvider.LastFrameInputPolled;
|
return !_inputProvider.LastFrameInputPolled;
|
||||||
|
@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
{
|
{
|
||||||
if (_settings.UseMupenStyleLag)
|
if (_settings.UseMupenStyleLag)
|
||||||
{
|
{
|
||||||
IsVIFrame = !value;
|
FrameFinished = !value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -32,10 +32,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsVIFrame
|
public bool FrameFinished
|
||||||
{
|
{
|
||||||
get => _videoProvider.IsVIFrame;
|
get => _videoProvider.FrameFinished;
|
||||||
internal set => _videoProvider.IsVIFrame = value;
|
internal set => _videoProvider.FrameFinished = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: optimize managed to unmanaged using the ActiveChanged event
|
// TODO: optimize managed to unmanaged using the ActiveChanged event
|
||||||
|
|
|
@ -221,7 +221,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
{
|
{
|
||||||
_inputProvider.Controller = controller;
|
_inputProvider.Controller = controller;
|
||||||
|
|
||||||
IsVIFrame = false;
|
FrameFinished = false;
|
||||||
|
|
||||||
api.setTraceCallback(Tracer?.IsEnabled() is true ? _tracecb : null);
|
api.setTraceCallback(Tracer?.IsEnabled() is true ? _tracecb : null);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
private mupen64plusVideoApi api;
|
private mupen64plusVideoApi api;
|
||||||
private readonly mupen64plusApi coreAPI;
|
private readonly mupen64plusApi coreAPI;
|
||||||
|
|
||||||
public bool IsVIFrame;
|
public bool FrameFinished;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates N64 Video system with mupen64plus backend
|
/// Creates N64 Video system with mupen64plus backend
|
||||||
|
@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
|
|
||||||
coreAPI = core;
|
coreAPI = core;
|
||||||
coreAPI.BeforeRender += DoVideoFrame;
|
coreAPI.BeforeRender += DoVideoFrame;
|
||||||
coreAPI.BeforeRender += () => { IsVIFrame = true; };
|
coreAPI.FrameFinished += () => { FrameFinished = true; };
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] GetVideoBuffer() => frameBuffer;
|
public int[] GetVideoBuffer() => frameBuffer;
|
||||||
|
|
Loading…
Reference in New Issue