WinRT: minor cleanup in top-level app code
authorDavid Ludwig <dludwig@pobox.com>
Fri, 22 Feb 2013 23:44:34 -0500
changeset 8436 6d2329b6f7c7
parent 8435 2d3fe6870df3
child 8437 d6a6c3ebdf3e
WinRT: minor cleanup in top-level app code
src/video/windowsrt/SDL_WinRTApp.cpp
--- a/src/video/windowsrt/SDL_WinRTApp.cpp	Fri Feb 22 23:23:53 2013 -0500
+++ b/src/video/windowsrt/SDL_WinRTApp.cpp	Fri Feb 22 23:44:34 2013 -0500
@@ -22,10 +22,17 @@
 #include <unordered_map>
 #include <sstream>
 
+using namespace concurrency;
+using namespace std;
+using namespace Windows::ApplicationModel;
+using namespace Windows::ApplicationModel::Core;
+using namespace Windows::ApplicationModel::Activation;
+using namespace Windows::Devices::Input;
 using namespace Windows::Graphics::Display;
-
-// TODO, WinRT: Remove reference(s) to BasicTimer.h
-//#include "BasicTimer.h"
+using namespace Windows::Foundation;
+using namespace Windows::System;
+using namespace Windows::UI::Core;
+using namespace Windows::UI::Input;
 
 // HACK, DLudwig: The C-style main() will get loaded via the app's
 // WinRT-styled main(), which is part of SDLmain_for_WinRT.cpp.
@@ -33,6 +40,15 @@
 typedef int (*SDL_WinRT_MainFunction)(int, char **);
 static SDL_WinRT_MainFunction SDL_WinRT_main = nullptr;
 
+// HACK, DLudwig: record a reference to the global, Windows RT 'app'/view.
+// SDL/WinRT will use this throughout its code.
+//
+// TODO, WinRT: consider replacing SDL_WinRTGlobalApp with something
+// non-global, such as something created inside
+// SDL_InitSubSystem(SDL_INIT_VIDEO), or something inside
+// SDL_CreateWindow().
+SDL_WinRTApp ^ SDL_WinRTGlobalApp = nullptr;
+
 static void WINRT_SetDisplayOrientationsPreference(const char *name, const char *oldValue, const char *newValue)
 {
     SDL_assert(SDL_strcmp(name, SDL_HINT_ORIENTATIONS) == 0);
@@ -82,27 +98,6 @@
     DisplayProperties::AutoRotationPreferences = (DisplayOrientations) orientationFlags;
 }
 
-// HACK, DLudwig: record a reference to the global, Windows RT 'app'/view.
-// SDL/WinRT will use this throughout its code.
-//
-// TODO, WinRT: consider replacing SDL_WinRTGlobalApp with something
-// non-global, such as something created inside
-// SDL_InitSubSystem(SDL_INIT_VIDEO), or something inside
-// SDL_CreateWindow().
-SDL_WinRTApp ^ SDL_WinRTGlobalApp = nullptr;
-
-using namespace std;
-using namespace Windows::ApplicationModel;
-using namespace Windows::ApplicationModel::Core;
-using namespace Windows::ApplicationModel::Activation;
-using namespace Windows::Devices::Input;
-using namespace Windows::UI::Core;
-using namespace Windows::UI::Input;
-using namespace Windows::System;
-using namespace Windows::Foundation;
-using namespace Windows::Graphics::Display;
-using namespace concurrency;
-
 SDL_WinRTApp::SDL_WinRTApp() :
     m_windowClosed(false),
     m_windowVisible(true),
@@ -170,8 +165,6 @@
 
     window->KeyUp +=
         ref new TypedEventHandler<CoreWindow^, KeyEventArgs^>(this, &SDL_WinRTApp::OnKeyUp);
-
-    //m_renderer->Initialize(CoreWindow::GetForCurrentThread());    // DLudwig: moved this call to WINRT_CreateWindow, likely elsewhere in the future
 }
 
 void SDL_WinRTApp::Load(Platform::String^ entryPoint)