Fix additional MinGW warnings

This commit is contained in:
Cameron Cawley 2019-01-10 16:12:05 +00:00
parent da28d103c9
commit f2891e006b
3 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#ifdef RW_D3D9 #ifdef RW_D3D9
#define NOMINMAX #define NOMINMAX 1
#include <d3d9.h> #include <d3d9.h>
#endif #endif

View File

@ -465,11 +465,11 @@ texfunc(Color t, Color f)
a = srTexUseAlpha ? t.a : f.a; a = srTexUseAlpha ? t.a : f.a;
break; break;
} }
r = clamp(r); Color v;
g = clamp(g); v.r = clamp(r);
b = clamp(b); v.g = clamp(g);
a = clamp(a); v.b = clamp(b);
Color v = { r, g, b, a }; v.a = clamp(a);
return v; return v;
} }

View File

@ -74,7 +74,7 @@ Draw(float timeDelta)
static bool show_another_window = false; static bool show_another_window = false;
static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
rw::RGBA clearcol = { clear_color.x*255, clear_color.y*255, clear_color.z*255, clear_color.w*255 }; rw::RGBA clearcol = rw::makeRGBA(clear_color.x*255, clear_color.y*255, clear_color.z*255, clear_color.w*255);
Scene.camera->clear(&clearcol, rw::Camera::CLEARIMAGE|rw::Camera::CLEARZ); Scene.camera->clear(&clearcol, rw::Camera::CLEARIMAGE|rw::Camera::CLEARZ);
Scene.camera->beginUpdate(); Scene.camera->beginUpdate();