summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorleviathan <leviathan@lindenlab.com>2024-09-03 15:38:35 -0700
committerAndrew Meadows <andrew.l.meadows@gmail.com>2024-10-03 09:16:46 -0700
commit0617923ae7f450ece7288f8a73446c45a8ed32db (patch)
tree1914627e41be3619eb335aa28e6acdfb98925ea0 /indra/llwindow/llwindowmacosx.cpp
parent8213a0fb6b3149042d6833c8f0c4a3c1bfdc8bc9 (diff)
remove crashy LLSD ctor used by GameControl
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp44
1 files changed, 21 insertions, 23 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index e95ad4d970..1883c6c9c1 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -28,6 +28,7 @@
#include "llwindowmacosx.h"
+#include "llgamecontrol.h"
#include "llkeyboardmacosx.h"
#include "llwindowcallbacks.h"
#include "llpreeditor.h"
@@ -625,7 +626,7 @@ void LLWindowMacOSX::updateMouseDeltas(float* deltas)
}
}
-void LLWindowMacOSX::getMouseDeltas(float* delta)
+void LLWindowMacOSX::getMouseDeltas(float* delta) const
{
delta[0] = mCursorLastEventDeltaX;
delta[1] = mCursorLastEventDeltaY;
@@ -845,7 +846,7 @@ bool LLWindowMacOSX::isValid()
return (mWindow != NULL);
}
-bool LLWindowMacOSX::getVisible()
+bool LLWindowMacOSX::getVisible() const
{
bool result = false;
@@ -860,12 +861,12 @@ bool LLWindowMacOSX::getVisible()
return(result);
}
-bool LLWindowMacOSX::getMinimized()
+bool LLWindowMacOSX::getMinimized() const
{
return mMinimized;
}
-bool LLWindowMacOSX::getMaximized()
+bool LLWindowMacOSX::getMaximized() const
{
return mMaximized;
}
@@ -879,17 +880,13 @@ bool LLWindowMacOSX::maximize()
return mMaximized;
}
-bool LLWindowMacOSX::getFullscreen()
-{
- return mFullscreen;
-}
-
-void LLWindowMacOSX::gatherInput()
+void LLWindowMacOSX::gatherInput(bool app_has_focus)
{
updateCursor();
+ LLGameControl::processEvents(app_has_focus);
}
-bool LLWindowMacOSX::getPosition(LLCoordScreen *position)
+bool LLWindowMacOSX::getPosition(LLCoordScreen *position) const
{
S32 err = -1;
@@ -916,7 +913,7 @@ bool LLWindowMacOSX::getPosition(LLCoordScreen *position)
return (err == noErr);
}
-bool LLWindowMacOSX::getSize(LLCoordScreen *size)
+bool LLWindowMacOSX::getSize(LLCoordScreen *size) const
{
S32 err = -1;
@@ -942,7 +939,7 @@ bool LLWindowMacOSX::getSize(LLCoordScreen *size)
return (err == noErr);
}
-bool LLWindowMacOSX::getSize(LLCoordWindow *size)
+bool LLWindowMacOSX::getSize(LLCoordWindow *size) const
{
S32 err = -1;
@@ -1016,7 +1013,7 @@ void LLWindowMacOSX::restoreGLContext()
CGLSetCurrentContext(mContext);
}
-F32 LLWindowMacOSX::getGamma()
+F32 LLWindowMacOSX::getGamma() const
{
F32 result = 2.2; // Default to something sane
@@ -1050,7 +1047,7 @@ F32 LLWindowMacOSX::getGamma()
return result;
}
-U32 LLWindowMacOSX::getFSAASamples()
+U32 LLWindowMacOSX::getFSAASamples() const
{
return mFSAASamples;
}
@@ -1376,21 +1373,21 @@ LLWindow::LLWindowResolution* LLWindowMacOSX::getSupportedResolutions(S32 &num_r
return mSupportedResolutions;
}
-bool LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordWindow *to)
+bool LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordWindow *to) const
{
to->mX = from.mX;
to->mY = from.mY;
return true;
}
-bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordGL* to)
+bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordGL* to) const
{
to->mX = from.mX;
to->mY = from.mY;
return true;
}
-bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to)
+bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to) const
{
if(mWindow)
{
@@ -1409,7 +1406,7 @@ bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordWindow* to)
return false;
}
-bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to)
+bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to) const
{
if(mWindow)
{
@@ -1428,14 +1425,14 @@ bool LLWindowMacOSX::convertCoords(LLCoordWindow from, LLCoordScreen *to)
return false;
}
-bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordGL *to)
+bool LLWindowMacOSX::convertCoords(LLCoordScreen from, LLCoordGL *to) const
{
LLCoordWindow window_coord;
return(convertCoords(from, &window_coord) && convertCoords(window_coord, to));
}
-bool LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordScreen *to)
+bool LLWindowMacOSX::convertCoords(LLCoordGL from, LLCoordScreen *to) const
{
LLCoordWindow window_coord;
@@ -2321,7 +2318,7 @@ bool LLWindowMacOSX::getInputDevices(U32 device_type_filter,
return return_value;
}
-LLSD LLWindowMacOSX::getNativeKeyData()
+LLSD LLWindowMacOSX::getNativeKeyData() const
{
LLSD result = LLSD::emptyMap();
@@ -2505,6 +2502,7 @@ void LLWindowMacOSX::interruptLanguageTextInput()
commitCurrentPreedit(mGLView);
}
+// static
std::vector<std::string> LLWindowMacOSX::getDisplaysResolutionList()
{
std::vector<std::string> resolution_list;
@@ -2534,7 +2532,7 @@ std::vector<std::string> LLWindowMacOSX::getDisplaysResolutionList()
return resolution_list;
}
-//static
+// static
std::vector<std::string> LLWindowMacOSX::getDynamicFallbackFontList()
{
// Fonts previously in getFontListSans() have moved to fonts.xml.