Просмотр исходного кода

Make sure CORE.Window.ready is set

pull/3415/head
Ray 1 год назад
Родитель
Сommit
54950f9a3d
3 измененных файлов: 6 добавлений и 0 удалений
  1. +2
    -0
      src/rcore_desktop.c
  2. +2
    -0
      src/rcore_drm.c
  3. +2
    -0
      src/rcore_web.c

+ 2
- 0
src/rcore_desktop.c Просмотреть файл

@ -1657,6 +1657,8 @@ static int InitPlatform(void)
rlLoadExtensions(glfwGetProcAddress);
if ((CORE.Window.flags & FLAG_WINDOW_MINIMIZED) > 0) MinimizeWindow();
CORE.Window.ready = true; // TODO: Proper validation on windows/context creation
// If graphic device is no properly initialized, we end program
if (!CORE.Window.ready) { TRACELOG(LOG_FATAL, "PLATFORM: Failed to initialize graphic device"); return -1; }

+ 2
- 0
src/rcore_drm.c Просмотреть файл

@ -1035,6 +1035,8 @@ static int InitPlatform(void)
if ((CORE.Window.flags & FLAG_WINDOW_MINIMIZED) > 0) MinimizeWindow();
CORE.Window.ready = true; // TODO: Proper validation on windows/context creation
// If graphic device is no properly initialized, we end program
if (!CORE.Window.ready) { TRACELOG(LOG_FATAL, "PLATFORM: Failed to initialize graphic device"); return -1; }
else SetWindowPosition(GetMonitorWidth(GetCurrentMonitor()) / 2 - CORE.Window.screen.width / 2, GetMonitorHeight(GetCurrentMonitor()) / 2 - CORE.Window.screen.height / 2);

+ 2
- 0
src/rcore_web.c Просмотреть файл

@ -1002,6 +1002,8 @@ static int InitPlatform(void)
TRACELOG(LOG_INFO, " > Render size: %i x %i", CORE.Window.render.width, CORE.Window.render.height);
TRACELOG(LOG_INFO, " > Viewport offsets: %i, %i", CORE.Window.renderOffset.x, CORE.Window.renderOffset.y);
CORE.Window.ready = true; // TODO: Proper validation on windows/context creation
// If graphic device is no properly initialized, we end program
if (!CORE.Window.ready) { TRACELOG(LOG_FATAL, "PLATFORM: Failed to initialize graphic device"); return -1; }
else SetWindowPosition(GetMonitorWidth(GetCurrentMonitor())/2 - CORE.Window.screen.width/2, GetMonitorHeight(GetCurrentMonitor())/2 - CORE.Window.screen.height/2);

Загрузка…
Отмена
Сохранить