[macos] Disable buggy resolution scaling (#982)

This commit is contained in:
David Chavez 2022-08-01 04:08:10 +02:00 committed by GitHub
parent d332c3d9d6
commit b4f4e36acb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}
}