config: Default to windowed 480x273 on PocketCHIP

Fullscreen windows have some issues with its driver.
This commit is contained in:
Sebastian Krzyszkowiak 2022-07-19 00:58:58 +02:00
parent c75ef0b72c
commit 7094ce5b95
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF
2 changed files with 13 additions and 1 deletions

View file

@ -52,6 +52,12 @@
#define IS_EMSCRIPTEN false #define IS_EMSCRIPTEN false
#endif #endif
#ifdef POCKETCHIP
#define IS_POCKETCHIP true
#else
#define IS_POCKETCHIP false
#endif
#ifdef ALLEGRO_WINDOWS #ifdef ALLEGRO_WINDOWS
#define LIBRARY_EXTENSION ".dll" #define LIBRARY_EXTENSION ".dll"
#elif defined(__EMSCRIPTEN__) #elif defined(__EMSCRIPTEN__)

View file

@ -39,6 +39,9 @@ static char* GetDefaultWindowWidth(struct Game* game) {
aspect = 1.0; aspect = 1.0;
} }
snprintf(buf, 255, "%d", (int)(720 * aspect)); snprintf(buf, 255, "%d", (int)(720 * aspect));
#ifdef POCKETCHIP
snprintf(buf, 255, "%d", 480);
#endif
return AddGarbage(game, buf); return AddGarbage(game, buf);
} }
@ -49,6 +52,9 @@ static char* GetDefaultWindowHeight(struct Game* game) {
aspect = 1.0; aspect = 1.0;
} }
snprintf(buf, 255, "%d", (int)(720 / aspect)); snprintf(buf, 255, "%d", (int)(720 / aspect));
#ifdef POCKETCHIP
snprintf(buf, 255, "%d", 273);
#endif
return AddGarbage(game, buf); 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->_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.music = strtol(GetConfigOptionDefault(game, "SuperDerpy", "music", "10"), NULL, 10);
game->config.voice = strtol(GetConfigOptionDefault(game, "SuperDerpy", "voice", "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); game->config.fx = strtol(GetConfigOptionDefault(game, "SuperDerpy", "fx", "10"), NULL, 10);