瀏覽代碼

Security check in case window initialization fails

pull/458/head
raysan5 6 年之前
父節點
當前提交
c32ed921a2
共有 1 個檔案被更改,包括 9 行新增4 行删除
  1. +9
    -4
      src/core.c

+ 9
- 4
src/core.c 查看文件

@ -633,14 +633,19 @@ bool IsWindowReady(void)
bool WindowShouldClose(void)
{
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
// While window minimized, stop loop execution
while (windowMinimized) glfwWaitEvents();
if (windowReady)
{
// While window minimized, stop loop execution
while (windowMinimized) glfwWaitEvents();
return (glfwWindowShouldClose(window));
return (glfwWindowShouldClose(window));
}
else return true;
#endif
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(PLATFORM_UWP)
return windowShouldClose;
if (windowReady) return windowShouldClose;
else return true;
#endif
}

Loading…
取消
儲存