From 3eafca0dc1e09989e977135d63745839b5844b9c Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 13 Nov 2014 22:58:08 -0600 Subject: [PATCH] Fix compile errors on win32, warnings elsewhere --- src/sdl/i_system.c | 2 +- src/sdl/i_video.c | 6 ++---- src/win32/win_dll.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 23da092fb..3eb52bc5a 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -304,7 +304,7 @@ UINT8 keyboard_started = false; static void signal_handler(INT32 num) { //static char msg[] = "oh no! back to reality!\r\n"; - char * sigmsg; + const char * sigmsg; char sigdef[32]; D_QuitNetGame(); // Fix server freezes diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 64675b533..9229b6eab 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -174,7 +174,6 @@ static void Impl_SetWindowIcon(void); static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) { static SDL_bool wasfullscreen = SDL_FALSE; - static SDL_bool glfallbackresolution = SDL_FALSE; Uint32 rmask; Uint32 gmask; Uint32 bmask; @@ -195,7 +194,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) else if (!fullscreen && wasfullscreen) { wasfullscreen = SDL_FALSE; - glfallbackresolution = SDL_FALSE; SDL_SetWindowFullscreen(window, 0); SDL_SetWindowSize(window, width, height); SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1)); @@ -743,8 +741,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt) } else { - event.data2 = (int)round((evt.xrel) * ((float)wwidth / (float)realwidth)); - event.data3 = (int)round(-evt.yrel * ((float)wheight / (float)realheight)); + event.data2 = (INT32)round((evt.xrel) * ((float)wwidth / (float)realwidth)); + event.data3 = (INT32)round(-evt.yrel * ((float)wheight / (float)realheight)); } event.type = ev_mouse; diff --git a/src/win32/win_dll.c b/src/win32/win_dll.c index 30c4d7f74..8fa4d17f7 100644 --- a/src/win32/win_dll.c +++ b/src/win32/win_dll.c @@ -123,7 +123,7 @@ static loadfunc_t hwdFuncTable[] = { {"DrawIntermissionBG@0",&hwdriver.pfnDrawIntermissionBG}, {"MakeScreenTexture@0", &hwdriver.pfnMakeScreenTexture}, {"MakeScreenFinalTexture@0", &hwdriver.pfnMakeScreenFinalTexture}, - {"DrawScreenFinalTexture@8", &hwdriver.pfnDrawScreenFinalTexture} + {"DrawScreenFinalTexture@8", &hwdriver.pfnDrawScreenFinalTexture}, #else {"Init", &hwdriver.pfnInit}, {"Shutdown", &hwdriver.pfnShutdown}, @@ -153,7 +153,7 @@ static loadfunc_t hwdFuncTable[] = { {"DrawIntermissionBG", &hwdriver.pfnDrawIntermissionBG}, {"MakeScreenTexture", &hwdriver.pfnMakeScreenTexture}, {"MakeScreenFinalTexture", &hwdriver.pfnMakeScreenFinalTexture}, - {"DrawScreenFinalTexture", &hwdriver.pfnDrawScreenFinalTexture} + {"DrawScreenFinalTexture", &hwdriver.pfnDrawScreenFinalTexture}, #endif {NULL,NULL} };