fix possible crash on minimizing app

This commit is contained in:
nitsuja 2009-12-08 17:15:44 +00:00
parent 19fef7e068
commit 71d73de359
1 changed files with 7 additions and 0 deletions

View File

@ -479,6 +479,13 @@ void UnscaleScreenCoords(s32& x, s32& y)
int defheight = video.height;
int winwidth = (r.right-r.left), winheight = (r.bottom-r.top);
if(winwidth == 0 || winheight == 0)
{
x = 0;
y = 0;
return;
}
if (video.layout == 0)
{
defheight += video.scaledscreengap();