migrat fitxer de config a v2
This commit is contained in:
@@ -58,6 +58,7 @@ struct Audio {
|
||||
};
|
||||
|
||||
struct Settings {
|
||||
int config_version = 2; // Versión del archivo de configuración
|
||||
Difficulty::Code difficulty = Difficulty::Code::NORMAL; // Dificultad del juego
|
||||
Lang::Code language = Lang::Code::VALENCIAN; // Idioma usado en el juego
|
||||
bool autofire = GameDefaults::Options::SETTINGS_AUTOFIRE; // Indicador de autofire
|
||||
@@ -158,12 +159,12 @@ class GamepadManager {
|
||||
const auto& gamepad = gamepads_[i];
|
||||
// Guardar el nombre solo si hay path (mando real asignado)
|
||||
if (!gamepad.path.empty()) {
|
||||
file << "controller." << i << ".name=" << gamepad.name << "\n";
|
||||
file << "controller." << i << ".name " << gamepad.name << "\n";
|
||||
} else {
|
||||
file << "controller." << i << ".name=\n"; // vacío
|
||||
file << "controller." << i << ".name \n"; // vacío
|
||||
}
|
||||
file << "controller." << i << ".path=" << gamepad.path << "\n";
|
||||
file << "controller." << i << ".player=" << static_cast<int>(gamepad.player_id) << "\n";
|
||||
file << "controller." << i << ".path " << gamepad.path << "\n";
|
||||
file << "controller." << i << ".player " << static_cast<int>(gamepad.player_id) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user