Compare commits
2 Commits
2fbdf0753a
...
71a0fff764
| Author | SHA1 | Date | |
|---|---|---|---|
| 71a0fff764 | |||
| 6ce0e756fb |
@@ -2,6 +2,7 @@
|
||||
#include <SDL3/SDL_log.h> // Para SDL_LogInfo, SDL_LogCategory
|
||||
#include "mouse.h" // Para handleEvent
|
||||
#include "section.h" // Para Name, Options, name, options
|
||||
#include "screen.h"
|
||||
|
||||
namespace GlobalEvents
|
||||
{
|
||||
@@ -21,6 +22,7 @@ namespace GlobalEvents
|
||||
break;
|
||||
|
||||
case SDL_EVENT_WINDOW_RESIZED:
|
||||
Screen::get()->initShaders();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -124,7 +124,6 @@ void Screen::renderScreen()
|
||||
void Screen::setFullscreenMode()
|
||||
{
|
||||
SDL_SetWindowFullscreen(window_, Options::video.fullscreen);
|
||||
initShaders();
|
||||
}
|
||||
|
||||
// Camibia entre pantalla completa y ventana
|
||||
@@ -291,8 +290,6 @@ void Screen::adjustWindowSize()
|
||||
|
||||
SDL_SetWindowPosition(window_, std::max(NEW_POS_X, WINDOWS_DECORATIONS_), std::max(NEW_POS_Y, 0));
|
||||
SDL_SetWindowSize(window_, WIDTH, HEIGHT);
|
||||
|
||||
initShaders();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
bool decWindowSize(); // Reduce el tamaño de la ventana
|
||||
bool incWindowSize(); // Aumenta el tamaño de la ventana
|
||||
void applySettings(); // Aplica los valores de las opciones
|
||||
void initShaders(); // Inicializa los shaders
|
||||
|
||||
// --- Efectos visuales ---
|
||||
void shake() { shake_effect_.enable(src_rect_, dst_rect_); } // Agita la pantalla
|
||||
@@ -203,7 +204,6 @@ private:
|
||||
void renderInfo(); // Muestra información por pantalla
|
||||
void renderScreen(); // Selecciona y ejecuta el método de renderizado adecuado
|
||||
void loadShaders(); // Carga el contenido del archivo GLSL
|
||||
void initShaders(); // Inicializa los shaders
|
||||
void adjustWindowSize(); // Calcula el tamaño de la ventana
|
||||
void getDisplayInfo(); // Obtiene información sobre la pantalla
|
||||
void renderOverlays(); // Renderiza todos los overlays y efectos
|
||||
|
||||
@@ -106,29 +106,32 @@ void Title::checkEvents()
|
||||
{
|
||||
case SDLK_1: // Redefine los botones del mando #0
|
||||
define_buttons_->enable(0);
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
case SDLK_2: // Redefine los botones del mando #1
|
||||
define_buttons_->enable(1);
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
case SDLK_3: // Intercambia los mandos entre los dos jugadores
|
||||
swapControllers();
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
case SDLK_4: // Intercambia la asignación del teclado
|
||||
swapKeyboard();
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
case SDLK_5: // Muestra la asignación de mandos y teclado
|
||||
showControllers();
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
resetCounter();
|
||||
}
|
||||
|
||||
GlobalEvents::check(event);
|
||||
|
||||
Reference in New Issue
Block a user