Fix: F5 (toggle scaling) respeta resolución personalizada

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 <noreply@anthropic.com>
This commit is contained in:
2025-10-04 13:43:59 +02:00
parent e24f06ed90
commit 1e5c9f8f9d

View File

@@ -954,7 +954,7 @@ void Engine::toggleIntegerScaling() {
break; break;
} }
SDL_SetRenderLogicalPresentation(renderer_, SCREEN_WIDTH, SCREEN_HEIGHT, presentation); SDL_SetRenderLogicalPresentation(renderer_, current_screen_width_, current_screen_height_, presentation);
// Mostrar texto informativo // Mostrar texto informativo
text_ = "SCALING: "; text_ = "SCALING: ";