Added DPad support to file selection and pause screens (#124)

* Added DPad support to file selection and pause screens

* Wrap changes behind CVar

* Fix merge conflict for real

* Remove unnecessary const_cast

* Fixed transparent texture making framebuffers also transparent in D3D11. (#84)

This happened with the Mirror Shield in the inventory screen preview.

* Add save editor

* Added DPad support to file selection and pause screens

* Fixing rebase conflict

* Remove unnecessary const_cast

Co-authored-by: MaikelChan <maikelchan88@gmail.com>
Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
This commit is contained in:
Josh Bodner
2022-04-10 15:19:26 -07:00
committed by GitHub
parent 3e8c48c116
commit 06fd7f662a
12 changed files with 163 additions and 136 deletions

View File

@@ -59,7 +59,7 @@ namespace Game {
CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu);
Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]);
CVar_SetS32(const_cast<char*>("gMinimalUI"), Settings.enhancements.minimal_ui);
CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui);
// Audio
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
@@ -89,6 +89,9 @@ namespace Game {
Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]);
CVar_SetS32("gInputEnabled", Settings.controller.input_enabled);
Settings.controller.dpad_pause_name = stob(Conf[ControllerSection]["dpad_pause_name"]);
CVar_SetS32("gDpadPauseName", Settings.controller.dpad_pause_name);
// Cheats
Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]);
@@ -149,6 +152,7 @@ namespace Game {
Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength);
Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale);
Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled);
Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name);
// Cheats
Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode);

View File

@@ -34,6 +34,7 @@ struct SoHConfigType {
float gyroDriftX = 0.0f;
float gyroDriftY = 0.0f;
bool input_enabled = false;
bool dpad_pause_name = false;
} controller;
// Cheats

View File

@@ -353,6 +353,13 @@ namespace SohImGui {
needs_save = true;
}
ImGui::Separator();
if (ImGui::Checkbox("Dpad Support on Pause and File Select", &Game::Settings.controller.dpad_pause_name)) {
CVar_SetS32("gDpadPauseName", Game::Settings.controller.dpad_pause_name);
needs_save = true;
}
ImGui::EndMenu();
}
@@ -367,7 +374,7 @@ namespace SohImGui {
}
if (ImGui::Checkbox("Minimal UI", &Game::Settings.enhancements.minimal_ui)) {
CVar_SetS32(const_cast<char*>("gMinimalUI"), Game::Settings.enhancements.minimal_ui);
CVar_SetS32("gMinimalUI", Game::Settings.enhancements.minimal_ui);
needs_save = true;
}