primera implementacio de sdl3gpu

This commit is contained in:
2026-04-04 19:49:58 +02:00
parent 2c7b70911e
commit 2a774f777f
10 changed files with 103 additions and 29 deletions

View File

@@ -18,6 +18,7 @@ namespace GlobalInputs {
static bool ss_prev = false;
static bool next_shader_prev = false;
static bool next_preset_prev = false;
static bool stretch_filter_prev = false;
auto handle() -> bool {
bool consumed = false;
@@ -84,7 +85,9 @@ namespace GlobalInputs {
bool next_shader = JI_KeyPressed(Options::keys_gui.next_shader);
if (next_shader && !next_shader_prev) {
Screen::get()->nextShaderPreset();
Overlay::showNotification(Screen::get()->isHardwareAccelerated() ? "POSTFX / CRT-PI" : "SENSE GPU");
char msg[32];
snprintf(msg, sizeof(msg), "SHADER: %s", Screen::get()->getActiveShaderName());
Overlay::showNotification(msg);
}
if (next_shader) consumed = true;
next_shader_prev = next_shader;
@@ -98,6 +101,15 @@ namespace GlobalInputs {
if (next_preset) consumed = true;
next_preset_prev = next_preset;
// F9 — Toggle filtre d'estirament 4:3 (NEAREST ↔ LINEAR)
bool stretch_filter = JI_KeyPressed(Options::keys_gui.toggle_stretch_filter);
if (stretch_filter && !stretch_filter_prev) {
Screen::get()->toggleStretchFilter();
Overlay::showNotification(Options::video.stretch_filter_linear ? "FILTRE: LINEAR" : "FILTRE: NEAREST");
}
if (stretch_filter) consumed = true;
stretch_filter_prev = stretch_filter;
return consumed;
}