Found how to make Stencyl usable on High DPI screens

1MrPaul1

  • *
  • Posts: 1285
This is a  hack of cause but what to do....
We can use it until java developers will resolve the problem

the answer is here in the last comment
http://superuser.com/questions/988379/how-do-i-run-java-apps-upscaled-on-a-high-dpi-display

It works fine for me, I even can work in stencyl by fingers on the touch screen, and it is cool


Only one thing, stencyl goes with its  own java inside program folder, you got to work with this java probably

Vectrex71

  • Posts: 534
First of all, THANK YOU very much !!!!!

Here is what we have to do....

Quote
The problem here seems to be that Swing is by default claiming that it is DPI aware, so windows doesn't scale it. Use this switch to turn off this behavior and windows will start scaling your swing app:

-Dsun.java2d.dpiaware=false
[EDIT: Unfortunately, this flag no longer seems to work in Java 8, I was testing it in Java 6. Looks like this is a known issue.]

[EDIT 2: You can modify a Java 8 install to work correctly, using a program to modify the EXE manifests. I changed the setting from true to false in the manifests inside of java.exe and javaw.exe, and now my Swing programs scale correctly in Windows 10 high dpi. I used Resource Tuner to this.]

BUT, maybe i'm to dumb or so, but where can i find this manifest ? and i still have no clue what i have to do to bring it to work ! #Sorry for my dumbness :-(

iii

  • Posts: 194
but where can i find this manifest ?

Its pretty straight forward.
You just need to modify the file in the Manifest folder
located inside "java.exe", and "javaw.exe"
java.exe\.rsrc\MANIFEST\1
javaw.exe\.rsrc\MANIFEST\1

You can use "Resource Tuner" as mentioned in that link (not free, but have trial version).
Or use "ResourceHacker" to modify the executable, its free.
http://www.angusj.com/resourcehacker/

- File>Open (the java.exe)
- double click Manifest
- select 1:0
- change line 28 (true to false)
   <dpiAware>true</dpiAware>    ===>  <dpiAware>false</dpiAware>
- press F5 (modify/compile script)
- File>Save

repeat with javaw.exe


If you use Stencyl with the Java 8 JRE installed in your PC, modify :
..\[Java_JRE_folder]\bin\java.exe
..\[Java_JRE_folder]\bin\javaw.exe

If you use the Java 8 in the Stencyl folder, modify :
..\Stencyl\runtimes\jre-win\bin\java.exe
..\Stencyl\runtimes\jre-win\bin\javaw.exe

Vectrex71

  • Posts: 534
Thank you very much for your Tutorial and/or  How To :-) ThumbsUp ! Will try that later today or tomorrow !

T H A N K S !

EDIT: Woowww great love it !!! The Icons are blurry and not clear but hey, i can see them now :-) YESS!!!!

Info: You have to start the RessourceHacker as an Administrator (otherwise you can't save the changes!)
            And you have to restart the PC to see the difference :-)


Thank you again ! This is great !!!




« Last Edit: May 27, 2016, 10:52:51 am by Vectrex71 »

Vectrex71

  • Posts: 534
It's me again, i just want to say: "I'm sooooooo happy!" since december 2015 i had this 4K Screen and end of May 2016 you gave me the solution to my problem ! It's so awesome ! i can read all the Blocks and Icons ! It's like a new IDE !! Thanks und Kudos to you !!

1MrPaul1

  • *
  • Posts: 1285
Glad that can help
I also  spend many time to search a solution how to make readable some of my apps for work
I found the same solution for addobe illustrator than found similar thing for stencyl.
In fact you can use this hack for all apps that do not want to enlarge on high DPI screens
Just back up all exes because sometimes it is not working after changing... :)