Disable r_useScissor when r_lockSurfaces is active

This commit is contained in:
Daniel Gibson 2021-06-12 20:52:05 +02:00
parent d17fa6b2b6
commit 907fc5771b

View file

@ -628,6 +628,18 @@ void idRenderSystemLocal::BeginFrame( int windowWidth, int windowHeight ) {
return;
}
// DG: r_lockSurfaces only works properly if r_useScissor is disabled
if ( r_lockSurfaces.IsModified() ) {
static bool origUseScissor = true;
r_lockSurfaces.ClearModified();
if ( r_lockSurfaces.GetBool() ) {
origUseScissor = r_useScissor.GetBool();
r_useScissor.SetBool( false );
} else {
r_useScissor.SetBool( origUseScissor );
}
} // DG end
// determine which back end we will use
SetBackEndRenderer();