Added n64Mode internal res multiplier

This commit is contained in:
KiritoDv 2021-08-27 16:24:48 -05:00
parent 235a737d57
commit d1f5da5ca5
2 changed files with 13 additions and 5 deletions

View File

@ -127,6 +127,8 @@ namespace MoonNX {
} }
#endif #endif
int n64Mul = 1;
namespace MoonInternal { namespace MoonInternal {
map<string, ImFont*> fontMap; map<string, ImFont*> fontMap;
@ -266,7 +268,7 @@ namespace MoonInternal {
configWindow.internal_h = configImGui.n64Mode ? SM64_HEIGHT : size.y; configWindow.internal_h = configImGui.n64Mode ? SM64_HEIGHT : size.y;
if(configImGui.n64Mode) { if(configImGui.n64Mode) {
configWindow.multiplier = 1.0f; configWindow.multiplier = (float)n64Mul;
int sw = size.y * SM64_WIDTH / SM64_HEIGHT; int sw = size.y * SM64_WIDTH / SM64_HEIGHT;
pos = ImVec2(size.x / 2 - sw / 2, 0); pos = ImVec2(size.x / 2 - sw / 2, 0);
size = ImVec2(sw, size.y); size = ImVec2(sw, size.y);
@ -284,12 +286,14 @@ namespace MoonInternal {
ImGui::Text("Status: %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); ImGui::Text("Status: %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
ImGui::Text("Version: " GIT_BRANCH " " GIT_HASH); ImGui::Text("Version: " GIT_BRANCH " " GIT_HASH);
ImGui::Text("Addons: %d\n", Moon::addons.size()); ImGui::Text("Addons: %d\n", Moon::addons.size());
ImGui::Text("Resolution: %.0fx%.0f\n", configWindow.internal_w * configWindow.multiplier, configWindow.internal_h * configWindow.multiplier);
ImGui::Text("Internal Resolution:");
if(!configImGui.n64Mode){ if(!configImGui.n64Mode)
ImGui::Text("Resolution: %.0fx%.0f\n", configWindow.w * configWindow.multiplier, configWindow.h * configWindow.multiplier);
ImGui::Text("Internal Resolution:");
ImGui::SliderFloat("Mul", &configWindow.multiplier, 0.0f, 4.0f); ImGui::SliderFloat("Mul", &configWindow.multiplier, 0.0f, 4.0f);
} else
ImGui::SliderInt("Mul", &n64Mul, 1, 8);
ImGui::End(); ImGui::End();
ImGui::PopStyleColor(); ImGui::PopStyleColor();
} }

View File

@ -253,6 +253,10 @@ void ImGui::StyleColorsMoonDark(ImGuiStyle* dst)
{ {
ImGuiStyle* style = dst ? dst : &ImGui::GetStyle(); ImGuiStyle* style = dst ? dst : &ImGui::GetStyle();
ImVec4* colors = ImGui::GetStyle().Colors; ImVec4* colors = ImGui::GetStyle().Colors;
#ifdef TARGET_SWITCH
style->ScaleAllSizes(3.0f);
style->TouchExtraPadding = ImVec2(5, 5);
#endif
colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.04f, 0.04f, 0.04f, 0.94f); colors[ImGuiCol_WindowBg] = ImVec4(0.04f, 0.04f, 0.04f, 0.94f);