mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-04 16:28:00 +01:00
config: Default to windowed 480x273 on PocketCHIP
Fullscreen windows have some issues with its driver.
This commit is contained in:
parent
c75ef0b72c
commit
7094ce5b95
2 changed files with 13 additions and 1 deletions
|
@ -52,6 +52,12 @@
|
|||
#define IS_EMSCRIPTEN false
|
||||
#endif
|
||||
|
||||
#ifdef POCKETCHIP
|
||||
#define IS_POCKETCHIP true
|
||||
#else
|
||||
#define IS_POCKETCHIP false
|
||||
#endif
|
||||
|
||||
#ifdef ALLEGRO_WINDOWS
|
||||
#define LIBRARY_EXTENSION ".dll"
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
|
|
|
@ -39,6 +39,9 @@ static char* GetDefaultWindowWidth(struct Game* game) {
|
|||
aspect = 1.0;
|
||||
}
|
||||
snprintf(buf, 255, "%d", (int)(720 * aspect));
|
||||
#ifdef POCKETCHIP
|
||||
snprintf(buf, 255, "%d", 480);
|
||||
#endif
|
||||
return AddGarbage(game, buf);
|
||||
}
|
||||
|
||||
|
@ -49,6 +52,9 @@ static char* GetDefaultWindowHeight(struct Game* game) {
|
|||
aspect = 1.0;
|
||||
}
|
||||
snprintf(buf, 255, "%d", (int)(720 / aspect));
|
||||
#ifdef POCKETCHIP
|
||||
snprintf(buf, 255, "%d", 273);
|
||||
#endif
|
||||
return AddGarbage(game, buf);
|
||||
}
|
||||
|
||||
|
@ -116,7 +122,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
|
||||
game->_priv.mutex = al_create_mutex();
|
||||
|
||||
game->config.fullscreen = strtol(GetConfigOptionDefault(game, "SuperDerpy", "fullscreen", "1"), NULL, 10);
|
||||
game->config.fullscreen = strtol(GetConfigOptionDefault(game, "SuperDerpy", "fullscreen", IS_POCKETCHIP ? "0" : "1"), NULL, 10);
|
||||
game->config.music = strtol(GetConfigOptionDefault(game, "SuperDerpy", "music", "10"), NULL, 10);
|
||||
game->config.voice = strtol(GetConfigOptionDefault(game, "SuperDerpy", "voice", "10"), NULL, 10);
|
||||
game->config.fx = strtol(GetConfigOptionDefault(game, "SuperDerpy", "fx", "10"), NULL, 10);
|
||||
|
|
Loading…
Reference in a new issue