This commit is contained in:
2026-04-17 19:04:44 +02:00
parent 5fec0110b3
commit 1bb0ebdef8
30 changed files with 45791 additions and 23 deletions

View File

@@ -2530,6 +2530,18 @@ void Game::checkGameInput() {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
// Modo Demo activo
if (demo.enabled) {
const int index = 0;

View File

@@ -232,6 +232,18 @@ void Instructions::checkInput() {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
if (mode == m_auto) {
finished = true;

View File

@@ -208,6 +208,18 @@ void Intro::checkInput() {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
JA_StopMusic();
section->name = SECTION_PROG_TITLE;

View File

@@ -91,6 +91,18 @@ void Logo::checkInput() {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) {
section->name = SECTION_PROG_TITLE;
section->subsection = SUBSECTION_TITLE_1;

View File

@@ -236,10 +236,14 @@ void Title::update() {
if (coffeeBitmap->hasFinished() && crisisBitmap->hasFinished()) {
section->subsection = SUBSECTION_TITLE_2;
// Pantallazo blanco
// Pantallazo blanco: pintar sobre el gameCanvas y dejar
// que Screen::blit() presente por la ruta activa (GPU o
// SDL_Renderer). Un `SDL_RenderPresent(renderer)` directe
// crasheja quan el SDL3 GPU ha reclamat la ventana.
screen->start();
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
screen->blit();
// Reproduce el efecto sonoro
JA_PlaySound(crashSound);
@@ -650,6 +654,18 @@ void Title::checkInput() {
else if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) {
screen->incWindowZoom();
}
else if (input->checkInput(input_toggle_gpu, REPEAT_FALSE)) {
screen->toggleGpuAcceleration();
}
else if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
}
else if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
}
}
// Actualiza el tileado de fondo