Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad pixel scaling on Windows on Java above 8 #19

Open
TwoSpacesSG opened this issue Oct 13, 2024 · 4 comments
Open

Bad pixel scaling on Windows on Java above 8 #19

TwoSpacesSG opened this issue Oct 13, 2024 · 4 comments

Comments

@TwoSpacesSG
Copy link

If using Java 11 or above, pixels look very uneven and distorted, in some cases there is also some kind of ping pong effect (?) on the image. Maybe it's to do with my DPI settings which are set to 125% system-wide because I can't see anything otherwise.

Oracle Java 8u421 x64:
goodscaling

Eclipse Temurin 11.0.24+8 x64:
badscaling

@vadosnaprimer
Copy link

The second image is indeed about 123% bigger. Try with 100% DPI? Older Java might be unaware of such a setting.

@TwoSpacesSG
Copy link
Author

It's not an option for me to set the entire system to 100% just to use FreeJ2ME, but in the per-application compatibility settings for java.exe and javaw.exe, setting redefining scaling to "system" does indeed make it look better, although the menu bar also looks blurry. Not sure that it's a viable workaround though.

@vadosnaprimer
Copy link

It's not a workaround, it's a test to see if DPI is the reason.

@AShiningRay
Copy link
Collaborator

I don't think that's something AWT will handle well, since what happens is that since your default desktop scale is now non-integer, Temurin probably takes it into account (differently from Oracle's) and automatically scales the screen based on that, which will also make it fractional scale instead of integer scale. There's probably a system property that can be set to ignore the desktop's base scale, but that'd be a hack seeing as Oracle doesn't seem to care, and making assumptions on the java code would also overcomplicate too much.

Solution? Probably using SDL or Libretro, as both have access to MUCH better scaling options than AWT, and are easier to do that kind of stuff too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants