From 852cda198412fb1ee9761ac3c88550aa31ddd5b9 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 8 Mar 2026 22:43:47 +0100 Subject: [PATCH] =?UTF-8?q?en=20el=20mode=20quiosc=20s'ignora=20la=20pulsa?= =?UTF-8?q?ci=C3=B3=20d'F1,=20F2=20i=20F3=20i=20a=20mes=20comen=C3=A7a=20e?= =?UTF-8?q?n=20mode=20de=20pantalla=20completa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- source/core/input/global_inputs.cpp | 18 ++++++++++-------- source/core/system/director.cpp | 5 +++++ source/game/defaults.hpp | 4 ++-- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 70d6510..0417e71 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,6 @@ source/version.h resources.pack jdd_release/ tools/pack_resources/pack_resources -tools/pack_resources/pack_resources.exe \ No newline at end of file +tools/pack_resources/pack_resources.exe +tools/pack_resources/pack_tool +tools/pack_resources/pack_tool.exe diff --git a/source/core/input/global_inputs.cpp b/source/core/input/global_inputs.cpp index 110d77d..c64db5b 100644 --- a/source/core/input/global_inputs.cpp +++ b/source/core/input/global_inputs.cpp @@ -141,14 +141,16 @@ auto getPressedAction() -> InputAction { if (Input::get()->checkAction(InputAction::TOGGLE_BORDER, Input::DO_NOT_ALLOW_REPEAT)) { return InputAction::TOGGLE_BORDER; } - if (Input::get()->checkAction(InputAction::TOGGLE_FULLSCREEN, Input::DO_NOT_ALLOW_REPEAT)) { - return InputAction::TOGGLE_FULLSCREEN; - } - if (Input::get()->checkAction(InputAction::WINDOW_DEC_ZOOM, Input::DO_NOT_ALLOW_REPEAT)) { - return InputAction::WINDOW_DEC_ZOOM; - } - if (Input::get()->checkAction(InputAction::WINDOW_INC_ZOOM, Input::DO_NOT_ALLOW_REPEAT)) { - return InputAction::WINDOW_INC_ZOOM; + if (!Options::kiosk.enabled) { + if (Input::get()->checkAction(InputAction::TOGGLE_FULLSCREEN, Input::DO_NOT_ALLOW_REPEAT)) { + return InputAction::TOGGLE_FULLSCREEN; + } + if (Input::get()->checkAction(InputAction::WINDOW_DEC_ZOOM, Input::DO_NOT_ALLOW_REPEAT)) { + return InputAction::WINDOW_DEC_ZOOM; + } + if (Input::get()->checkAction(InputAction::WINDOW_INC_ZOOM, Input::DO_NOT_ALLOW_REPEAT)) { + return InputAction::WINDOW_INC_ZOOM; + } } if (Input::get()->checkAction(InputAction::TOGGLE_SHADERS, Input::DO_NOT_ALLOW_REPEAT)) { return InputAction::TOGGLE_SHADERS; diff --git a/source/core/system/director.cpp b/source/core/system/director.cpp index 3b68503..78a9325 100644 --- a/source/core/system/director.cpp +++ b/source/core/system/director.cpp @@ -122,6 +122,11 @@ Director::Director(std::vector const& args) { Options::setConfigFile(Resource::List::get()->get("config.yaml")); Options::loadFromFile(); + // En mode quiosc, forçar pantalla completa independentment de la configuració + if (Options::kiosk.enabled) { + Options::video.fullscreen = true; + } + // Inicializa JailAudio Audio::init(); diff --git a/source/game/defaults.hpp b/source/game/defaults.hpp index ebb21e7..0e2f9e3 100644 --- a/source/game/defaults.hpp +++ b/source/game/defaults.hpp @@ -100,7 +100,7 @@ namespace Game { namespace Room { #ifdef _DEBUG - constexpr const char* INITIAL = "03.yaml"; // Habitación de inicio en debug + constexpr const char* INITIAL = "51.yaml"; // Habitación de inicio en debug #else constexpr const char* INITIAL = "03.yaml"; // Habitación de inicio en release #endif @@ -109,7 +109,7 @@ namespace Room { namespace Player { #ifdef _DEBUG constexpr int SPAWN_X = 26 * Tile::SIZE; // Posición X inicial en debug - constexpr int SPAWN_Y = 13 * Tile::SIZE; // Posición Y inicial en debug + constexpr int SPAWN_Y = 10 * Tile::SIZE; // Posición Y inicial en debug constexpr SDL_FlipMode SPAWN_FLIP = Flip::LEFT; // Orientación inicial en debug #else constexpr int SPAWN_X = 25 * Tile::SIZE; // Posición X inicial en release