From 73377e029ff92ecbf3d2936f07a7519c87d7e80a Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 4 Nov 2025 01:47:05 -0500 Subject: [PATCH] support deck gryo --- libultraship | 2 +- .../controls/SohInputEditorWindow.cpp | 24 +++++++++++++++++++ .../controls/SohInputEditorWindow.h | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/libultraship b/libultraship index 5f4be9b6f5f..6ac144011a3 160000 --- a/libultraship +++ b/libultraship @@ -1 +1 @@ -Subproject commit 5f4be9b6f5f74917c303ab8b66a0b2f4ef91613d +Subproject commit 6ac144011a346354d08eacf893a67a7c74b59179 diff --git a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp index 208833d6149..66c520bda98 100644 --- a/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp +++ b/soh/soh/Enhancements/controls/SohInputEditorWindow.cpp @@ -1492,6 +1492,20 @@ void SohInputEditorWindow::DrawDpadControlPanel() { Ship::GuiWindow::EndGroupPanel(0); } +void SohInputEditorWindow::DrawAdvancedControlPanel() { + ImVec2 cursor = ImGui::GetCursorPos(); + ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); + Ship::GuiWindow::BeginGroupPanel("Advanced Options", ImGui::GetContentRegionAvail()); + + CVarCheckbox("Disable Steam virtual gamepad", CVAR_CONTROLLER_DISABLE_STEAM_VIRTUAL_GAMEPAD, + CheckboxOptions() + .Color(THEME_COLOR) + .DefaultValue(false) + .Tooltip("Requires Restart. Must be checked for Steam Deck gyro.")); + + Ship::GuiWindow::EndGroupPanel(0); +} + void SohInputEditorWindow::DrawDeviceToggles(uint8_t portIndex) { ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true); @@ -1680,6 +1694,16 @@ void SohInputEditorWindow::DrawLinkTab() { ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.0f, 0.0f, 0.0f, 1.0f)); } + if (ImGui::CollapsingHeader("Advanced Options")) { + ImGui::PopStyleColor(); + ImGui::PopStyleColor(); + ImGui::PopStyleColor(); + DrawAdvancedControlPanel(); + ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.133f, 0.133f, 0.133f, 1.0f)); + ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.0f, 0.0f, 0.0f, 1.0f)); + ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.0f, 0.0f, 0.0f, 1.0f)); + } + ImGui::PopStyleColor(); ImGui::PopStyleColor(); ImGui::PopStyleColor(); diff --git a/soh/soh/Enhancements/controls/SohInputEditorWindow.h b/soh/soh/Enhancements/controls/SohInputEditorWindow.h index a6815f060aa..41c40ba4b0e 100644 --- a/soh/soh/Enhancements/controls/SohInputEditorWindow.h +++ b/soh/soh/Enhancements/controls/SohInputEditorWindow.h @@ -67,6 +67,7 @@ class SohInputEditorWindow final : public Ship::GuiWindow { void DrawOcarinaControlPanel(); void DrawCameraControlPanel(); void DrawDpadControlPanel(); + void DrawAdvancedControlPanel(); int32_t mGameInputBlockTimer; int32_t mMappingInputBlockTimer;