[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix gdi leak (PR #658)

Marcel Taeumel notifications at github.com
Mon Nov 14 14:37:33 UTC 2022


@marceltaeumel commented on this pull request.



> @@ -1793,7 +1794,12 @@ static thisGetDpiForMonitor_t thisGetDpiForMonitor = NULL;
  */
 static double getDpiSystem(void)
 {
-  return (double) GetDeviceCaps(GetWindowDC(stWindow), LOGPIXELSY);
+  double dpi;
+  HDC dc = GetWindowDC(stWindow);
+  if (!dc) return 0.0; /* fail */

Nevermind. I mixed up dpi with scale factor here. Sorry for the noise.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/658#discussion_r1021620888
You are receiving this because you are subscribed to this thread.

Message ID: <OpenSmalltalk/opensmalltalk-vm/pull/658/review/1179228851 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20221114/d0a23221/attachment.html>


More information about the Vm-dev mailing list