mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-12 20:18:00 +01:00
params: add fixed_size property
This commit is contained in:
parent
1d8fb9f2f3
commit
34bcf97375
2 changed files with 4 additions and 1 deletions
|
@ -234,7 +234,9 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
||||||
if (!game->config.fullscreen) {
|
if (!game->config.fullscreen) {
|
||||||
windowMode = ALLEGRO_WINDOWED;
|
windowMode = ALLEGRO_WINDOWED;
|
||||||
}
|
}
|
||||||
windowMode |= ALLEGRO_RESIZABLE;
|
if (!params.fixed_size) {
|
||||||
|
windowMode |= ALLEGRO_RESIZABLE;
|
||||||
|
}
|
||||||
|
|
||||||
al_set_new_display_flags(windowMode | ALLEGRO_OPENGL | ALLEGRO_PROGRAMMABLE_PIPELINE);
|
al_set_new_display_flags(windowMode | ALLEGRO_OPENGL | ALLEGRO_PROGRAMMABLE_PIPELINE);
|
||||||
al_set_new_display_option(ALLEGRO_VSYNC, 2 - strtol(GetConfigOptionDefault(game, "SuperDerpy", "vsync", "1"), NULL, 10), ALLEGRO_SUGGEST);
|
al_set_new_display_option(ALLEGRO_VSYNC, 2 - strtol(GetConfigOptionDefault(game, "SuperDerpy", "vsync", "1"), NULL, 10), ALLEGRO_SUGGEST);
|
||||||
|
|
|
@ -143,6 +143,7 @@ struct Params {
|
||||||
int samplerate; /*!< Default sample rate of audio output; 0 to use engine default. */
|
int samplerate; /*!< 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. */
|
char* window_title; /*!< A title of the game's window. When NULL, al_get_app_name() is used. */
|
||||||
struct Handlers handlers; /*!< A list of user callbacks to register. */
|
struct Handlers handlers; /*!< A list of user callbacks to register. */
|
||||||
|
bool fixed_size; /*!< If set to true, the game's window with not be resizable. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Main struct of the game. */
|
/*! \brief Main struct of the game. */
|
||||||
|
|
Loading…
Reference in a new issue