hotkeys de shaders a F4/F5/F6
This commit is contained in:
@@ -84,7 +84,7 @@ Pipeline SDL3 GPU portat de `coffee_crisis_arcade_edition`. El canvas 256×192 e
|
||||
- `videoGpuPreferredDriver` (string, buit = auto)
|
||||
- `videoShaderEnabled` (bool)
|
||||
- `videoShaderType` (0=POSTFX, 1=CRTPI)
|
||||
- **Hotkeys** (provisionals fins que hi hagi menú d'opcions): `F9` toggle GPU · `F10` toggle shader · `F11` alterna POSTFX ↔ CRTPI.
|
||||
- **Hotkeys** (provisionals fins que hi hagi menú d'opcions): `F4` activa/desactiva post-procesado · `F5` alterna POSTFX ↔ CRTPI (només si està actiu) · `F6` següent preset (només si està actiu). No hi ha tecla per a preset anterior.
|
||||
- **API** a `Screen`: `setGpuAcceleration`/`toggleGpuAcceleration`/`isGpuAccelerated`, `setShaderEnabled`/`toggleShaderEnabled`/`isShaderEnabled`, `setActiveShader`/`toggleActiveShader`/`getActiveShader`.
|
||||
|
||||
Presets PostFX/CrtPi i cicle de presets encara **no** estan implementats — arribaran amb la migració a YAML. Per ara, valors per defecte hardcoded.
|
||||
|
||||
@@ -20,21 +20,20 @@ namespace GlobalInputs {
|
||||
Screen::get()->incWindowZoom();
|
||||
return true;
|
||||
}
|
||||
if (Input::get()->checkInput(input_prev_preset, REPEAT_FALSE)) {
|
||||
Screen::get()->prevPreset();
|
||||
return true;
|
||||
}
|
||||
if (Input::get()->checkInput(input_next_preset, REPEAT_FALSE)) {
|
||||
Screen::get()->nextPreset();
|
||||
return true;
|
||||
}
|
||||
if (Input::get()->checkInput(input_toggle_shader, REPEAT_FALSE)) {
|
||||
Screen::get()->toggleShaderEnabled();
|
||||
return true;
|
||||
}
|
||||
if (Input::get()->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
|
||||
Screen::get()->toggleActiveShader();
|
||||
return true;
|
||||
// F5/F6 només actuen quan el post-procesado està actiu.
|
||||
if (Screen::get()->isShaderEnabled()) {
|
||||
if (Input::get()->checkInput(input_toggle_shader_type, REPEAT_FALSE)) {
|
||||
Screen::get()->toggleActiveShader();
|
||||
return true;
|
||||
}
|
||||
if (Input::get()->checkInput(input_next_preset, REPEAT_FALSE)) {
|
||||
Screen::get()->nextPreset();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ enum inputs_e {
|
||||
input_window_dec_size,
|
||||
|
||||
// GPU / shaders (hotkeys provisionales hasta que haya menú de opciones)
|
||||
input_prev_preset,
|
||||
input_next_preset,
|
||||
input_toggle_shader,
|
||||
input_toggle_shader_type,
|
||||
|
||||
@@ -210,10 +210,9 @@ void Director::initInput() {
|
||||
Input::get()->bindKey(input_window_dec_size, SDL_SCANCODE_F1);
|
||||
Input::get()->bindKey(input_window_inc_size, SDL_SCANCODE_F2);
|
||||
Input::get()->bindKey(input_window_fullscreen, SDL_SCANCODE_F3);
|
||||
Input::get()->bindKey(input_prev_preset, SDL_SCANCODE_F8);
|
||||
Input::get()->bindKey(input_next_preset, SDL_SCANCODE_F9);
|
||||
Input::get()->bindKey(input_toggle_shader, SDL_SCANCODE_F10);
|
||||
Input::get()->bindKey(input_toggle_shader_type, SDL_SCANCODE_F11);
|
||||
Input::get()->bindKey(input_toggle_shader, SDL_SCANCODE_F4);
|
||||
Input::get()->bindKey(input_toggle_shader_type, SDL_SCANCODE_F5);
|
||||
Input::get()->bindKey(input_next_preset, SDL_SCANCODE_F6);
|
||||
|
||||
// Mando - Movimiento del jugador
|
||||
Input::get()->bindGameControllerButton(input_up, SDL_GAMEPAD_BUTTON_DPAD_UP);
|
||||
|
||||
Reference in New Issue
Block a user