Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

High-DPI not working

See original GitHub issue

I’m trying to use the high-dpi mode of Squeak 6.0 but whenever I open or move SqueakJS on a high-DPI screen, the VM seems to scale up the entire canvas instead of informing the image about the new scale factor via primitiveScreenScaleFactor (which always fails right now).

Shouldn’t pixelation already work? I tried something like

But there was no visible difference.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

codefraucommented, Jul 13, 2022

Okay, so commit c6288043b59db529901c9aa8e0b0bf89ac1298d7 adds a highdpi mode via url option and 54a8539549f58afbdec326093f4f6f3c550db577 adds primitiveScreenScaleFactor. And I am somewhat pleased with how trivial these two are 😊

Appears to work, see e.g.[,]&wizard=false&highdpi=true (note highdpi option in url)

I’m somewhat hesitant now to make this the default, even for 6.0 images, because with 4x the number of pixels to draw everything does become slower. What do we think?

codefraucommented, Jul 11, 2022

I just tried out-of-the-box Squeak 6.0 on a Mac screen that has PlatformScaleFactor = 2.0 and when I use the menu to change the scale from the default 200% to 100% the host window’s size shrinks by half, making every pixel smaller. Is that the intended behavior?

I find that confusing. Can you describe how a VM should behave that cannot change the visual size of the host window, but could support “small” or “big” pixels on a high-dpi screen?

Here’s what I think SqueakJS could do:

  1. add a “small pixel / high-dpi mode” flag meaning the display bitmap the VM creates would use devicePixelRatio times as many pixels for the given window size, disabled by default
  2. add primitiveScreenScaleFactor to answer either 1.0 (if in big-pixel-mode) or devicePixelRatio (in small-pixel-mode)
  3. if the image is a 6.0 image (as indicated by the Sista format bit), enable small-pixel-mode by default
  4. optionally, we could add a VM option to “force” small-pixel-mode for older images, e.g. by adding highdpi=true to the URL

How does that sound?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows scaling issues for high-DPI devices - Microsoft Support
Right-click the application, select Properties, select the Compatibility tab, and then select the Disable display scaling on high DPI settings check box.
Read more >
How to Adjust High-DPI Scaling in Windows 10 | Digital Trends
1. Click the Notification icon on the Taskbar and select the All Settings tile in the Action Center. Alternatively, click the Start button...
Read more >
How to fix High DPI issues in Windows 11 / 10 - The Geek Page
Fix 1 – Adjust the DPI Scaling feature for individual app · 1. At first, type the name of the app where you...
Read more >
How to fix HiDPI issues in Windows 10/11 in just 5 minutes
You can fix HiDPI problems using these 5 steps: · Control System-Wide Display Scaling · Disable display scaling for specific applications · Update ......
Read more >
How to fix Windows Scaling issues for High-DPI devices
Screen scaling is among the complex problems. There is no single fix for all DPI scaling issues in Windows. However, with every update, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found