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

x86 apps are scaled incorrectly on HiDPI systems #198

Open
WINRARisyou opened this issue Nov 5, 2024 · 15 comments
Open

x86 apps are scaled incorrectly on HiDPI systems #198

WINRARisyou opened this issue Nov 5, 2024 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@WINRARisyou
Copy link

WINRARisyou commented Nov 5, 2024

For some reason, x86 apps don't use up all the window space, and instead only a portion of it. If an app opens a new window and the old window goes out of focus, the old window becomes scaled properly until it is focused again. The cursor is also offset and moving the real cursor to the edge of the window moves the x86 cursor to the edge of the offset x86 window, and sometimes the window needs to be resized to get the x86 cursor working at all. This does not happen on my Chromebook. It happens on both anuraOS v1.2.1 and v2.0.
This is what every x86 window looks like:
x86-is-glitched
The reason there is no second window in this picture is because it crashed as I was taking the screenshot, but it opened a window right before it crashed, fixing the main window
x86-with-new-window

Device specs
Lenovo ThinkCentre M700 Tiny with 16 GB of RAM and an Intel Core i3

@ProgrammerIn-wonderland
Copy link
Collaborator

Wow you're trying to run Minecraft in v86? That won't run well! (Or at all?)

This is a sort of known issue and mostly exists because of how we handle x86 windows, it's a portion of the "x86 emulators screen" being shown as an anura window, and our refresh interval is 5s, and it leaks on every new window opened or closed. Realistically we need to rewrite the entire x86 GUI parts because it's a mess filled with race conditions and other unpleasant surprises

@ProgrammerIn-wonderland
Copy link
Collaborator

Wait I think the specific bug you're describing is the hidpi bug, what's your screen resolution? Are you on a laptop? Do you know your display factor?

@WINRARisyou
Copy link
Author

WINRARisyou commented Nov 5, 2024

It's a Lenovo ThinkCentre M700 Tiny hooked up to a Sony Bravia KDL-46NX810. It's a 1920x1080 display and the chrome tab is at the default zoom level.

@ProgrammerIn-wonderland
Copy link
Collaborator

So it's not the hidpi bug

To be honest, I'm not sure how I can fix this, but I'll leave the bug open to address in the (eventual rewrite) anura.x86's display will get.

@WINRARisyou
Copy link
Author

Ok. Glad you tried to help tho.

@ProgrammerIn-wonderland ProgrammerIn-wonderland added the bug Something isn't working label Nov 5, 2024
@ProgrammerIn-wonderland
Copy link
Collaborator

Screenshot_20241114_232708
I tried to reproduce the hidpi bug and got a very similar result to you

@ProgrammerIn-wonderland
Copy link
Collaborator

I think you have some sort of scaling maybe accidentally

@ProgrammerIn-wonderland
Copy link
Collaborator

can you run echo window.devicePixelRatio | eval in "Anura Shell"?

@WINRARisyou
Copy link
Author

WINRARisyou commented Nov 16, 2024

can you run echo window.devicePixelRatio | eval in "Anura Shell"?

I ran it and I got 1.25

@ProgrammerIn-wonderland
Copy link
Collaborator

Yeah so it's the hidpi bug, anything higher than 1.0 is hidpi

@WINRARisyou
Copy link
Author

Ok.

@WINRARisyou
Copy link
Author

wait i figured it out windows is scaled to 125%

@WINRARisyou
Copy link
Author

Yeah it fixed itself when I set Windows' scale back to 100%. Unfortunately, 100% scale looks like garbage.

@ProgrammerIn-wonderland
Copy link
Collaborator

An alternative janky way to get around this is to set your chrome zoom to 80% (exactly that percent) while anura is booting. Once it's booted you can set it back no problem

@WINRARisyou
Copy link
Author

Hey that worked. Thanks!

@ProgrammerIn-wonderland ProgrammerIn-wonderland changed the title x86 apps are scaled incorrectly x86 apps are scaled incorrectly on HiDPI systems Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants