cleanup
This commit is contained in:
parent
84ad460d20
commit
768c2762a5
|
@ -1288,14 +1288,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void PceControllerSettingsMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (new PCEControllerConfig().ShowDialog() == DialogResult.OK)
|
||||
using (var dlg = new PCEControllerConfig())
|
||||
{
|
||||
GlobalWin.MainForm.FlagNeedsReboot();
|
||||
GlobalWin.OSD.AddMessage("Controller settings saved but a core reboot is required");
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalWin.OSD.AddMessage("Controller settings aborted");
|
||||
dlg.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ using System.Windows.Forms;
|
|||
|
||||
using BizHawk.Emulation.Cores.PCEngine;
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -51,6 +52,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
var index = int.Parse(c.Name.Replace("Controller", ""));
|
||||
pceSettings.Controllers[index].IsConnected = c.Checked;
|
||||
});
|
||||
GlobalWin.MainForm.PutCoreSyncSettings(pceSettings);
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
<Compile Include="Colors.cs" />
|
||||
<Compile Include="CustomCollections.cs" />
|
||||
<Compile Include="DeepEquality.cs" />
|
||||
<Compile Include="DeepEquals.cs" />
|
||||
<Compile Include="Extensions\BufferExtensions.cs" />
|
||||
<Compile Include="Extensions\CollectionExtensions.cs" />
|
||||
<Compile Include="Extensions\IOExtensions.cs" />
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
Type = NecSystemType.SuperGrafx;
|
||||
break;
|
||||
}
|
||||
this.Settings = (PCESettings)Settings ?? new PCESettings();
|
||||
this._settings = (PCESettings)Settings ?? new PCESettings();
|
||||
_syncSettings = (PCESyncSettings)syncSettings ?? new PCESyncSettings();
|
||||
Init(game, rom);
|
||||
SetControllerButtons();
|
||||
|
@ -96,7 +96,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
systemid = "PCECD";
|
||||
Type = NecSystemType.TurboCD;
|
||||
this.disc = disc;
|
||||
this.Settings = (PCESettings)Settings ?? new PCESettings();
|
||||
this._settings = (PCESettings)Settings ?? new PCESettings();
|
||||
_syncSettings = (PCESyncSettings)syncSettings ?? new PCESyncSettings();
|
||||
|
||||
GameInfo biosInfo;
|
||||
|
@ -238,7 +238,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
{
|
||||
ArcadeRam = new byte[0x200000];
|
||||
ArcadeCard = true;
|
||||
ArcadeCardRewindHack = Settings.ArcadeCardRewindHack;
|
||||
ArcadeCardRewindHack = _settings.ArcadeCardRewindHack;
|
||||
for (int i = 0; i < 4; i++)
|
||||
ArcadePage[i] = new ArcadeCardPage();
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
if (game["AdpcmVol"])
|
||||
ADPCM.MaxVolume = int.Parse(game.OptionValue("AdpcmVol"));
|
||||
// the gamedb can also force equalizevolumes on
|
||||
if (TurboCD && (Settings.EqualizeVolume || game["EqualizeVolumes"] || game.NotInDatabase))
|
||||
if (TurboCD && (_settings.EqualizeVolume || game["EqualizeVolumes"] || game.NotInDatabase))
|
||||
SoundMixer.EqualizeVolumes();
|
||||
|
||||
// Ok, yes, HBlankPeriod's only purpose is game-specific hax.
|
||||
|
@ -331,7 +331,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
|
||||
void CheckSpriteLimit()
|
||||
{
|
||||
bool spriteLimit = ForceSpriteLimit | Settings.SpriteLimit;
|
||||
bool spriteLimit = ForceSpriteLimit | _settings.SpriteLimit;
|
||||
VDC1.PerformSpriteLimit = spriteLimit;
|
||||
if (VDC2 != null)
|
||||
VDC2.PerformSpriteLimit = spriteLimit;
|
||||
|
@ -563,22 +563,22 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
disc.Dispose();
|
||||
}
|
||||
|
||||
public PCESettings Settings;
|
||||
public PCESettings _settings;
|
||||
private PCESyncSettings _syncSettings;
|
||||
|
||||
public object GetSettings() { return Settings.Clone(); }
|
||||
public object GetSyncSettings() { return _syncSettings; }
|
||||
public object GetSettings() { return _settings.Clone(); }
|
||||
public object GetSyncSettings() { return _syncSettings.Clone(); }
|
||||
public bool PutSettings(object o)
|
||||
{
|
||||
PCESettings n = (PCESettings)o;
|
||||
bool ret;
|
||||
if (n.ArcadeCardRewindHack != Settings.ArcadeCardRewindHack ||
|
||||
n.EqualizeVolume != Settings.EqualizeVolume)
|
||||
if (n.ArcadeCardRewindHack != _settings.ArcadeCardRewindHack ||
|
||||
n.EqualizeVolume != _settings.EqualizeVolume)
|
||||
ret = true;
|
||||
else
|
||||
ret = false;
|
||||
|
||||
Settings = n;
|
||||
_settings = n;
|
||||
SetControllerButtons();
|
||||
return ret;
|
||||
}
|
||||
|
@ -616,7 +616,12 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
|
||||
public PCESyncSettings Clone()
|
||||
{
|
||||
return (PCESyncSettings)MemberwiseClone();
|
||||
var ret = new PCESyncSettings();
|
||||
for (int i = 0; i < Controllers.Length; i++)
|
||||
{
|
||||
ret.Controllers[i].IsConnected = Controllers[i].IsConnected;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public class ControllerSetting
|
||||
|
|
|
@ -108,8 +108,8 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
if (ActiveLine >= FrameHeight)
|
||||
return;
|
||||
|
||||
RenderBackgroundScanline(pce.Settings.ShowBG1);
|
||||
RenderSpritesScanline(pce.Settings.ShowOBJ1);
|
||||
RenderBackgroundScanline(pce._settings.ShowBG1);
|
||||
RenderSpritesScanline(pce._settings.ShowOBJ1);
|
||||
}
|
||||
|
||||
Action<bool> RenderBackgroundScanline;
|
||||
|
|
|
@ -246,16 +246,16 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
switch (EffectivePriorityMode)
|
||||
{
|
||||
case 0:
|
||||
RenderBackgroundScanline(VDC1, 12, PCE.Settings.ShowBG1);
|
||||
RenderBackgroundScanline(VDC2, 2, PCE.Settings.ShowBG2);
|
||||
RenderSpritesScanline(VDC1, 11, 14, PCE.Settings.ShowOBJ1);
|
||||
RenderSpritesScanline(VDC2, 1, 3, PCE.Settings.ShowOBJ2);
|
||||
RenderBackgroundScanline(VDC1, 12, PCE._settings.ShowBG1);
|
||||
RenderBackgroundScanline(VDC2, 2, PCE._settings.ShowBG2);
|
||||
RenderSpritesScanline(VDC1, 11, 14, PCE._settings.ShowOBJ1);
|
||||
RenderSpritesScanline(VDC2, 1, 3, PCE._settings.ShowOBJ2);
|
||||
break;
|
||||
case 1:
|
||||
RenderBackgroundScanline(VDC1, 12, PCE.Settings.ShowBG1);
|
||||
RenderBackgroundScanline(VDC2, 2, PCE.Settings.ShowBG2);
|
||||
RenderSpritesScanline(VDC1, 11, 14, PCE.Settings.ShowOBJ1);
|
||||
RenderSpritesScanline(VDC2, 1, 13, PCE.Settings.ShowOBJ2);
|
||||
RenderBackgroundScanline(VDC1, 12, PCE._settings.ShowBG1);
|
||||
RenderBackgroundScanline(VDC2, 2, PCE._settings.ShowBG2);
|
||||
RenderSpritesScanline(VDC1, 11, 14, PCE._settings.ShowOBJ1);
|
||||
RenderSpritesScanline(VDC2, 1, 13, PCE._settings.ShowOBJ2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue