Forgot to do this step when I overrode the cvars earlier (#471)

This commit is contained in:
Garrett Cox
2024-05-24 12:34:25 -05:00
committed by GitHub
parent 0ee3af6640
commit 86b5f10b26
4 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ void SetupGuiElements() {
style.ItemSpacing = ImVec2(8.0f, 6.0f);
style.Colors[ImGuiCol_MenuBarBg] = UIWidgets::Colors::DarkGray;
mBenMenuBar = std::make_shared<BenMenuBar>("gOpenMenuBar", CVarGetInteger("gOpenMenuBar", 0));
mBenMenuBar = std::make_shared<BenMenuBar>(CVAR_MENU_BAR_OPEN, CVarGetInteger(CVAR_MENU_BAR_OPEN, 0));
gui->SetMenuBar(std::reinterpret_pointer_cast<Ship::GuiMenuBar>(mBenMenuBar));
if (gui->GetMenuBar() && !gui->GetMenuBar()->IsVisible()) {
+10 -10
View File
@@ -172,17 +172,17 @@ void DrawSettingsMenu() {
if (UIWidgets::BeginMenu("Graphics")) {
#ifndef __APPLE__
if (UIWidgets::CVarSliderFloat("Internal Resolution: %f %%", "gInternalResolution", 0.5f, 2.0f, 1.0f)) {
if (UIWidgets::CVarSliderFloat("Internal Resolution: %f %%", CVAR_INTERNAL_RESOLUTION, 0.5f, 2.0f, 1.0f)) {
Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(
CVarGetFloat("gInternalResolution", 1));
CVarGetFloat(CVAR_INTERNAL_RESOLUTION, 1));
};
UIWidgets::Tooltip(
"Multiplies your output resolution by the value inputted, as a more intensive but effective "
"form of anti-aliasing");
#endif
#ifndef __WIIU__
if (UIWidgets::CVarSliderInt("MSAA: %d", "gMSAAValue", 1, 8, 1)) {
Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger("gMSAAValue", 1));
if (UIWidgets::CVarSliderInt("MSAA: %d", CVAR_MSAA_VALUE, 1, 8, 1)) {
Ship::Context::GetInstance()->GetWindow()->SetMsaaLevel(CVarGetInteger(CVAR_MSAA_VALUE, 1));
};
UIWidgets::Tooltip(
"Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel");
@@ -271,20 +271,20 @@ void DrawSettingsMenu() {
}
if (Ship::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) {
UIWidgets::CVarCheckbox("Enable Vsync", "gVsyncEnabled");
UIWidgets::CVarCheckbox("Enable Vsync", CVAR_VSYNC_ENABLED);
}
if (Ship::Context::GetInstance()->GetWindow()->SupportsWindowedFullscreen()) {
UIWidgets::CVarCheckbox("Windowed fullscreen", "gSdlWindowedFullscreen");
UIWidgets::CVarCheckbox("Windowed fullscreen", CVAR_SDL_WINDOWED_FULLSCREEN);
}
if (Ship::Context::GetInstance()->GetWindow()->GetGui()->SupportsViewports()) {
UIWidgets::CVarCheckbox(
"Allow multi-windows", "gEnableMultiViewports",
"Allow multi-windows", CVAR_ENABLE_MULTI_VIEWPORTS,
{ .tooltip = "Allows multiple windows to be opened at once. Requires a reload to take effect." });
}
UIWidgets::CVarCombobox("Texture Filter (Needs reload)", "gTextureFilter", textureFilteringMap);
UIWidgets::CVarCombobox("Texture Filter (Needs reload)", CVAR_TEXTURE_FILTER, textureFilteringMap);
// Currently this only has "Overlays Text Font", it doesn't use our new UIWidgets so it stands out
// Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->DrawSettings();
@@ -299,7 +299,7 @@ void DrawSettingsMenu() {
}
/*
#ifndef __SWITCH__
UIWidgets::CVarCheckbox("Menubar Controller Navigation", "gControlNav", {
UIWidgets::CVarCheckbox("Menubar Controller Navigation", CVAR_IMGUI_CONTROLLER_NAV, {
.tooltip = "Allows controller navigation of the SOH menu bar (Settings, Enhancements,...)\nCAUTION: "
"This will disable game inputs while the menubar is visible.\n\nD-pad to move between "
"items, A to select, and X to grab focus on the menu bar"
@@ -313,7 +313,7 @@ void DrawSettingsMenu() {
.showButtons = false,
.format = ""
});
UIWidgets::CVarSliderInt("Simulated Input Lag: %d frames", "gSimulatedInputLag", 0, 6, 0, {
UIWidgets::CVarSliderInt("Simulated Input Lag: %d frames", CVAR_SIMULATED_INPUT_LAG, 0, 6, 0, {
.tooltip = "Buffers your inputs to be executed a specified amount of frames later"
});
+3 -3
View File
@@ -154,7 +154,7 @@ OTRGlobals::OTRGlobals() {
auto overlay = context->GetInstance()->GetWindow()->GetGui()->GetGameOverlay();
overlay->LoadFont("Press Start 2P", "fonts/PressStart2P-Regular.ttf", 12.0f);
overlay->LoadFont("Fipps", "fonts/Fipps-Regular.otf", 32.0f);
overlay->SetCurrentFont(CVarGetString("gOverlayFont", "Press Start 2P"));
overlay->SetCurrentFont(CVarGetString(CVAR_GAME_OVERLAY_FONT, "Press Start 2P"));
auto loader = context->GetResourceManager()->GetResourceLoader();
loader->RegisterResourceFactory(std::make_shared<LUS::ResourceFactoryBinaryTextureV0>(), RESOURCE_FORMAT_BINARY,
@@ -658,7 +658,7 @@ extern "C" void Graph_StartFrame() {
#endif
case KbScancode::LUS_KB_TAB: {
// Toggle HD Assets
CVarSetInteger("gAltAssets", !CVarGetInteger("gAltAssets", 0));
CVarSetInteger(CVAR_ALT_ASSETS, !CVarGetInteger(CVAR_ALT_ASSETS, 0));
// ShouldClearTextureCacheAtEndOfFrame = true;
break;
}
@@ -1227,7 +1227,7 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path, Skel
pathStr = pathStr.substr(sOtr.length());
}
bool isAlt = CVarGetInteger("gAltAssets", 0);
bool isAlt = CVarGetInteger(CVAR_ALT_ASSETS, 0);
if (isAlt) {
pathStr = Ship::IResource::gAltAssetPrefix + pathStr;
+1 -1
View File
@@ -62,7 +62,7 @@ void SkeletonPatcher::ClearSkeletons() {
}
void SkeletonPatcher::UpdateSkeletons() {
bool isHD = CVarGetInteger("gAltAssets", 0);
bool isHD = CVarGetInteger(CVAR_ALT_ASSETS, 0);
for (auto skel : skeletons) {
Skeleton* newSkel =
(Skeleton*)Ship::Context::GetInstance()