refactor
This commit is contained in:
@@ -135,15 +135,15 @@ Director::Director() {
|
||||
#endif
|
||||
|
||||
// Configura la ruta y carga las opciones desde un fichero
|
||||
Options::setConfigFile(Resource::List::get()->get("config.yaml")); // NOLINT(readability-static-accessed-through-instance)
|
||||
Options::setConfigFile(Resource::List::get()->get("config.yaml"));
|
||||
Options::loadFromFile();
|
||||
|
||||
// Configura la ruta y carga los presets de PostFX
|
||||
Options::setPostFXFile(Resource::List::get()->get("postfx.yaml")); // NOLINT(readability-static-accessed-through-instance)
|
||||
Options::setPostFXFile(Resource::List::get()->get("postfx.yaml"));
|
||||
Options::loadPostFXFromFile();
|
||||
|
||||
// Configura la ruta y carga los presets del shader CrtPi
|
||||
Options::setCrtPiFile(Resource::List::get()->get("crtpi.yaml")); // NOLINT(readability-static-accessed-through-instance)
|
||||
Options::setCrtPiFile(Resource::List::get()->get("crtpi.yaml"));
|
||||
Options::loadCrtPiFromFile();
|
||||
|
||||
// En mode quiosc, forçar pantalla completa independentment de la configuració
|
||||
@@ -193,7 +193,7 @@ Director::Director() {
|
||||
Input::init(gamecontroller_db);
|
||||
#else
|
||||
// In development, use Asset as normal
|
||||
Input::init(Resource::List::get()->get("gamecontrollerdb.txt")); // NOLINT(readability-static-accessed-through-instance) Carga configuración de controles
|
||||
Input::init(Resource::List::get()->get("gamecontrollerdb.txt")); // Carga configuración de controles
|
||||
#endif
|
||||
|
||||
// Aplica las teclas y botones del gamepad configurados desde Options
|
||||
@@ -211,13 +211,13 @@ Director::Director() {
|
||||
#ifdef RELEASE_BUILD
|
||||
{
|
||||
// En release el locale está en el pack, no en el filesystem
|
||||
std::string locale_key = Resource::List::get()->get(Options::language + ".yaml"); // NOLINT(readability-static-accessed-through-instance)
|
||||
std::string locale_key = Resource::List::get()->get(Options::language + ".yaml");
|
||||
auto locale_bytes = Resource::Helper::loadFile(locale_key);
|
||||
std::string locale_content(locale_bytes.begin(), locale_bytes.end());
|
||||
Locale::initFromContent(locale_content);
|
||||
}
|
||||
#else
|
||||
Locale::init(Resource::List::get()->get(Options::language + ".yaml")); // NOLINT(readability-static-accessed-through-instance)
|
||||
Locale::init(Resource::List::get()->get(Options::language + ".yaml"));
|
||||
#endif
|
||||
|
||||
// Special handling for cheevos.bin - also needs filesystem path
|
||||
@@ -257,7 +257,7 @@ Director::~Director() {
|
||||
}
|
||||
|
||||
// Crea la carpeta del sistema donde guardar datos
|
||||
void Director::createSystemFolder(const std::string& folder) { // NOLINT(readability-convert-member-functions-to-static)
|
||||
void Director::createSystemFolder(const std::string& folder) {
|
||||
#ifdef _WIN32
|
||||
system_folder_ = std::string(getenv("APPDATA")) + "/" + folder;
|
||||
#elif __APPLE__
|
||||
@@ -312,7 +312,7 @@ void Director::createSystemFolder(const std::string& folder) { // NOLINT(readab
|
||||
}
|
||||
|
||||
// Carga la configuración de assets desde assets.yaml
|
||||
void Director::setFileList() { // NOLINT(readability-convert-member-functions-to-static)
|
||||
void Director::setFileList() {
|
||||
// Determinar el prefijo de ruta según la plataforma
|
||||
#ifdef MACOS_BUNDLE
|
||||
const std::string PREFIX = "/../Resources";
|
||||
|
||||
Reference in New Issue
Block a user