From 2bc86b52c8e8cf2005e8ab3d894f7a62625d1caf Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 21 Nov 2017 04:05:47 -0500 Subject: [PATCH] - fixed a few of the more obvious logic errors --- src/gl/renderer/gl_postprocess.cpp | 2 +- src/vectors.h | 1 + src/win32/fb_d3d9.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index cea7cbb3f..7202ee2a9 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, fdist; + double fbestdist = (double)(1<<53), fdist; int bestcolor = 0; if (firstTime || trackpowtable != gl_paltonemap_powtable) diff --git a/src/vectors.h b/src/vectors.h index 5fa0970f1..95d7c5fdf 100644 --- a/src/vectors.h +++ b/src/vectors.h @@ -651,6 +651,7 @@ struct TVector3 TVector3 &operator ^= (const TVector3 &other) { *this = *this ^ other; + return *this; } }; diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index d568ce60f..63722a371 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 && box.right > 0 && (Width != box.right || Height != box.bottom)) + if (box.right > 0 && (Width != box.right || Height != box.bottom)) { Resize(box.right, box.bottom);