From 42bb07cace52ace18eb2348a06025109b55c53f1 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 29 Oct 2016 16:59:26 +0000 Subject: [PATCH] sdlayer: Work around warning: signed and unsigned type in conditional expression [-Wsign-compare] indirectly caused by the SDL 2.0.5 headers making all preprocessor macro literals unsigned. git-svn-id: https://svn.eduke32.com/eduke32@5918 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/sdlayer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 019f4e3b4..b9c486d04 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -1614,8 +1614,8 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs) /* HACK: changing SDL GL attribs only works before surface creation, so we have to create a new surface in a different format first to force the surface we WANT to be recreated instead of reused. */ - sdl_window = SDL_CreateWindow("", windowpos ? windowx : SDL_WINDOWPOS_CENTERED, - windowpos ? windowy : SDL_WINDOWPOS_CENTERED, x, y, + sdl_window = SDL_CreateWindow("", windowpos ? windowx : (int)SDL_WINDOWPOS_CENTERED, + windowpos ? windowy : (int)SDL_WINDOWPOS_CENTERED, x, y, ((fs & 1) ? SDL_WINDOW_FULLSCREEN : 0) | SDL_WINDOW_OPENGL); if (sdl_window) @@ -1641,8 +1641,8 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs) #endif // defined USE_OPENGL { // init - sdl_window = SDL_CreateWindow("", windowpos ? windowx : SDL_WINDOWPOS_CENTERED, - windowpos ? windowy : SDL_WINDOWPOS_CENTERED, x, y, + sdl_window = SDL_CreateWindow("", windowpos ? windowx : (int)SDL_WINDOWPOS_CENTERED, + windowpos ? windowy : (int)SDL_WINDOWPOS_CENTERED, x, y, ((fs & 1) ? SDL_WINDOW_FULLSCREEN : 0)); if (!sdl_window) SDL2_VIDEO_ERR("SDL_CreateWindow");