From 76c8a7ff0b57e7856613960391be7c400384183b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 8 Jun 2022 03:15:59 +0300 Subject: [PATCH] SL-17541 show the message on mac --- indra/llwindow/llwindowmacosx.cpp | 2 ++ indra/newview/llfloaterperformance.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index bc4f07941b2..b3616e4ea8a 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -660,6 +660,8 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits } } + mRefreshRate = CGDisplayModeGetRefreshRate(CGDisplayCopyDisplayMode(mDisplay)); + // Disable vertical sync for swap toggleVSync(enable_vsync); diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index ecacadee3e7..0ef9ab32155 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -416,7 +416,8 @@ void LLFloaterPerformance::setFPSText() std::string fps_text = getString("fps_text"); static LLCachedControl<bool> vsync_enabled(gSavedSettings, "RenderVSyncEnable", true); - if (vsync_enabled && (current_fps >= gViewerWindow->getWindow()->getRefreshRate())) + S32 refresh_rate = gViewerWindow->getWindow()->getRefreshRate(); + if (vsync_enabled && (refresh_rate > 0) && (current_fps >= refresh_rate)) { fps_text += getString("max_text"); } -- GitLab