Browse Source

WinRT implementation

Lou Yihua 8 years ago
parent
commit
883dcd4cb8
1 changed files with 7 additions and 0 deletions
  1. 7 0
      winrt/SDLPal.Common/WinRTUtil.cpp

+ 7 - 0
winrt/SDLPal.Common/WinRTUtil.cpp

@@ -162,6 +162,13 @@ static int input_event_filter(const SDL_Event *lpEvent, PALINPUTSTATE *state)
 extern "C"
 INT UTIL_Platform_Init(int argc, char* argv[])
 {
+#if defined(_DEBUG)
+	// Defaults log to debug output on debug builds
+	UTIL_LogSetOutput([](LOGLEVEL, const char* str, const char*)->void {
+		OutputDebugStringA(str);
+	}, 1024, TRUE);
+#endif
+
 	CreateRunningFile();
 
 	SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeRight");