fixed crash when resizing window to 0

This commit is contained in:
Turanszki Janos
2018-09-17 00:33:24 +01:00
parent 1649bce23a
commit c7c2e681ca
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1573,7 +1573,7 @@ void GraphicsDevice_DX11::CreateBackBufferResources()
void GraphicsDevice_DX11::SetResolution(int width, int height)
{
if (width != SCREENWIDTH || height != SCREENHEIGHT)
if ((width != SCREENWIDTH || height != SCREENHEIGHT) && width > 0 && height > 0)
{
SCREENWIDTH = width;
SCREENHEIGHT = height;
+1 -1
View File
@@ -2034,7 +2034,7 @@ namespace wiGraphicsTypes
void GraphicsDevice_DX12::SetResolution(int width, int height)
{
if (width != SCREENWIDTH || height != SCREENHEIGHT)
if ((width != SCREENWIDTH || height != SCREENHEIGHT) && width > 0 && height > 0)
{
SCREENWIDTH = width;
SCREENHEIGHT = height;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates
const int minor = 20;
// minor bug fixes, alterations, refactors, updates
const int revision = 5;
const int revision = 6;
long GetVersion()