handle window focus (dont run fade and read while not focused)

This commit is contained in:
Green Sky
2025-01-19 19:33:01 +01:00
parent bd6368a8f9
commit d416d3d595
6 changed files with 38 additions and 26 deletions

View File

@@ -181,15 +181,6 @@ int main(int argc, char** argv) {
last_time_render = new_time;
}
//// TODO: seperate out render and tick
//const float time_to_next_loop = std::min<float>(screen->nextRender(), screen->nextTick());
//std::this_thread::sleep_for( // time left to get to 60fps
//std::chrono::duration<float, std::chrono::seconds::period>(time_to_next_loop)
//- std::chrono::duration<float, std::chrono::seconds::period>(std::chrono::steady_clock::now() - new_time) // time used for rendering
//);
#if 1
if (render || tick) {
// why is windows like this