mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Better GL context scale change detection.
This commit is contained in:
parent
dd366bbcaa
commit
fb1018a034
1 changed files with 2 additions and 2 deletions
|
|
@ -141,7 +141,7 @@ public:
|
|||
{
|
||||
ScopedPointer<MessageManagerLock> mmLock;
|
||||
|
||||
const Rectangle<int> screenBounds (component.getTopLevelComponent()->getBounds());
|
||||
const Rectangle<int> screenBounds (component.getTopLevelComponent()->getScreenBounds());
|
||||
|
||||
if (lastScreenBounds != screenBounds)
|
||||
updateViewportSize (false);
|
||||
|
|
@ -195,7 +195,7 @@ public:
|
|||
{
|
||||
if (ComponentPeer* peer = component.getPeer())
|
||||
{
|
||||
lastScreenBounds = component.getTopLevelComponent()->getBounds();
|
||||
lastScreenBounds = component.getTopLevelComponent()->getScreenBounds();
|
||||
|
||||
const double newScale = Desktop::getInstance().getDisplays()
|
||||
.getDisplayContaining (lastScreenBounds.getCentre()).scale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue