mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +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;
|
||||
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
|
||||
// precision for y0. :(
|
||||
double sprtopscreen;
|
||||
|
@ -187,6 +194,8 @@ void SWCanvas::DrawTexture(DCanvas *canvas, FTexture *img, DrawParms &parms)
|
|||
}
|
||||
|
||||
viewport->CenterY = centeryback;
|
||||
viewwindowx = oldviewwindowx;
|
||||
viewwindowy = oldviewwindowy;
|
||||
}
|
||||
|
||||
viewport->RenderTarget->Unlock();
|
||||
|
|
Loading…
Reference in a new issue