| @@ -26,7 +26,7 @@ Desktop::Desktop() | |||||
| : mouseClickCounter (0), mouseWheelCounter (0), | : mouseClickCounter (0), mouseWheelCounter (0), | ||||
| kioskModeComponent (nullptr), | kioskModeComponent (nullptr), | ||||
| allowedOrientations (allOrientations), | allowedOrientations (allOrientations), | ||||
| masterScaleFactor (1.0f) | |||||
| masterScaleFactor ((float) getDefaultMasterScale()) | |||||
| { | { | ||||
| displays = new Displays (*this); | displays = new Displays (*this); | ||||
| addMouseInputSource(); | addMouseInputSource(); | ||||
| @@ -448,6 +448,8 @@ private: | |||||
| void triggerFocusCallback(); | void triggerFocusCallback(); | ||||
| void handleAsyncUpdate() override; | void handleAsyncUpdate() override; | ||||
| static double getDefaultMasterScale(); | |||||
| Desktop(); | Desktop(); | ||||
| ~Desktop(); | ~Desktop(); | ||||
| @@ -572,6 +572,11 @@ bool Desktop::canUseSemiTransparentWindows() noexcept | |||||
| return true; | return true; | ||||
| } | } | ||||
| double Desktop::getDefaultMasterScale() | |||||
| { | |||||
| return 1.0; | |||||
| } | |||||
| Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | ||||
| { | { | ||||
| // TODO | // TODO | ||||
| @@ -297,6 +297,11 @@ void MouseInputSource::setRawMousePosition (Point<int>) | |||||
| { | { | ||||
| } | } | ||||
| double Desktop::getDefaultMasterScale() | |||||
| { | |||||
| return 1.0; | |||||
| } | |||||
| Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | ||||
| { | { | ||||
| return Orientations::convertToJuce ([[UIApplication sharedApplication] statusBarOrientation]); | return Orientations::convertToJuce ([[UIApplication sharedApplication] statusBarOrientation]); | ||||
| @@ -3124,6 +3124,11 @@ void MouseInputSource::setRawMousePosition (Point<int> newPosition) | |||||
| XWarpPointer (display, None, root, 0, 0, 0, 0, newPosition.getX(), newPosition.getY()); | XWarpPointer (display, None, root, 0, 0, 0, 0, newPosition.getX(), newPosition.getY()); | ||||
| } | } | ||||
| double Desktop::getDefaultMasterScale() | |||||
| { | |||||
| return 1.0; | |||||
| } | |||||
| Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | ||||
| { | { | ||||
| return upright; | return upright; | ||||
| @@ -226,6 +226,11 @@ void MouseInputSource::setRawMousePosition (Point<int> newPosition) | |||||
| CGAssociateMouseAndMouseCursorPosition (true); | CGAssociateMouseAndMouseCursorPosition (true); | ||||
| } | } | ||||
| double Desktop::getDefaultMasterScale() | |||||
| { | |||||
| return 1.0; | |||||
| } | |||||
| Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | Desktop::DisplayOrientation Desktop::getCurrentOrientation() const | ||||
| { | { | ||||
| return upright; | return upright; | ||||
| @@ -141,6 +141,7 @@ static inline Rectangle<int> rectangleFromRECT (const RECT& r) noexcept | |||||
| return Rectangle<int>::leftTopRightBottom ((int) r.left, (int) r.top, (int) r.right, (int) r.bottom); | return Rectangle<int>::leftTopRightBottom ((int) r.left, (int) r.top, (int) r.right, (int) r.bottom); | ||||
| } | } | ||||
| //============================================================================== | |||||
| static void setDPIAwareness() | static void setDPIAwareness() | ||||
| { | { | ||||
| if (JUCEApplication::isStandaloneApp()) | if (JUCEApplication::isStandaloneApp()) | ||||
| @@ -162,7 +163,7 @@ inline double getDPI() | |||||
| return dpi; | return dpi; | ||||
| } | } | ||||
| inline double getDisplayScale() | |||||
| double Desktop::getDefaultMasterScale() | |||||
| { | { | ||||
| return getDPI() / 96.0; | return getDPI() / 96.0; | ||||
| } | } | ||||