presets en yaml

This commit is contained in:
2026-04-17 19:56:43 +02:00
parent 7f703390f9
commit 5889df2a47
13 changed files with 519 additions and 161 deletions

View File

@@ -0,0 +1,42 @@
#include "core/input/global_inputs.hpp"
#include "core/input/input.h"
#include "core/rendering/screen.h"
namespace GlobalInputs {
auto handle(Screen *screen, Input *input) -> bool {
if (screen == nullptr || input == nullptr) { return false; }
if (input->checkInput(input_window_fullscreen, REPEAT_FALSE)) {
screen->toggleVideoMode();
return true;
}
if (input->checkInput(input_window_dec_size, REPEAT_FALSE)) {
screen->decWindowZoom();
return true;
}
if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) {
screen->incWindowZoom();
return true;
}
if (input->checkInput(input_prev_preset, REPEAT_FALSE)) {
screen->prevPreset();
return true;
}
if (input->checkInput(input_next_preset, REPEAT_FALSE)) {
screen->nextPreset();
return true;
}
if (input->checkInput(input_toggle_shader, REPEAT_FALSE)) {
screen->toggleShaderEnabled();
return true;
}
if (input->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
screen->toggleActiveShader();
return true;
}
return false;
}
} // namespace GlobalInputs