From 1e5c9f8f9d6a40fe93e8a9839440845b87c32431 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 4 Oct 2025 13:43:59 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20F5=20(toggle=20scaling)=20respeta=20reso?= =?UTF-8?q?luci=C3=B3n=20personalizada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problema: - Con -w 960 -h 800, al pulsar F5 en fullscreen (F3) - La resolución cambiaba a 320x240 hardcoded - Pantalla quedaba rota con viewport diminuto Causa: toggleIntegerScaling() usaba SCREEN_WIDTH/HEIGHT constantes en SDL_SetRenderLogicalPresentation() Solución: Usar current_screen_width_/height_ dinámicos Ahora funciona: ./vibe3_physics -w 960 -h 800 F3 (fullscreen) → OK ✅ F5 (cambiar scaling) → OK ✅ ESC (salir fullscreen) → OK ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- source/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/engine.cpp b/source/engine.cpp index efa726d..8414302 100644 --- a/source/engine.cpp +++ b/source/engine.cpp @@ -954,7 +954,7 @@ void Engine::toggleIntegerScaling() { break; } - SDL_SetRenderLogicalPresentation(renderer_, SCREEN_WIDTH, SCREEN_HEIGHT, presentation); + SDL_SetRenderLogicalPresentation(renderer_, current_screen_width_, current_screen_height_, presentation); // Mostrar texto informativo text_ = "SCALING: ";