mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 16:41:22 +00:00
Fix crash when vid_hw2d is off
This commit is contained in:
parent
86d8f9ca83
commit
b6ea5944d3
1 changed files with 9 additions and 0 deletions
|
@ -110,6 +110,13 @@ void SWCanvas::DrawTexture(DCanvas *canvas, FTexture *img, DrawParms &parms)
|
||||||
double centeryback = viewport->CenterY;
|
double centeryback = viewport->CenterY;
|
||||||
viewport->CenterY = 0;
|
viewport->CenterY = 0;
|
||||||
|
|
||||||
|
int oldviewwindowx = 0;
|
||||||
|
int oldviewwindowy = 0;
|
||||||
|
oldviewwindowx = viewwindowx;
|
||||||
|
oldviewwindowy = viewwindowy;
|
||||||
|
viewwindowx = 0;
|
||||||
|
viewwindowy = 0;
|
||||||
|
|
||||||
// There is not enough precision in the drawing routines to keep the full
|
// There is not enough precision in the drawing routines to keep the full
|
||||||
// precision for y0. :(
|
// precision for y0. :(
|
||||||
double sprtopscreen;
|
double sprtopscreen;
|
||||||
|
@ -187,6 +194,8 @@ void SWCanvas::DrawTexture(DCanvas *canvas, FTexture *img, DrawParms &parms)
|
||||||
}
|
}
|
||||||
|
|
||||||
viewport->CenterY = centeryback;
|
viewport->CenterY = centeryback;
|
||||||
|
viewwindowx = oldviewwindowx;
|
||||||
|
viewwindowy = oldviewwindowy;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewport->RenderTarget->Unlock();
|
viewport->RenderTarget->Unlock();
|
||||||
|
|
Loading…
Reference in a new issue