fix: petada per tancar mal director (supose que introduit per Claude al pasar a sdl_callbacks)

eliminat codi mort d'screen
This commit is contained in:
2026-04-13 16:44:27 +02:00
parent 86323a0e56
commit 66c3e0089c
6 changed files with 35 additions and 182 deletions

View File

@@ -1,9 +1,9 @@
#include "director.h"
#include <SDL3/SDL.h>
#include <errno.h> // for errno, EEXIST, EACCES, ENAMETOO...
#include <stdio.h> // for printf, perror
#include <string.h> // for strcmp
#include <errno.h> // for errno, EEXIST, EACCES, ENAMETOO...
#include <stdio.h> // for printf, perror
#include <string.h> // for strcmp
#ifndef __EMSCRIPTEN__
#include <sys/stat.h> // for mkdir, stat, S_IRWXU
#include <unistd.h> // for getuid
@@ -91,6 +91,14 @@ Director::Director(int argc, const char *argv[]) {
Director::~Director() {
saveConfigFile();
// Libera las secciones primero: sus destructores tocan audio/render SDL
// (p.ej. Intro::~Intro llama a JA_DeleteMusic) y deben ejecutarse antes
// de SDL_Quit().
logo.reset();
intro.reset();
title.reset();
game.reset();
delete asset;
delete input;
delete screen;