Compare commits

..

3 Commits

Author SHA1 Message Date
7d0e5c80bd
lil dep update 2024-02-04 12:48:04 +01:00
f716ad9dd1
limit max main loop sleep 2024-02-03 20:49:52 +01:00
671772a20e
min fps for inactive reduced now 1fps 2024-02-03 19:07:14 +01:00
4 changed files with 10 additions and 6 deletions

@ -1 +1 @@
Subproject commit ab282235b5e84910f6661714b0883a57f45041dd Subproject commit 20af7dd705fe1be68f7678292125620d48aa278b

@ -1 +1 @@
Subproject commit 17ffaee013d97412eab2395cb9555ca3213c5302 Subproject commit 82cfb6d4920a2d6eb19e3f3560b20ec281a5fa81

View File

@ -178,9 +178,13 @@ int main(int argc, char** argv) {
//) //)
//)); //));
const float min_delay = std::min<float>( const float min_delay =
std::min<float>(
std::min<float>(
screen->nextTick() - time_delta_tick, screen->nextTick() - time_delta_tick,
screen->nextRender() - time_delta_render screen->nextRender() - time_delta_render
),
0.25f // dont sleep too long
) * 1000.f; ) * 1000.f;
if (min_delay > 0.f) { if (min_delay > 0.f) {

View File

@ -228,7 +228,7 @@ Screen* MainScreen::render(float time_delta, bool&) {
_window_hidden _window_hidden
) )
) { ) {
_render_interval = std::min<float>(1.f/4.f, pm_interval); _render_interval = std::min<float>(1.f/1.f, pm_interval);
} else { } else {
_render_interval = std::min<float>(1.f/60.f, pm_interval); _render_interval = std::min<float>(1.f/60.f, pm_interval);
} }