WinRT: minor function and variable name cleanup
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/src/core/winrt/SDL_winrtapp.cpp b/src/core/winrt/SDL_winrtapp.cpp
index 22df55b..e2fbba7 100644
--- a/src/core/winrt/SDL_winrtapp.cpp
+++ b/src/core/winrt/SDL_winrtapp.cpp
@@ -300,12 +300,12 @@ void SDL_WinRTApp::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEven
// window-resize event as it appeared the SDL window didn't change
// size, and the Direct3D 11.1 renderer wouldn't resize its swap
// chain.
- SDL_DisplayMode newDisplayMode = GetMainDisplayMode();
- m_sdlVideoDevice->displays[0].current_mode = newDisplayMode;
- m_sdlVideoDevice->displays[0].desktop_mode = newDisplayMode;
- m_sdlVideoDevice->displays[0].display_modes[0] = newDisplayMode;
+ SDL_DisplayMode resizedDisplayMode = CalcCurrentDisplayMode();
+ m_sdlVideoDevice->displays[0].current_mode = resizedDisplayMode;
+ m_sdlVideoDevice->displays[0].desktop_mode = resizedDisplayMode;
+ m_sdlVideoDevice->displays[0].display_modes[0] = resizedDisplayMode;
- m_sdlWindowData->sdlWindow->fullscreen_mode = newDisplayMode;
+ m_sdlWindowData->sdlWindow->fullscreen_mode = resizedDisplayMode;
// Send the window-resize event to the rest of SDL, and to apps:
const int windowWidth = (int) ceil(args->Size.Width);
@@ -469,7 +469,7 @@ void SDL_WinRTApp::OnResuming(Platform::Object^ sender, Platform::Object^ args)
}
}
-SDL_DisplayMode SDL_WinRTApp::GetMainDisplayMode()
+SDL_DisplayMode SDL_WinRTApp::CalcCurrentDisplayMode()
{
// Create an empty, zeroed-out display mode:
SDL_DisplayMode mode;
diff --git a/src/core/winrt/SDL_winrtapp.h b/src/core/winrt/SDL_winrtapp.h
index 053a0df..db19e8c 100644
--- a/src/core/winrt/SDL_winrtapp.h
+++ b/src/core/winrt/SDL_winrtapp.h
@@ -16,7 +16,7 @@ public:
internal:
// SDL-specific methods
- SDL_DisplayMode GetMainDisplayMode();
+ SDL_DisplayMode CalcCurrentDisplayMode();
void PumpEvents();
const SDL_WindowData * GetSDLWindowData() const;
bool HasSDLWindowData() const;
diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp
index 48e6ed8..e87e056 100644
--- a/src/video/winrt/SDL_winrtvideo.cpp
+++ b/src/video/winrt/SDL_winrtvideo.cpp
@@ -134,7 +134,7 @@ WINRT_VideoInit(_THIS)
static int
WINRT_InitModes(_THIS)
{
- SDL_DisplayMode mode = SDL_WinRTGlobalApp->GetMainDisplayMode();
+ SDL_DisplayMode mode = SDL_WinRTGlobalApp->CalcCurrentDisplayMode();
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
return -1;
}