i meant to commit this a few days ago? oops
This commit is contained in:
parent
82632e892e
commit
e55dd02644
|
@ -9,6 +9,7 @@ using Newtonsoft.Json;
|
|||
|
||||
using BizHawk.Common.BufferExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
||||
{
|
||||
|
@ -83,7 +84,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
BoardName = mappername;
|
||||
CoreComm.VsyncNum = 39375000;
|
||||
CoreComm.VsyncDen = 655171;
|
||||
PutSettings(Settings ?? QuickNESSettings.GetDefaults());
|
||||
PutSettings(Settings ?? new QuickNESSettings());
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@ -429,15 +430,10 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
ret._Palette = (byte[])_Palette.Clone();
|
||||
return ret;
|
||||
}
|
||||
public static QuickNESSettings GetDefaults()
|
||||
public QuickNESSettings()
|
||||
{
|
||||
return new QuickNESSettings
|
||||
{
|
||||
NumSprites = 8,
|
||||
ClipLeftAndRight = false,
|
||||
ClipTopAndBottom = true,
|
||||
_Palette = GetDefaultColors()
|
||||
};
|
||||
SettingsUtil.SetDefaultValues(this);
|
||||
SetDefaultColors();
|
||||
}
|
||||
|
||||
public void SetNesHawkPalette(int[,] pal)
|
||||
|
@ -470,8 +466,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
}
|
||||
}
|
||||
|
||||
QuickNESSettings Settings = QuickNESSettings.GetDefaults();
|
||||
QuickNESSettings _Settings;
|
||||
|
||||
// what is this for?
|
||||
public class QuickNESSyncSettings
|
||||
{
|
||||
public QuickNESSyncSettings Clone()
|
||||
|
@ -482,7 +479,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
|
||||
public object GetSettings()
|
||||
{
|
||||
return Settings.Clone();
|
||||
return _Settings.Clone();
|
||||
}
|
||||
|
||||
public object GetSyncSettings()
|
||||
|
@ -492,8 +489,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
|
||||
public bool PutSettings(object o)
|
||||
{
|
||||
Settings = (QuickNESSettings)o;
|
||||
LibQuickNES.qn_set_sprite_limit(Context, Settings.NumSprites);
|
||||
_Settings = (QuickNESSettings)o;
|
||||
LibQuickNES.qn_set_sprite_limit(Context, _Settings.NumSprites);
|
||||
RecalculateCrops();
|
||||
return false;
|
||||
}
|
||||
|
@ -531,8 +528,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
|
||||
void RecalculateCrops()
|
||||
{
|
||||
cropright = cropleft = Settings.ClipLeftAndRight ? 8 : 0;
|
||||
cropbottom = croptop = Settings.ClipTopAndBottom ? 8 : 0;
|
||||
cropright = cropleft = _Settings.ClipLeftAndRight ? 8 : 0;
|
||||
cropbottom = croptop = _Settings.ClipTopAndBottom ? 8 : 0;
|
||||
BufferWidth = 256 - cropleft - cropright;
|
||||
BufferHeight = 240 - croptop - cropbottom;
|
||||
}
|
||||
|
@ -545,7 +542,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
|
|||
|
||||
void Blit()
|
||||
{
|
||||
LibQuickNES.qn_blit(Context, VideoOutputH.AddrOfPinnedObject(), Settings.Palette, cropleft, croptop, cropright, cropbottom);
|
||||
LibQuickNES.qn_blit(Context, VideoOutputH.AddrOfPinnedObject(), _Settings.Palette, cropleft, croptop, cropright, cropbottom);
|
||||
}
|
||||
|
||||
public IVideoProvider VideoProvider { get { return this; } }
|
||||
|
|
Loading…
Reference in New Issue