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);
|
||||
|
||||
//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
|
||||
Texture2d texCurr = null;
|
||||
RenderTarget rtCurr = null;
|
||||
|
@ -351,7 +356,7 @@ TESTEROO:
|
|||
inFinalTarget = true;
|
||||
rtCurr = null;
|
||||
CurrentFilterProgram.CurrRenderTarget = null;
|
||||
GraphicsControl.Begin();
|
||||
GL.BindRenderTarget(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -423,6 +428,7 @@ TESTEROO:
|
|||
var surf = LockLuaSurface(kvp.Key);
|
||||
surf.Clear();
|
||||
UnlockLuaSurface(surf);
|
||||
LuaSurfaceSets[kvp.Key].SetPending(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
class SwappableDisplaySurfaceSet
|
||||
{
|
||||
DisplaySurface Pending, Current;
|
||||
bool IsPending;
|
||||
Queue<DisplaySurface> ReleasedSurfaces = new Queue<DisplaySurface>();
|
||||
|
||||
/// <summary>
|
||||
|
@ -50,6 +51,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Pending != null) ReleasedSurfaces.Enqueue(Pending);
|
||||
Pending = newPending;
|
||||
IsPending = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,11 +67,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
lock (this)
|
||||
{
|
||||
if (Pending != null)
|
||||
if (IsPending)
|
||||
{
|
||||
if (Current != null) ReleasedSurfaces.Enqueue(Current);
|
||||
Current = Pending;
|
||||
Pending = null;
|
||||
IsPending = false;
|
||||
}
|
||||
}
|
||||
return Current;
|
||||
|
|
Loading…
Reference in New Issue