Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d58da536c | ||
|
|
583acb9053 |
No files matched your search
@@ -69,8 +69,9 @@ Director::Director() {
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
// Prepara la carpeta de sistema (~/.config/jailgames/aee_arcade/) i carrega
|
||||
// les opcions; si no existeix config.yaml el crea amb els defaults.
|
||||
// Prepara la carpeta de sistema (per plataforma: %APPDATA% a Windows,
|
||||
// ~/Library/Application Support a macOS, ~/.config a Linux) i carrega les
|
||||
// opcions; si no existeix config.yaml el crea amb els defaults.
|
||||
createSystemFolder();
|
||||
|
||||
// Gamepad: descobreix mandos presents silenciosament. Cal fer-ho ABANS
|
||||
@@ -331,17 +332,29 @@ Director::~Director() {
|
||||
}
|
||||
|
||||
void Director::createSystemFolder() {
|
||||
// Volem la config a $XDG_CONFIG_HOME/jailgames/aee_arcade/ (defecte
|
||||
// ~/.config/jailgames/aee_arcade/). SDL_GetPrefPath apunta a XDG_DATA_HOME
|
||||
// (.local/share), que és el lloc per a dades, no per a configuració.
|
||||
const char* xdg = std::getenv("XDG_CONFIG_HOME");
|
||||
// Carpeta de configuració per plataforma:
|
||||
// - Windows: %APPDATA%\jailgames\aee_arcade\
|
||||
// - macOS: ~/Library/Application Support/jailgames/aee_arcade/
|
||||
// - Linux: $XDG_CONFIG_HOME/jailgames/aee_arcade/ (defecte
|
||||
// ~/.config/jailgames/aee_arcade/)
|
||||
// No fem servir SDL_GetPrefPath: a Linux apunta a XDG_DATA_HOME
|
||||
// (~/.local/share), que és per a dades, no per a configuració.
|
||||
std::string base;
|
||||
#ifdef _WIN32
|
||||
const char* appdata = std::getenv("APPDATA");
|
||||
base = (appdata != nullptr && *appdata != '\0') ? std::string(appdata) : ".";
|
||||
#elif defined(__APPLE__)
|
||||
const char* home = std::getenv("HOME");
|
||||
base = (home != nullptr) ? std::string(home) + "/Library/Application Support" : ".";
|
||||
#else
|
||||
const char* xdg = std::getenv("XDG_CONFIG_HOME");
|
||||
if (xdg != nullptr && *xdg != '\0') {
|
||||
base = xdg;
|
||||
} else {
|
||||
const char* home = std::getenv("HOME");
|
||||
base = (home != nullptr) ? std::string(home) + "/.config" : ".";
|
||||
}
|
||||
#endif
|
||||
system_folder_ = base + "/jailgames/aee_arcade/";
|
||||
|
||||
std::error_code error;
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
#include <string>
|
||||
|
||||
// Configuració personal de desenvolupament, carregada de `debug.yaml` dins la
|
||||
// carpeta de sistema (`$XDG_CONFIG_HOME/jailgames/aee_arcade/debug.yaml`). No es
|
||||
// versiona: cada dev el crea a la seua màquina. Si no existeix, s'aplica el
|
||||
// valor per defecte (GAME) sense warning de nivell error.
|
||||
// carpeta de sistema del joc (vegeu `Director::createSystemFolder` per la
|
||||
// ubicació real per plataforma). No es versiona: cada dev el crea a la seua
|
||||
// màquina. Si no existeix, s'aplica el valor per defecte (GAME) sense warning
|
||||
// de nivell error.
|
||||
namespace DebugConfig {
|
||||
|
||||
enum class StartScene : std::uint8_t { LOGO,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Texts {
|
||||
constexpr const char* WINDOW_TITLE = "© 2026 Aventures en Egipte ARCADE — JailDesigner";
|
||||
constexpr const char* COPYRIGHT = "© 2026 JailDesigner";
|
||||
constexpr const char* VERSION = "0.37.0"; // Single source of truth — Makefile el grep
|
||||
constexpr const char* VERSION = "0.38.0"; // Single source of truth — Makefile el grep
|
||||
} // namespace Texts
|
||||
|
||||
namespace GameCanvas {
|
||||
|
||||
Reference in new issue
Block a user