fix bug with lua console wrecking mainform rendering; fix clear button in lua console to actually work
This commit is contained in:
parent
358b9b9328
commit
f84ddbaa08
|
@ -313,6 +313,11 @@ TESTEROO:
|
||||||
|
|
||||||
CurrentFilterProgram.Compile("default", chain_insize, chain_outsize);
|
CurrentFilterProgram.Compile("default", chain_insize, chain_outsize);
|
||||||
|
|
||||||
|
//begin rendering on this context
|
||||||
|
//should this have been done earlier?
|
||||||
|
//do i need to check this on an intel video card to see if running excessively is a problem? (it used to be in the FinalTarget command below, shouldnt be a problem)
|
||||||
|
GraphicsControl.Begin();
|
||||||
|
|
||||||
//run filter chain
|
//run filter chain
|
||||||
Texture2d texCurr = null;
|
Texture2d texCurr = null;
|
||||||
RenderTarget rtCurr = null;
|
RenderTarget rtCurr = null;
|
||||||
|
@ -351,7 +356,7 @@ TESTEROO:
|
||||||
inFinalTarget = true;
|
inFinalTarget = true;
|
||||||
rtCurr = null;
|
rtCurr = null;
|
||||||
CurrentFilterProgram.CurrRenderTarget = null;
|
CurrentFilterProgram.CurrRenderTarget = null;
|
||||||
GraphicsControl.Begin();
|
GL.BindRenderTarget(null);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -423,6 +428,7 @@ TESTEROO:
|
||||||
var surf = LockLuaSurface(kvp.Key);
|
var surf = LockLuaSurface(kvp.Key);
|
||||||
surf.Clear();
|
surf.Clear();
|
||||||
UnlockLuaSurface(surf);
|
UnlockLuaSurface(surf);
|
||||||
|
LuaSurfaceSets[kvp.Key].SetPending(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
class SwappableDisplaySurfaceSet
|
class SwappableDisplaySurfaceSet
|
||||||
{
|
{
|
||||||
DisplaySurface Pending, Current;
|
DisplaySurface Pending, Current;
|
||||||
|
bool IsPending;
|
||||||
Queue<DisplaySurface> ReleasedSurfaces = new Queue<DisplaySurface>();
|
Queue<DisplaySurface> ReleasedSurfaces = new Queue<DisplaySurface>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -50,6 +51,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
if (Pending != null) ReleasedSurfaces.Enqueue(Pending);
|
if (Pending != null) ReleasedSurfaces.Enqueue(Pending);
|
||||||
Pending = newPending;
|
Pending = newPending;
|
||||||
|
IsPending = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,11 +67,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (Pending != null)
|
if (IsPending)
|
||||||
{
|
{
|
||||||
if (Current != null) ReleasedSurfaces.Enqueue(Current);
|
if (Current != null) ReleasedSurfaces.Enqueue(Current);
|
||||||
Current = Pending;
|
Current = Pending;
|
||||||
Pending = null;
|
Pending = null;
|
||||||
|
IsPending = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Current;
|
return Current;
|
||||||
|
|
Loading…
Reference in New Issue