4k resolution - not DPI aware

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

4k resolution - not DPI aware

DrSnake
Hello,

I am running your hardware simulator on a 4k display and it looks like your simulator claims that it is DPI aware, which it is not. Because of this windows doesnt scale the application and looks of course way too tiny too work with.

Is there a fix for this bug coming or a workaround without using a differnt PC of course?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: 4k resolution - not DPI aware

ivant
Hi. I don't think that anybody is working officially on the software suite anymore. But it's an open source software, so you can contribute. I maintain an unofficial version based on the latest official source plus some improvements at https://github.com/itoshkov/nand2tetris-emu.

I don't have access to HiDPI computer (PC or Mac) so it would be hard for me to implement a fix. But I'd be happy to include one. Just fire a pull request :)

Cheers,
Ivan
mk
Reply | Threaded
Open this post in threaded view
|

Re: 4k resolution - not DPI aware

mk
Is there a fix available now?  I have Windows 10 and so have the same problem.
Reply | Threaded
Open this post in threaded view
|

Re: 4k resolution - not DPI aware

ivant
There may be. Java 9 includes HiDPI support and it should just work. So, first grab and install Java 9 and then run the tools from the suite.

Please tell us if it works or not.
Reply | Threaded
Open this post in threaded view
|

Re: 4k resolution - not DPI aware

cadet1620
Administrator
Copied from the Coursera forum:

Has anyone managed to get the Java application to launch with a decent resolution on Windows 10? It's nearly impossible to see on my screen.
______________________________

Windows 10 solution
(from https://superuser.com/questions/988379/how-do-i-run-java-apps-upscaled-on-a-high-dpi-display)

Just found an easy solution on my Windows 10 machine:

    Find javaw.exe you installed.
    Right click -> Properties
    Go to Compatibility tab
    Check Override high DPI scaling behavior.
    Choose System for Scaling performed by:
______________________________

Linux solution

The solution for Windows was editing the properties of javaw.exe, as described above, then restarting the application.

The solution for (Arch) Linux is editing the HardwareSimulator.sh script [and others] as described here:

https://wiki.archlinux.org/index.php/HiDPI#Java_applications

Change the run line:
java -Dsun.java2d.uiScale=2 -classpath ...