From 47e9975e9068e4c2f6020937122c9d2f83601994 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 21 Nov 2017 05:20:02 -0500 Subject: [PATCH] - fixed a couple of fixes from the previous commit --- src/gl/renderer/gl_postprocess.cpp | 2 +- src/win32/fb_d3d9.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 7202ee2a9..142358af6 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -938,7 +938,7 @@ int FGLRenderer::PTM_BestColor (const uint32_t *pal_in, int r, int g, int b, int static bool firstTime = true; static float trackpowtable = 0.; - double fbestdist = (double)(1<<53), fdist; + double fbestdist = DBL_MAX, fdist; int bestcolor = 0; if (firstTime || trackpowtable != gl_paltonemap_powtable) diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index 63722a371..ff05faca9 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -1223,7 +1223,7 @@ void D3DFB::Flip() { RECT box; GetClientRect(Window, &box); - if (box.right > 0 && (Width != box.right || Height != box.bottom)) + if (box.right > 0 && box.bottom > 0 && (Width != box.right || Height != box.bottom)) { Resize(box.right, box.bottom);