migrada configuracio a yaml
This commit is contained in:
@@ -156,14 +156,9 @@ namespace Options {
|
||||
void saveToFile(std::ofstream& file) const {
|
||||
for (size_t i = 0; i < MAX_PLAYERS; ++i) {
|
||||
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";
|
||||
} else {
|
||||
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 << " - name: \"" << (gamepad.path.empty() ? "" : gamepad.name) << "\"\n";
|
||||
file << " path: \"" << gamepad.path << "\"\n";
|
||||
file << " player: " << static_cast<int>(gamepad.player_id) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user