summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2023-02-03 01:46:01 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2023-02-03 01:46:01 +0200
commite7ba1753d203a6a8ff3ac42f484603535dd7bfd3 (patch)
tree4a35a769e162f6308b3f748521a6f68b44de9709 /indra/llwindow/llwindowmacosx.cpp
parent788ba76bdf5dcc0a018a6b53bc1cc8f359e85f34 (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge branch 'main' into DRTVWR-539
# Conflicts: # doc/contributions.txt # indra/cmake/Copy3rdPartyLibs.cmake # indra/cmake/FindOpenJPEG.cmake # indra/cmake/OpenJPEG.cmake # indra/integration_tests/llui_libtest/CMakeLists.txt # indra/newview/CMakeLists.txt
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 922fa745bd..2c841d4703 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -676,11 +676,11 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
if (cgl_err != kCGLNoError )
{
- LL_DEBUGS("GLInit") << "Multi-threaded OpenGL not available." << LL_ENDL;
+ LL_INFOS("GLInit") << "Multi-threaded OpenGL not available." << LL_ENDL;
}
else
{
- LL_DEBUGS("GLInit") << "Multi-threaded OpenGL enabled." << LL_ENDL;
+ LL_INFOS("GLInit") << "Multi-threaded OpenGL enabled." << LL_ENDL;
}
}
makeFirstResponder(mWindow, mGLView);
@@ -1254,8 +1254,11 @@ BOOL LLWindowMacOSX::isClipboardTextAvailable()
}
BOOL LLWindowMacOSX::pasteTextFromClipboard(LLWString &dst)
-{
- llutf16string str(copyFromPBoard());
+{
+ unsigned short* pboard_data = copyFromPBoard(); // must free returned data
+ llutf16string str(pboard_data);
+ free(pboard_data);
+
dst = utf16str_to_wstring(str);
if (dst != L"")
{
@@ -1288,7 +1291,7 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
{
if (!mSupportedResolutions)
{
- CFArrayRef modes = CGDisplayAvailableModes(mDisplay);
+ CFArrayRef modes = CGDisplayCopyAllDisplayModes(mDisplay, nullptr);
if(modes != NULL)
{
@@ -1327,6 +1330,7 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
}
}
}
+ CFRelease(modes);
}
}