Apanyats alguns bugs que quedaven respecte a lo del teclat

This commit is contained in:
2024-11-03 17:25:31 +01:00
parent 86cd7b0f16
commit 69a92cba66
6 changed files with 27 additions and 14 deletions

View File

@@ -166,17 +166,21 @@ bool saveOptionsFile(std::string file_path)
// Opciones de mandos
file << "\n\n## CONTROLLERS\n";
int controller_index = 0;
for (const auto &controller : options.controllers)
{
file << "\n";
file << "controller." << controller.index << ".name=" << controller.name << "\n";
file << "controller." << controller.index << ".player=" << controller.player_id << "\n";
file << "controller." << controller.index << ".type=" << static_cast<int>(controller.type) << "\n";
file << "controller." << controller.index << ".button.fire_left=" << controller.buttons.at(0) << "\n";
file << "controller." << controller.index << ".button.fire_center=" << controller.buttons.at(1) << "\n";
file << "controller." << controller.index << ".button.fire_right=" << controller.buttons.at(2) << "\n";
file << "controller." << controller.index << ".button.start=" << controller.buttons.at(3) << "\n";
file << "controller." << controller.index << ".button.service=" << controller.buttons.at(4) << "\n";
file << "controller." << controller_index << ".name=" << controller.name << "\n";
file << "controller." << controller_index << ".player=" << controller.player_id << "\n";
file << "controller." << controller_index << ".type=" << static_cast<int>(controller.type) << "\n";
file << "controller." << controller_index << ".button.fire_left=" << controller.buttons.at(0) << "\n";
file << "controller." << controller_index << ".button.fire_center=" << controller.buttons.at(1) << "\n";
file << "controller." << controller_index << ".button.fire_right=" << controller.buttons.at(2) << "\n";
file << "controller." << controller_index << ".button.start=" << controller.buttons.at(3) << "\n";
file << "controller." << controller_index << ".button.service=" << controller.buttons.at(4) << "\n";
// Incrementa el índice
++controller_index;
}
// Cierra el fichero