Skip to content

Commit

Permalink
winsys.cpp: ...
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengtuggy committed Apr 30, 2024
1 parent 49cd1f4 commit 9234a9d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions engine/src/gldrv/winsys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ void winsys_init(int *argc, char **argv, char const *window_title, char const *i

if (!setup_sdl_video_mode()) {
VS_LOG_FLUSH_EXIT(fatal, "setup_sdl_video_mode() failed!", 1);
// winsys_init(argc, argv, window_title, icon_title);
} else {
// glutInit(argc, argv);
}
Expand Down Expand Up @@ -522,25 +521,25 @@ void winsys_process_events() {
SDL_LockAudio();
SDL_UnlockAudio();
}
// if (redisplay && display_func) {
// redisplay = false;
// (*display_func)();
// } else if (idle_func) {
// (*idle_func)();
// /* Delay for a bit. This allows the other threads to do some
// * work (otherwise the audio thread gets starved). */
// }
if (redisplay && display_func) {
redisplay = false;
(*display_func)();
} else if (idle_func) {
(*idle_func)();
/* Delay for a bit. This allows the other threads to do some
* work (otherwise the audio thread gets starved). */
}

do {
// micro_sleep(1000);
SDL_Delay(1);
} while (realTime() < timeLastChecked + REFRESH_RATE);
timeLastChecked = realTime();

// Blue
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
winsys_swap_buffers();
// // Blue
// glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
// glClear(GL_COLOR_BUFFER_BIT);
// winsys_swap_buffers();
}
winsys_cleanup();
}
Expand Down

0 comments on commit 9234a9d

Please sign in to comment.