From b4f4e36acbfb4e0862624b0fa53c1ab28b479b9e Mon Sep 17 00:00:00 2001 From: David Chavez Date: Mon, 1 Aug 2022 04:08:10 +0200 Subject: [PATCH] [macos] Disable buggy resolution scaling (#982) --- libultraship/libultraship/ImGuiImpl.cpp | 4 +++- libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/ImGuiImpl.cpp b/libultraship/libultraship/ImGuiImpl.cpp index 0e2a4b139..743ca7ab2 100644 --- a/libultraship/libultraship/ImGuiImpl.cpp +++ b/libultraship/libultraship/ImGuiImpl.cpp @@ -859,10 +859,12 @@ namespace SohImGui { if (ImGui::BeginMenu("Graphics")) { +#ifndef __APPLE__ EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f, 2.0f, "", 1.0f, true); Tooltip("Multiplies your output resolution by the value inputted,\nas a more intensive but effective form of anti-aliasing"); gfx_current_dimensions.internal_mul = CVar_GetFloat("gInternalResolution", 1); - EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, ""); +#endif + EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true); Tooltip("Activates multi-sample anti-aliasing when above 1x\nup to 8x for 8 samples for every pixel"); gfx_msaa_level = CVar_GetS32("gMSAAValue", 1); diff --git a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp index 0a04c9580..e5c041f17 100644 --- a/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp +++ b/libultraship/libultraship/Lib/Fast3D/gfx_pc.cpp @@ -2651,7 +2651,11 @@ void gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, co gfx_wapi->init(game_name, start_in_fullscreen, width, height); gfx_rapi->init(); gfx_rapi->update_framebuffer_parameters(0, width, height, 1, false, true, true, true); +#ifdef __APPLE__ + gfx_current_dimensions.internal_mul = 1; +#else gfx_current_dimensions.internal_mul = CVar_GetFloat("gInternalResolution", 1); +#endif gfx_msaa_level = CVar_GetS32("gMSAAValue", 1); gfx_current_dimensions.width = width; gfx_current_dimensions.height = height; @@ -2870,4 +2874,4 @@ uint16_t gfx_get_pixel_depth(float x, float y) { get_pixel_depth_pending.clear(); return get_pixel_depth_cached.find(make_pair(x, y))->second; -} \ No newline at end of file +}