desactivat eixir del joc en la versió WASM (milestone 5)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -638,9 +638,16 @@ void Director::handleSectionTransition() {
|
||||
|
||||
// Ejecuta un frame del juego
|
||||
SDL_AppResult Director::iterate() {
|
||||
#ifdef __EMSCRIPTEN__
|
||||
// En WASM no se puede salir: reinicia al logo
|
||||
if (section->name == SECTION_PROG_QUIT) {
|
||||
section->name = SECTION_PROG_LOGO;
|
||||
}
|
||||
#else
|
||||
if (section->name == SECTION_PROG_QUIT) {
|
||||
return SDL_APP_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Gestiona las transiciones entre secciones
|
||||
handleSectionTransition();
|
||||
@@ -668,11 +675,13 @@ SDL_AppResult Director::iterate() {
|
||||
|
||||
// Procesa un evento
|
||||
SDL_AppResult Director::handleEvent(SDL_Event *event) {
|
||||
#ifndef __EMSCRIPTEN__
|
||||
// Evento de salida de la aplicación
|
||||
if (event->type == SDL_EVENT_QUIT) {
|
||||
section->name = SECTION_PROG_QUIT;
|
||||
return SDL_APP_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Reenvía el evento a la sección activa
|
||||
switch (activeSection) {
|
||||
|
||||
Reference in New Issue
Block a user