Skip to content

Commit 85c351b

Browse files
committed
Few code style changes to new settings system
1 parent a25081a commit 85c351b

File tree

4 files changed

+117
-108
lines changed

4 files changed

+117
-108
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ target_sources(BetterVR_Layer PUBLIC
6868
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/logger.h
6969
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/update_checker.cpp
7070
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/update_checker.h
71-
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/controller_image.h
7271
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/mod_settings.h
7372
${CMAKE_CURRENT_SOURCE_DIR}/src/hooking/framebuffer.cpp
7473
${CMAKE_CURRENT_SOURCE_DIR}/src/hooking/framebuffer.h
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,95 @@
11
#pragma once
22

3+
void SetupImGuiStyle() {
4+
// Dark Ruda style by Raikiri from ImThemes
5+
ImGuiStyle& style = ImGui::GetStyle();
6+
7+
style.Alpha = 1.0f;
8+
style.DisabledAlpha = 0.6f;
9+
style.WindowPadding = ImVec2(8.0f, 8.0f);
10+
style.WindowRounding = 0.0f;
11+
style.WindowBorderSize = 1.0f;
12+
style.WindowMinSize = ImVec2(32.0f, 32.0f);
13+
style.WindowTitleAlign = ImVec2(0.0f, 0.5f);
14+
style.WindowMenuButtonPosition = ImGuiDir_Left;
15+
style.ChildRounding = 0.0f;
16+
style.ChildBorderSize = 1.0f;
17+
style.PopupRounding = 0.0f;
18+
style.PopupBorderSize = 1.0f;
19+
style.FramePadding = ImVec2(4.0f, 3.0f);
20+
style.FrameRounding = 4.0f;
21+
style.FrameBorderSize = 0.0f;
22+
style.ItemSpacing = ImVec2(8.0f, 4.0f);
23+
style.ItemInnerSpacing = ImVec2(4.0f, 4.0f);
24+
style.CellPadding = ImVec2(4.0f, 2.0f);
25+
style.IndentSpacing = 21.0f;
26+
style.ColumnsMinSpacing = 6.0f;
27+
style.ScrollbarSize = 14.0f;
28+
style.ScrollbarRounding = 9.0f;
29+
style.GrabMinSize = 10.0f;
30+
style.GrabRounding = 4.0f;
31+
style.TabRounding = 4.0f;
32+
style.TabBorderSize = 0.0f;
33+
//style.TabMinWidthForCloseButton = 0.0f;
34+
style.ColorButtonPosition = ImGuiDir_Right;
35+
style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
36+
style.SelectableTextAlign = ImVec2(0.0f, 0.0f);
37+
38+
style.Colors[ImGuiCol_Text] = ImVec4(0.9490196f, 0.95686275f, 0.9764706f, 1.0f);
39+
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.35686275f, 0.41960785f, 0.46666667f, 1.0f);
40+
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
41+
style.Colors[ImGuiCol_ChildBg] = ImVec4(0.14901961f, 0.1764706f, 0.21960784f, 1.0f);
42+
style.Colors[ImGuiCol_PopupBg] = ImVec4(0.078431375f, 0.078431375f, 0.078431375f, 0.94f);
43+
style.Colors[ImGuiCol_Border] = ImVec4(0.078431375f, 0.09803922f, 0.11764706f, 1.0f);
44+
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
45+
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
46+
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.11764706f, 0.2f, 0.2784314f, 1.0f);
47+
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.08627451f, 0.11764706f, 0.13725491f, 1.0f);
48+
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.08627451f, 0.11764706f, 0.13725491f, 0.65f);
49+
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.078431375f, 0.09803922f, 0.11764706f, 1.0f);
50+
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.0f, 0.0f, 0.0f, 0.51f);
51+
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.14901961f, 0.1764706f, 0.21960784f, 1.0f);
52+
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.019607844f, 0.019607844f, 0.019607844f, 0.39f);
53+
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
54+
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.1764706f, 0.21960784f, 0.24705882f, 1.0f);
55+
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.08627451f, 0.20784314f, 0.30980393f, 1.0f);
56+
style.Colors[ImGuiCol_CheckMark] = ImVec4(0.2784314f, 0.5568628f, 1.0f, 1.0f);
57+
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.2784314f, 0.5568628f, 1.0f, 1.0f);
58+
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.36862746f, 0.60784316f, 1.0f, 1.0f);
59+
style.Colors[ImGuiCol_Button] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
60+
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.2784314f, 0.5568628f, 1.0f, 1.0f);
61+
style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.05882353f, 0.5294118f, 0.9764706f, 1.0f);
62+
style.Colors[ImGuiCol_Header] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 0.55f);
63+
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.8f);
64+
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 1.0f);
65+
style.Colors[ImGuiCol_Separator] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
66+
style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.09803922f, 0.4f, 0.7490196f, 0.78f);
67+
style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.09803922f, 0.4f, 0.7490196f, 1.0f);
68+
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.25f);
69+
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.67f);
70+
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.95f);
71+
style.Colors[ImGuiCol_Tab] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
72+
style.Colors[ImGuiCol_TabHovered] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.8f);
73+
style.Colors[ImGuiCol_TabActive] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
74+
style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
75+
style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
76+
style.Colors[ImGuiCol_PlotLines] = ImVec4(0.60784316f, 0.60784316f, 0.60784316f, 1.0f);
77+
style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.0f, 0.42745098f, 0.34901962f, 1.0f);
78+
style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.8980392f, 0.69803923f, 0.0f, 1.0f);
79+
style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.0f, 0.6f, 0.0f, 1.0f);
80+
style.Colors[ImGuiCol_TableHeaderBg] = ImVec4(0.1882353f, 0.1882353f, 0.2f, 1.0f);
81+
style.Colors[ImGuiCol_TableBorderStrong] = ImVec4(0.30980393f, 0.30980393f, 0.34901962f, 1.0f);
82+
style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.22745098f, 0.22745098f, 0.24705882f, 1.0f);
83+
style.Colors[ImGuiCol_TableRowBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
84+
style.Colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.0f, 1.0f, 1.0f, 0.06f);
85+
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.35f);
86+
style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.0f, 1.0f, 0.0f, 0.9f);
87+
style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 1.0f);
88+
style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.0f, 1.0f, 1.0f, 0.7f);
89+
style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.8f, 0.8f, 0.8f, 0.2f);
90+
style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.8f, 0.8f, 0.8f, 0.35f);
91+
}
92+
393
// array size is 185402
494
static const uint8_t controls[] = {
595
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,

src/rendering/vulkan_imgui.cpp

Lines changed: 4 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -9,100 +9,10 @@
99
#include "stb_image.h"
1010

1111
// include font and assets
12+
#include "imgui_assets.h"
1213
#include "font_kenney.h"
1314
#include "font_roboto.h"
14-
#include "utils/controller_image.h"
15-
16-
17-
void SetupImGuiStyle() {
18-
// Dark Ruda style by Raikiri from ImThemes
19-
ImGuiStyle& style = ImGui::GetStyle();
20-
21-
style.Alpha = 1.0f;
22-
style.DisabledAlpha = 0.6f;
23-
style.WindowPadding = ImVec2(8.0f, 8.0f);
24-
style.WindowRounding = 0.0f;
25-
style.WindowBorderSize = 1.0f;
26-
style.WindowMinSize = ImVec2(32.0f, 32.0f);
27-
style.WindowTitleAlign = ImVec2(0.0f, 0.5f);
28-
style.WindowMenuButtonPosition = ImGuiDir_Left;
29-
style.ChildRounding = 0.0f;
30-
style.ChildBorderSize = 1.0f;
31-
style.PopupRounding = 0.0f;
32-
style.PopupBorderSize = 1.0f;
33-
style.FramePadding = ImVec2(4.0f, 3.0f);
34-
style.FrameRounding = 4.0f;
35-
style.FrameBorderSize = 0.0f;
36-
style.ItemSpacing = ImVec2(8.0f, 4.0f);
37-
style.ItemInnerSpacing = ImVec2(4.0f, 4.0f);
38-
style.CellPadding = ImVec2(4.0f, 2.0f);
39-
style.IndentSpacing = 21.0f;
40-
style.ColumnsMinSpacing = 6.0f;
41-
style.ScrollbarSize = 14.0f;
42-
style.ScrollbarRounding = 9.0f;
43-
style.GrabMinSize = 10.0f;
44-
style.GrabRounding = 4.0f;
45-
style.TabRounding = 4.0f;
46-
style.TabBorderSize = 0.0f;
47-
//style.TabMinWidthForCloseButton = 0.0f;
48-
style.ColorButtonPosition = ImGuiDir_Right;
49-
style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
50-
style.SelectableTextAlign = ImVec2(0.0f, 0.0f);
51-
52-
style.Colors[ImGuiCol_Text] = ImVec4(0.9490196f, 0.95686275f, 0.9764706f, 1.0f);
53-
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.35686275f, 0.41960785f, 0.46666667f, 1.0f);
54-
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
55-
style.Colors[ImGuiCol_ChildBg] = ImVec4(0.14901961f, 0.1764706f, 0.21960784f, 1.0f);
56-
style.Colors[ImGuiCol_PopupBg] = ImVec4(0.078431375f, 0.078431375f, 0.078431375f, 0.94f);
57-
style.Colors[ImGuiCol_Border] = ImVec4(0.078431375f, 0.09803922f, 0.11764706f, 1.0f);
58-
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
59-
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
60-
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.11764706f, 0.2f, 0.2784314f, 1.0f);
61-
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.08627451f, 0.11764706f, 0.13725491f, 1.0f);
62-
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.08627451f, 0.11764706f, 0.13725491f, 0.65f);
63-
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.078431375f, 0.09803922f, 0.11764706f, 1.0f);
64-
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.0f, 0.0f, 0.0f, 0.51f);
65-
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.14901961f, 0.1764706f, 0.21960784f, 1.0f);
66-
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.019607844f, 0.019607844f, 0.019607844f, 0.39f);
67-
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
68-
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.1764706f, 0.21960784f, 0.24705882f, 1.0f);
69-
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.08627451f, 0.20784314f, 0.30980393f, 1.0f);
70-
style.Colors[ImGuiCol_CheckMark] = ImVec4(0.2784314f, 0.5568628f, 1.0f, 1.0f);
71-
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.2784314f, 0.5568628f, 1.0f, 1.0f);
72-
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.36862746f, 0.60784316f, 1.0f, 1.0f);
73-
style.Colors[ImGuiCol_Button] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
74-
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.2784314f, 0.5568628f, 1.0f, 1.0f);
75-
style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.05882353f, 0.5294118f, 0.9764706f, 1.0f);
76-
style.Colors[ImGuiCol_Header] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 0.55f);
77-
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.8f);
78-
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 1.0f);
79-
style.Colors[ImGuiCol_Separator] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
80-
style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.09803922f, 0.4f, 0.7490196f, 0.78f);
81-
style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.09803922f, 0.4f, 0.7490196f, 1.0f);
82-
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.25f);
83-
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.67f);
84-
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.95f);
85-
style.Colors[ImGuiCol_Tab] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
86-
style.Colors[ImGuiCol_TabHovered] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.8f);
87-
style.Colors[ImGuiCol_TabActive] = ImVec4(0.2f, 0.24705882f, 0.28627452f, 1.0f);
88-
style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
89-
style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.10980392f, 0.14901961f, 0.16862746f, 1.0f);
90-
style.Colors[ImGuiCol_PlotLines] = ImVec4(0.60784316f, 0.60784316f, 0.60784316f, 1.0f);
91-
style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.0f, 0.42745098f, 0.34901962f, 1.0f);
92-
style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.8980392f, 0.69803923f, 0.0f, 1.0f);
93-
style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.0f, 0.6f, 0.0f, 1.0f);
94-
style.Colors[ImGuiCol_TableHeaderBg] = ImVec4(0.1882353f, 0.1882353f, 0.2f, 1.0f);
95-
style.Colors[ImGuiCol_TableBorderStrong] = ImVec4(0.30980393f, 0.30980393f, 0.34901962f, 1.0f);
96-
style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.22745098f, 0.22745098f, 0.24705882f, 1.0f);
97-
style.Colors[ImGuiCol_TableRowBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
98-
style.Colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.0f, 1.0f, 1.0f, 0.06f);
99-
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 0.35f);
100-
style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.0f, 1.0f, 0.0f, 0.9f);
101-
style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.25882354f, 0.5882353f, 0.9764706f, 1.0f);
102-
style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.0f, 1.0f, 1.0f, 0.7f);
103-
style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.8f, 0.8f, 0.8f, 0.2f);
104-
style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.8f, 0.8f, 0.8f, 0.35f);
105-
}
15+
10616

10717
RND_Renderer::ImGuiOverlay::ImGuiOverlay(VkCommandBuffer cb, VkExtent2D fbRes, VkFormat fbFormat): m_outputRes(fbRes) {
10818
ImGui::CreateContext();
@@ -825,14 +735,6 @@ void RND_Renderer::ImGuiOverlay::DrawHelpMenu() {
825735
DrawSettingRow("Stick Direction Threshold", [&]() {
826736
settings.axisThreshold.AddToGUI(&changed, windowWidth.x, 0.1f, 0.9f);
827737
});
828-
829-
DrawSettingRow("Reset Input Thresholds", [&]() {
830-
if (ImGui::Button("Reset##InputThresholds")) {
831-
settings.stickDeadzone = ModSettings::kDefaultStickDeadzone;
832-
settings.axisThreshold = ModSettings::kDefaultAxisThreshold;
833-
changed = true;
834-
}
835-
});
836738
}
837739
else {
838740
ImGui::Text("");
@@ -858,8 +760,8 @@ void RND_Renderer::ImGuiOverlay::DrawHelpMenu() {
858760
}
859761

860762
ImGui::NewLine();
861-
DrawSettingRow("Reset All Options", [&]() {
862-
if (ImGui::Button("Reset")) {
763+
DrawSettingRow("", [&]() {
764+
if (ImGui::Button("Reset All Settings")) {
863765
auto options = settings.GetOptions();
864766
for (int i = 0; i < options.size(); ++i) {
865767
options[i]->Reset();
@@ -868,7 +770,6 @@ void RND_Renderer::ImGuiOverlay::DrawHelpMenu() {
868770
}
869771
});
870772

871-
872773
ImGui::EndTabItem();
873774
}
874775

src/utils/mod_settings.h

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ class EnumSetting : public ModSetting<T> {
386386
for (T value : values) {
387387
if (value == defaultValue) return;
388388
}
389-
throw std::invalid_argument("Recieved illegal default value");
389+
throw std::invalid_argument("Received illegal default value");
390390
}
391391

392392
void Set(const T value) override {
@@ -509,7 +509,6 @@ enum class PerformanceOverlayMode : int32_t {
509509
};
510510

511511
struct ModSettings {
512-
public:
513512
static const char* toString(EventMode eventMode) {
514513
switch (eventMode) {
515514
case EventMode::NO_EVENT:
@@ -520,6 +519,8 @@ struct ModSettings {
520519
return "FOLLOW_DEFAULT_EVENT_SETTINGS";
521520
case EventMode::ALWAYS_THIRD_PERSON:
522521
return "ALWAYS_THIRD_PERSON";
522+
default:
523+
return "";
523524
}
524525
}
525526

@@ -531,6 +532,8 @@ struct ModSettings {
531532
return "Optimal Settings (Mix Of Third/First)";
532533
case EventMode::ALWAYS_THIRD_PERSON:
533534
return "Third Person (Always)";
535+
default:
536+
return "";
534537
}
535538
}
536539

@@ -540,6 +543,8 @@ struct ModSettings {
540543
return "THIRD_PERSON";
541544
case CameraMode::FIRST_PERSON:
542545
return "FIRST_PERSON";
546+
default:
547+
return "";
543548
}
544549
}
545550

@@ -549,6 +554,8 @@ struct ModSettings {
549554
return "Third Person";
550555
case CameraMode::FIRST_PERSON:
551556
return "First Person (Recommended)";
557+
default:
558+
return "";
552559
}
553560
}
554561

@@ -558,6 +565,8 @@ struct ModSettings {
558565
return "STANDING";
559566
case PlayMode::SEATED:
560567
return "SEATED";
568+
default:
569+
return "";
561570
}
562571
}
563572

@@ -567,6 +576,8 @@ struct ModSettings {
567576
return "Standing";
568577
case PlayMode::SEATED:
569578
return "Seated";
579+
default:
580+
return "";
570581
}
571582
}
572583

@@ -578,6 +589,8 @@ struct ModSettings {
578589
return "FORCED_ON";
579590
case AngularVelocityFixerMode::FORCED_OFF:
580591
return "FORCED_OFF";
592+
default:
593+
return "";
581594
}
582595
}
583596

@@ -589,6 +602,8 @@ struct ModSettings {
589602
return "Forced On";
590603
case AngularVelocityFixerMode::FORCED_OFF:
591604
return "Forced Off";
605+
default:
606+
return "";
592607
}
593608
}
594609

@@ -600,6 +615,8 @@ struct ModSettings {
600615
return "WINDOW_ONLY";
601616
case PerformanceOverlayMode::WINDOW_AND_VR:
602617
return "WINDOW_AND_VR";
618+
default:
619+
return "";
603620
}
604621
}
605622

@@ -611,14 +628,16 @@ struct ModSettings {
611628
return "Only show in Cemu window";
612629
case PerformanceOverlayMode::WINDOW_AND_VR:
613630
return "Show in both Cemu and VR";
631+
default:
632+
return "";
614633
}
615634
}
616635

617636
static constexpr float kDefaultAxisThreshold = 0.5f;
618637
static constexpr float kDefaultStickDeadzone = 0.15f;
619638

620639
// playing mode settings
621-
EnumSetting<CameraMode> cameraMode = EnumSetting<CameraMode>("CameraMode", CameraMode::FIRST_PERSON, ModSettings::toString, { CameraMode::THIRD_PERSON, CameraMode::FIRST_PERSON });
640+
EnumSetting<CameraMode> cameraMode = EnumSetting<CameraMode>("CameraMode", CameraMode::FIRST_PERSON, ModSettings::toString, { CameraMode::FIRST_PERSON, CameraMode::THIRD_PERSON });
622641
EnumSetting<PlayMode> playMode = EnumSetting<PlayMode>("PlayMode", PlayMode::STANDING, ModSettings::toString, { PlayMode::STANDING, PlayMode::SEATED });
623642
FloatSetting<float> thirdPlayerDistance = FloatSetting<float>("ThirdPlayerDistance", 0.5f, 0.0f);
624643
EnumSetting<EventMode> cutsceneCameraMode = EnumSetting<EventMode>("CutsceneCameraMode", EventMode::FOLLOW_DEFAULT_EVENT_SETTINGS, ModSettings::toString, { EventMode::ALWAYS_FIRST_PERSON, EventMode::FOLLOW_DEFAULT_EVENT_SETTINGS, EventMode::ALWAYS_THIRD_PERSON });
@@ -659,7 +678,7 @@ struct ModSettings {
659678
&tutorialPromptShown,
660679
&axisThreshold,
661680
&stickDeadzone
662-
});
681+
});
663682
}
664683

665684
CameraMode GetCameraMode() const { return cameraMode; }

0 commit comments

Comments
 (0)