summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp36
1 files changed, 28 insertions, 8 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 42250535f0..c0cc6596a2 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -44,14 +44,14 @@
#include <CoreGraphics/CGDisplayConfiguration.h>
#include <IOKit/IOCFPlugIn.h>
-#include <IOKit/IOKitLib.h>
+#include "llwindowmacosx_iokit.h"
#include <IOKit/IOMessage.h>
#include <IOKit/hid/IOHIDUsageTables.h>
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/usb/IOUSBLib.h>
extern bool gDebugWindowProc;
-bool gHiDPISupport = true;
+bool gHiDPISupport = false;
bool gHDRDisplaySupport = false;
const S32 BITS_PER_PIXEL = 32;
@@ -166,6 +166,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
// Route them to a dummy callback structure until the end of constructor.
LLWindowCallbacks null_callbacks;
mCallbacks = &null_callbacks;
+ mIsConstructing = true;
// Voodoo for calling cocoa from carbon (see llwindowmacosx-objc.mm).
setupCocoa();
@@ -239,9 +240,8 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
setUseMultGL(sUseMultGL);
mCallbacks = callbacks;
+ mIsConstructing = false;
stop_glerror();
-
-
}
// These functions are used as wrappers for our internal event handling callbacks.
@@ -415,6 +415,14 @@ void callResize(unsigned int width, unsigned int height)
}
}
+void callRequestResolutionUpdate()
+{
+ if (gWindowImplementation && gWindowImplementation->getCallbacks())
+ {
+ gWindowImplementation->getCallbacks()->handleRequestResolutionUpdate(gWindowImplementation);
+ }
+}
+
void callMouseMoved(float *pos, MASK mask)
{
if (!gWindowImplementation)
@@ -708,6 +716,11 @@ void getPreeditLocation(float *location, unsigned int length)
}
}
+bool windowCallbacksReady()
+{
+ return gWindowImplementation && !gWindowImplementation->isConstructing();
+}
+
void LLWindowMacOSX::updateMouseDeltas(float* deltas)
{
if (mCursorDecoupled)
@@ -761,7 +774,7 @@ bool LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
kCGLPFAMultisample,
kCGLPFASampleBuffers, static_cast<CGLPixelFormatAttribute>((mFSAASamples > 0 ? 1 : 0)),
kCGLPFASamples, static_cast<CGLPixelFormatAttribute>(mFSAASamples),
- kCGLPFAStencilSize, static_cast<CGLPixelFormatAttribute>(8),
+ //kCGLPFAStencilSize, static_cast<CGLPixelFormatAttribute>(8),
kCGLPFADepthSize, static_cast<CGLPixelFormatAttribute>(24),
kCGLPFAAlphaSize, static_cast<CGLPixelFormatAttribute>(8),
kCGLPFAColorSize, static_cast<CGLPixelFormatAttribute>(24),
@@ -939,9 +952,10 @@ bool LLWindowMacOSX::getVisible()
if(mFullscreen)
{
result = true;
- }if (mWindow)
+ }
+ if (mWindow)
{
- result = true;
+ result = true;
}
return(result);
@@ -2382,7 +2396,7 @@ bool LLWindowMacOSX::getInputDevices(U32 device_type_filter,
io_iterator_t io_iter = 0;
// create an IO object iterator
- result = IOServiceGetMatchingServices( kIOMasterPortDefault, device_dict_ref, &io_iter );
+ result = IOServiceGetMatchingServices( kLLIOMainPort, device_dict_ref, &io_iter );
if ( kIOReturnSuccess != result )
{
LL_WARNS("Joystick") << "IOServiceGetMatchingServices failed" << LL_ENDL;
@@ -2636,6 +2650,12 @@ std::vector<std::string> LLWindowMacOSX::getDynamicFallbackFontList()
return std::vector<std::string>();
}
+LLFontFallbackMatch LLWindowMacOSX::findFallbackFontForChar(llwchar wch)
+{
+ // Not implemented on macOS; would use CoreText (CTFontCreateForString).
+ return LLFontFallbackMatch();
+}
+
// static
MASK LLWindowMacOSX::modifiersToMask(S16 modifiers)
{