params: Add a param to force disable autopause

Useful if a game doesn't work well with autopause, of if it's not wanted
due to its nature.
This commit is contained in:
Sebastian Krzyszkowiak 2020-11-07 06:27:11 +01:00
parent c235d53f1d
commit 4eb91e2f32
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF
2 changed files with 5 additions and 0 deletions

View file

@ -129,6 +129,10 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
game->config.debug.verbose = strtol(GetConfigOptionDefault(game, "debug", "verbose", "0"), NULL, 10);
game->config.debug.livereload = strtol(GetConfigOptionDefault(game, "debug", "livereload", "0"), NULL, 10);
if (params.no_autopause) {
game->config.autopause = false;
}
#ifdef __EMSCRIPTEN__
game->config.fullscreen = false; // we can't start fullscreen on emscripten
#endif

View file

@ -140,6 +140,7 @@ struct Params {
bool depth_buffer; /*!< Request a depth buffer for the framebuffer's render target. */
bool show_loading_on_launch; /*!< Whether the loading screen should be shown when loading the initial set of gamestates. */
bool fixed_size; /*!< If set to true, the game's window will not be resizable. */
bool no_autopause; /*!< If set to true, engine autopause is forced to be disabled. */
int samples; /*!< How many samples should be used for multisampling; 0 to disable. */
int sample_rate; /*!< Default sample rate of audio output; 0 to use engine default. */
char* window_title; /*!< A title of the game's window. When NULL, al_get_app_name() is used. */