frame: gamepad emulation

This commit is contained in:
galister
2026-10-27 22:08:23 +01:00
committed by xytovl
parent 64ae13e293
commit 528f8e7246
7 changed files with 285 additions and 16 deletions
+13
View File
@@ -574,6 +574,19 @@ void settings_devices(const settings_context & ctx)
.default_bool = default_config.forward_gamepad,
});
if (ctx.instance.has_extension("XR_VALVE_frame_controller_interaction"))
{
list.push_back({
.id = "##emulated_gamepad",
.label = _C("setting name", "Emulated Gamepad"),
.description = _("Double-click both grips to start using your controllers as a gamepad."),
.ui = ui_kind::toggle,
.get_bool = [&config] { return config.emulated_gamepad; },
.set_bool = [&config](bool v) { config.emulated_gamepad = v; config.save(); },
.default_bool = default_config.emulated_gamepad,
});
}
ui::page_header(_cS("page header title", "Devices"), _cS("page header subtitle", "Forward input devices to the PC."));
render_settings(ctx, "##devices", list);