浏览代码

WinRT implementation

Lou Yihua 7 年之前
父节点
当前提交
883dcd4cb8
共有 1 个文件被更改,包括 7 次插入0 次删除
  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");