mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Correct OGLVideo::updateScale() to avoid division by zero.
This commit is contained in:
parent
1c232c6a4e
commit
3fd33ec64b
|
@ -178,6 +178,8 @@ bool OGLVideo::resizeWindow()
|
||||||
|
|
||||||
void OGLVideo::updateScale()
|
void OGLVideo::updateScale()
|
||||||
{
|
{
|
||||||
|
if (VI.width == 0 || VI.height == 0)
|
||||||
|
return;
|
||||||
m_scaleX = m_width / (float)VI.width;
|
m_scaleX = m_width / (float)VI.width;
|
||||||
m_scaleY = m_height / (float)VI.height;
|
m_scaleY = m_height / (float)VI.height;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user