diff --git a/source/ui/notifier.cpp b/source/ui/notifier.cpp index a5f8ffc..cea140a 100644 --- a/source/ui/notifier.cpp +++ b/source/ui/notifier.cpp @@ -159,10 +159,14 @@ void Notifier::render() { int bg_width = text_width + (NOTIFICATION_PADDING * 2); int bg_height = text_height + (NOTIFICATION_PADDING * 2); - // Centrar en la ventana FÍSICA (no usar viewport lógico) - // CRÍTICO: Como renderizamos en píxeles físicos absolutos (bypass de presentación lógica), - // debemos centrar usando dimensiones físicas, no el viewport lógico de SDL - int x = (window_width_ / 2) - (bg_width / 2); + // Obtener viewport actual (en modo letterbox F3 tiene dimensiones más pequeñas) + // CRÍTICO: Centrar usando dimensiones del VIEWPORT, no de la ventana física + // printAbsolute() aplicará el offset del viewport automáticamente + SDL_Rect viewport; + SDL_GetRenderViewport(renderer_, &viewport); + + // Centrar en el viewport (coordenadas relativas al viewport, no absolutas) + int x = (viewport.w / 2) - (bg_width / 2); int y = NOTIFICATION_TOP_MARGIN + static_cast(current_notification_->y_offset); // Renderizar fondo semitransparente (con bypass de presentación lógica)