corregit: el mode demo ja funciona correctament

This commit is contained in:
2025-09-29 12:47:13 +02:00
parent fa0af1179a
commit c16fc1bae5
11 changed files with 189 additions and 160 deletions

View File

@@ -363,7 +363,7 @@ bool saveDemoFile(const std::string &file_path, const DemoData &dd) {
if (file) {
// Guarda los datos
for (const auto &data : dd) {
if (SDL_RWwrite(file, &data, sizeof(DemoKeys), 1) != 1) {
if (SDL_WriteIO(file, &data, sizeof(DemoKeys)) != sizeof(DemoKeys)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error al escribir el fichero %s", getFileName(file_path).c_str());
success = false;
break;