mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 18:39:45 +01:00
Split Func_input and Func_delta when unfocused
Without this, `fixedloop` will loop infinitely until focus is regained. However, Emscripten won't actually know that focus is regained until `fixedloop` returns.
This commit is contained in:
parent
7430be69e3
commit
d40af63aa3
1 changed files with 4 additions and 1 deletions
|
@ -239,6 +239,10 @@ static void unfocused_run(void);
|
||||||
static const struct ImplFunc unfocused_func_list[] = {
|
static const struct ImplFunc unfocused_func_list[] = {
|
||||||
{
|
{
|
||||||
Func_input, /* we still need polling when unfocused */
|
Func_input, /* we still need polling when unfocused */
|
||||||
|
NULL
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Func_delta,
|
||||||
unfocused_run
|
unfocused_run
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -785,7 +789,6 @@ static void unfocused_run(void)
|
||||||
#undef FLIP
|
#undef FLIP
|
||||||
}
|
}
|
||||||
graphics.render();
|
graphics.render();
|
||||||
gameScreen.FlipScreen(graphics.flipmode);
|
|
||||||
//We are minimised, so lets put a bit of a delay to save CPU
|
//We are minimised, so lets put a bit of a delay to save CPU
|
||||||
#ifndef __EMSCRIPTEN__
|
#ifndef __EMSCRIPTEN__
|
||||||
SDL_Delay(100);
|
SDL_Delay(100);
|
||||||
|
|
Loading…
Reference in a new issue