Fix scissor test when screen scaling is on
Use full screen for gui settings
This commit is contained in:
parent
0f1630a1b7
commit
26e43ed9bd
|
@ -857,7 +857,7 @@ static bool RenderFrame()
|
||||||
// Add x offset for aspect ratio > 4/3
|
// Add x offset for aspect ratio > 4/3
|
||||||
min_x = min_x * dc2s_scale_h + ds2s_offs_x;
|
min_x = min_x * dc2s_scale_h + ds2s_offs_x;
|
||||||
// Invert y coordinates when rendering to screen
|
// Invert y coordinates when rendering to screen
|
||||||
min_y = screen_height - (min_y + height) * dc2s_scale_h;
|
min_y = screen_height * screen_scaling - (min_y + height) * dc2s_scale_h;
|
||||||
width *= dc2s_scale_h;
|
width *= dc2s_scale_h;
|
||||||
height *= dc2s_scale_h;
|
height *= dc2s_scale_h;
|
||||||
|
|
||||||
|
|
|
@ -1896,7 +1896,7 @@ bool RenderFrame()
|
||||||
// Add x offset for aspect ratio > 4/3
|
// Add x offset for aspect ratio > 4/3
|
||||||
min_x = min_x * dc2s_scale_h + ds2s_offs_x;
|
min_x = min_x * dc2s_scale_h + ds2s_offs_x;
|
||||||
// Invert y coordinates when rendering to screen
|
// Invert y coordinates when rendering to screen
|
||||||
min_y = screen_height - (min_y + height) * dc2s_scale_h;
|
min_y = screen_height * screen_scaling - (min_y + height) * dc2s_scale_h;
|
||||||
width *= dc2s_scale_h;
|
width *= dc2s_scale_h;
|
||||||
height *= dc2s_scale_h;
|
height *= dc2s_scale_h;
|
||||||
|
|
||||||
|
|
|
@ -540,12 +540,9 @@ static void gui_display_settings()
|
||||||
if (!settings_opening)
|
if (!settings_opening)
|
||||||
ImGui_ImplOpenGL3_DrawBackground();
|
ImGui_ImplOpenGL3_DrawBackground();
|
||||||
|
|
||||||
ImGui::SetNextWindowPos(ImVec2(screen_width / 2.f, screen_height / 2.f), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
ImGui::SetNextWindowPos(ImVec2(0, 0));
|
||||||
if (scaling < 1.5f)
|
ImGui::SetNextWindowSize(ImVec2(screen_width, screen_height));
|
||||||
ImGui::SetNextWindowSize(ImVec2(screen_height / 480.f * 640.f * 90.f / 100.f, screen_height * 90.f / 100.f));
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0);
|
||||||
else
|
|
||||||
// Use the entire screen width
|
|
||||||
ImGui::SetNextWindowSize(ImVec2(screen_width * 90.f / 100.f, screen_height * 90.f / 100.f));
|
|
||||||
|
|
||||||
ImGui::Begin("Settings", NULL, /*ImGuiWindowFlags_AlwaysAutoResize |*/ ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse);
|
ImGui::Begin("Settings", NULL, /*ImGuiWindowFlags_AlwaysAutoResize |*/ ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse);
|
||||||
ImVec2 normal_padding = ImGui::GetStyle().FramePadding;
|
ImVec2 normal_padding = ImGui::GetStyle().FramePadding;
|
||||||
|
@ -887,6 +884,7 @@ static void gui_display_settings()
|
||||||
}
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
ImGui::PopStyleVar();
|
||||||
|
|
||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData(), false);
|
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData(), false);
|
||||||
|
|
Loading…
Reference in New Issue