浏览代码

add config page detection to preventing sdlpal from automatically exit on macOS/iOS/3DS/etc

Pal Lockheart 7 年之前
父节点
当前提交
db8b77cf6f
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      main.c

+ 3 - 0
main.c

@@ -486,6 +486,8 @@ main(
    if (UTIL_Platform_Init(argc, argv) != 0)
    if (UTIL_Platform_Init(argc, argv) != 0)
 	   return -1;
 	   return -1;
 
 
+   // Without the detection, app will automatically exit on platforms that dont have config page.
+#if defined(PAL_HAS_CONFIG_PAGE) && PAL_HAS_CONFIG_PAGE
    //
    //
    // Should launch setting
    // Should launch setting
    // However, it may arrive here through the activatation event on WinRT platform
    // However, it may arrive here through the activatation event on WinRT platform
@@ -493,6 +495,7 @@ main(
    //
    //
    if (gConfig.fLaunchSetting)
    if (gConfig.fLaunchSetting)
 	   return 0;
 	   return 0;
+#endif
 
 
    //
    //
    // If user requests a file-based log, then add it after the system-specific one.
    // If user requests a file-based log, then add it after the system-specific one.