Asignada tecla F4 para activar/desactivar los shaders
This commit is contained in:
@@ -24,9 +24,12 @@ enum inputs_e
|
||||
input_fire_left,
|
||||
input_fire_center,
|
||||
input_fire_right,
|
||||
|
||||
// Inputs estandar
|
||||
input_window_fullscreen,
|
||||
input_window_inc_size,
|
||||
input_window_dec_size,
|
||||
input_video_shaders,
|
||||
|
||||
// Input obligatorio
|
||||
input_number_of_inputs
|
||||
|
||||
@@ -400,4 +400,11 @@ void Screen::doFlash()
|
||||
// Actualiza la lógica del efecto
|
||||
flashEffect.counter < flashEffect.lenght ? flashEffect.counter++ : flashEffect.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Activa/desactiva los shaders
|
||||
void Screen::switchShaders()
|
||||
{
|
||||
options->video.shaders = !options->video.shaders;
|
||||
setVideoMode(options->video.mode);
|
||||
}
|
||||
@@ -136,6 +136,9 @@ public:
|
||||
|
||||
// Pone la pantalla de color
|
||||
void flash(color_t color, int lenght);
|
||||
|
||||
// Activa/desactiva los shaders
|
||||
void switchShaders();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,7 @@ void Director::initInput()
|
||||
input->bindKey(input_window_dec_size, SDL_SCANCODE_F1);
|
||||
input->bindKey(input_window_inc_size, SDL_SCANCODE_F2);
|
||||
input->bindKey(input_window_fullscreen, SDL_SCANCODE_F3);
|
||||
input->bindKey(input_video_shaders, SDL_SCANCODE_F4);
|
||||
|
||||
// Mando - Movimiento del jugador
|
||||
input->bindGameControllerButton(input_up, SDL_CONTROLLER_BUTTON_DPAD_UP);
|
||||
@@ -169,7 +170,7 @@ bool Director::initSDL()
|
||||
}
|
||||
}
|
||||
|
||||
if (options->video.shaders)
|
||||
if (options->video.shaders || true)
|
||||
if (!SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl"))
|
||||
{
|
||||
if (options->console)
|
||||
@@ -205,7 +206,7 @@ bool Director::initSDL()
|
||||
}
|
||||
|
||||
// La aceleración se activa según las opciones
|
||||
if (options->video.shaders)
|
||||
if (options->video.shaders || true)
|
||||
{
|
||||
flags = flags | SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
|
||||
}
|
||||
|
||||
@@ -264,6 +264,11 @@ void Title::checkInput()
|
||||
screen->incWindowSize();
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_video_shaders, REPEAT_FALSE))
|
||||
{
|
||||
screen->switchShaders();
|
||||
}
|
||||
|
||||
else if (input->checkInput(input_accept, REPEAT_FALSE))
|
||||
{
|
||||
fade->activate();
|
||||
|
||||
Reference in New Issue
Block a user