From c7cbc7dea50bd4bed073a8018d09ad9c8ea171ca Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 22 Aug 2018 09:14:19 +0100 Subject: [PATCH] Fixed some deprecation warnings in the NetworkGraphicsDemo --- extras/NetworkGraphicsDemo/Source/SlaveComponent.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/NetworkGraphicsDemo/Source/SlaveComponent.h b/extras/NetworkGraphicsDemo/Source/SlaveComponent.h index cbbe241ebf..be00993b25 100644 --- a/extras/NetworkGraphicsDemo/Source/SlaveComponent.h +++ b/extras/NetworkGraphicsDemo/Source/SlaveComponent.h @@ -126,8 +126,8 @@ private: //============================================================================== String getMachineInfoToDisplay() const { - //auto display = Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre()); - return getOSName();// + " " + String (display.dpi) + " " + String (display.scale); + auto display = Desktop::getInstance().getDisplays().findDisplayForPoint (getScreenBounds().getCentre()); + return getOSName() + " " + String (display.dpi) + " " + String (display.scale); } static String getOSName() @@ -181,7 +181,7 @@ private: if (auto client = canvas.findClient (clientName)) { auto screenBounds = getScreenBounds(); - auto display = Desktop::getInstance().getDisplays().getDisplayContaining (screenBounds.getCentre()); + auto display = Desktop::getInstance().getDisplays().findDisplayForPoint (screenBounds.getCentre()); return ((screenBounds - display.userArea.getCentre()).toFloat() / (client->scaleFactor * display.dpi / display.scale)) + client->centre; } @@ -192,7 +192,7 @@ private: { if (auto client = canvas.findClient (clientName)) { - auto display = Desktop::getInstance().getDisplays().getDisplayContaining (getScreenBounds().getCentre()); + auto display = Desktop::getInstance().getDisplays().findDisplayForPoint (getScreenBounds().getCentre()); return (display.userArea.toFloat() / (client->scaleFactor * display.dpi / display.scale)).withCentre (client->centre); }