remove some render off logic (this might not be sync safe), move threaded rendering to a sync setting (this probably doesn't affect sync, but best be safe here)
This commit is contained in:
parent
93dadb021f
commit
c496c97c8f
|
@ -32,11 +32,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
|
||||
public class NDSSettings
|
||||
{
|
||||
[DisplayName("Threaded 3D Rendering")]
|
||||
[Description("Offloads 3D rendering to a separate thread")]
|
||||
[DefaultValue(true)]
|
||||
public bool ThreadedRendering { get; set; }
|
||||
|
||||
[DisplayName("Screen Layout")]
|
||||
[Description("Adjusts the layout of the screens")]
|
||||
[DefaultValue(ScreenLayoutKind.Vertical)]
|
||||
|
@ -95,6 +90,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
|
||||
public class NDSSyncSettings
|
||||
{
|
||||
[DisplayName("Threaded 3D Rendering")]
|
||||
[Description("Offloads 3D rendering to a separate thread")]
|
||||
[DefaultValue(true)]
|
||||
public bool ThreadedRendering { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
private DateTime _initaltime;
|
||||
|
||||
|
|
|
@ -327,7 +327,6 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
|
||||
protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController controller, bool render, bool rendersound)
|
||||
{
|
||||
_render = render;
|
||||
_core.SetTraceCallback(Tracer.IsEnabled() ? _tracecb : null);
|
||||
return new LibMelonDS.FrameInfo
|
||||
{
|
||||
|
@ -344,19 +343,15 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
|||
private readonly Action _frameThreadStart;
|
||||
private readonly LibMelonDS.ThreadStartCallback _threadstartcb;
|
||||
|
||||
private bool _render;
|
||||
private Task _frameThreadProcActive;
|
||||
|
||||
private void ThreadStartCallback()
|
||||
{
|
||||
if (_render)
|
||||
if (_frameThreadProcActive != null)
|
||||
{
|
||||
if (_frameThreadProcActive != null)
|
||||
{
|
||||
throw new InvalidOperationException("Attempted to start render thread twice");
|
||||
}
|
||||
_frameThreadProcActive = Task.Run(_frameThreadStart);
|
||||
throw new InvalidOperationException("Attempted to start render thread twice");
|
||||
}
|
||||
_frameThreadProcActive = Task.Run(_frameThreadStart);
|
||||
}
|
||||
|
||||
protected override void FrameAdvancePost()
|
||||
|
|
Loading…
Reference in New Issue