Refactor VR settings: remove deprecated options and update eye replay handling

This commit is contained in:
iChris4 committed 2026-09-26 03:02:07 +02:00
1 parent e4d198ee13
commit 566a22857c
6 files changed
+169 -237

No files matched your search

-44
View File
@@ -60,9 +60,6 @@ struct RuntimeUserConfig {
std::optional<bool> vrFlatScreen;
std::optional<bool> vrImmersiveWindow;
std::optional<bool> vrPassthrough;
std::optional<bool> vrStopAtDisplayCopy;
std::optional<bool> vrSkipCopyClears;
std::optional<bool> vrSinglePassEyes;
std::optional<std::string> vrMirrorView;
std::optional<std::string> vrControllerMode;
std::optional<uint32_t> vrFrameInterpolationFps;
@@ -538,17 +535,6 @@ inline void EnsureConfigFile() {
"# Quest (black elsewhere). Flat Screen mode wins over it.\n"
"# Changeable live from the F10 menu.\n"
"immersive_window = false\n"
"# EFB replay controls for the per-eye views, changeable live\n"
"# from the F10 menu. stop_at_display_copy ends each eye at the\n"
"# frame's final GXCopyDisp; skip_copy_clears drops the EFB\n"
"# reset a GX copy performs afterwards. Both keep that reset\n"
"# from erasing the eye, and both are safe to turn off.\n"
"stop_at_display_copy = true\n"
"skip_copy_clears = true\n"
"# Draw each eye in one render pass across the frame's GX copies,\n"
"# which only the desktop image performs: the same picture with\n"
"# less GPU memory traffic. Changeable live from the F10 menu.\n"
"single_pass_eyes = true\n"
"# Put the camera at the Player 1 driver's head instead of behind\n"
"# the kart, with the horizon kept level. Changeable live from the\n"
"# F10 menu, and only during a single-screen race.\n"
@@ -796,9 +782,6 @@ inline RuntimeUserConfig ParseConfigDocument(const toml::value& document) {
config.vrFlatScreen = FindConfigValue<bool>(document, "vr", "flat_screen");
config.vrImmersiveWindow = FindConfigValue<bool>(document, "vr", "immersive_window");
config.vrPassthrough = FindConfigValue<bool>(document, "vr", "passthrough");
config.vrStopAtDisplayCopy = FindConfigValue<bool>(document, "vr", "stop_at_display_copy");
config.vrSkipCopyClears = FindConfigValue<bool>(document, "vr", "skip_copy_clears");
config.vrSinglePassEyes = FindConfigValue<bool>(document, "vr", "single_pass_eyes");
config.vrFirstPerson = FindConfigValue<bool>(document, "vr", "first_person");
config.vrFirstPersonToggleClick = FindConfigValue<bool>(document, "vr", "first_person_toggle_click");
if (auto value = FindConfigFloat(document, "vr", "first_person_units_per_meter");
@@ -1130,21 +1113,6 @@ inline bool SetVrPassthrough(bool value) {
return WriteSetting("vr", "passthrough", value ? "true" : "false");
}
inline bool SetVrStopAtDisplayCopy(bool value) {
Mutable().vrStopAtDisplayCopy = value;
return WriteSetting("vr", "stop_at_display_copy", value ? "true" : "false");
}
inline bool SetVrSkipCopyClears(bool value) {
Mutable().vrSkipCopyClears = value;
return WriteSetting("vr", "skip_copy_clears", value ? "true" : "false");
}
inline bool SetVrSinglePassEyes(bool value) {
Mutable().vrSinglePassEyes = value;
return WriteSetting("vr", "single_pass_eyes", value ? "true" : "false");
}
inline bool SetVrFirstPerson(bool value) {
Mutable().vrFirstPerson = value;
return WriteSetting("vr", "first_person", value ? "true" : "false");
@@ -1654,18 +1622,6 @@ inline bool VrPassthrough(bool fallback = true) {
return Get().vrPassthrough.value_or(fallback);
}
inline bool VrStopAtDisplayCopy(bool fallback = true) {
return Get().vrStopAtDisplayCopy.value_or(fallback);
}
inline bool VrSkipCopyClears(bool fallback = true) {
return Get().vrSkipCopyClears.value_or(fallback);
}
inline bool VrSinglePassEyes(bool fallback = true) {
return Get().vrSinglePassEyes.value_or(fallback);
}
inline bool VrFirstPerson(bool fallback = false) {
return Get().vrFirstPerson.value_or(fallback);
}