From 862aa4b47d586efef87a2669016c3d2852982e94 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 22 Jul 2018 19:28:27 -0400 Subject: [PATCH] windows: Fixed some Visual Studio warnings about shadowed variables. Fixes Bugzilla #4118. --- src/joystick/windows/SDL_mmjoystick.c | 5 +---- src/video/windows/SDL_windowswindow.c | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/joystick/windows/SDL_mmjoystick.c b/src/joystick/windows/SDL_mmjoystick.c index 9fa86656fb410..47ceec166f372 100644 --- a/src/joystick/windows/SDL_mmjoystick.c +++ b/src/joystick/windows/SDL_mmjoystick.c @@ -366,10 +366,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) /* joystick hat events */ if (joyinfo.dwFlags & JOY_RETURNPOV) { - Uint8 pos; - - pos = TranslatePOV(joyinfo.dwPOV); - SDL_PrivateJoystickHat(joystick, 0, pos); + SDL_PrivateJoystickHat(joystick, 0, TranslatePOV(joyinfo.dwPOV)); } } diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index cc6f2b92d6e7b..be4d54ed38b5a 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -219,8 +219,6 @@ SetupWindowData(_THIS, SDL_Window * window, HWND hwnd, HWND parent, SDL_bool cre if ((window->windowed.w && window->windowed.w != w) || (window->windowed.h && window->windowed.h != h)) { /* We tried to create a window larger than the desktop and Windows didn't allow it. Override! */ int x, y; - int w, h; - /* Figure out what the window area will be */ WIN_AdjustWindowRect(window, &x, &y, &w, &h, SDL_FALSE); SetWindowPos(hwnd, HWND_NOTOPMOST, x, y, w, h, SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOACTIVATE);