-
Notifications
You must be signed in to change notification settings - Fork 432
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
Resize window when using SDL/display_screen #446
Comments
Hmm, there are a couple of things going on here. First, do you have multiple monitors? Or just the one 1080p monitor? We enable HiDPI if it's available. Furthermore, we have a naive scaling that shouldn't exceed 40% of max(monitor width, monitor height). I'm not sure |
Thank you for the quick reply! Yes, I was testing this with a dual monitor setup, the external is 1920x1200 but still not HiDPI. I can confirm the window size is correct with just one display. I guess in the snippet above |
@floringogianu it's very likely I should be using |
I just compiled the project locally (from master) in order to investigate the issue further and try your suggestion of using Surprisingly, the window was now properly sized (I was loading
edit: I just checked and when installing |
Thanks for investigating this @floringogianu! So you think the issue has to do with the precompiled SDL we ship with the Python wheels? I wish there was a way I could debug this but I don't have access to the appropriate setup. I'll circle back and see if I can find any more info now that we've narrowed it down. |
@floringogianu could you tell me what version of SDL you were using when building locally? |
@floringogianu can you try this build: https://test.pypi.org/project/ale-py/0.7.5/ and see if it resolves the issue? pip install -i https://test.pypi.org/simple/ ale-py==0.7.5 |
@JesseFarebro Sorry for the late reply, I somehow missed the notifications.
Between then and now I upgraded my ubuntu distribution, but I recreated the steps above. The problem persists on
I don't have much experience with pypi test env and I'm not sure how to get over this error:
|
@floringogianu sorry, you can install |
Nope, the problem persists. Let me know what else I can do to help with this. |
@floringogianu I think SDL 2.0.18 will fix this issue. There's some other build-related issues when upgrading so I'll have to fix those first. I'll update you once I have a new wheel for you to try out. Thanks for your patience! |
It looks as if I'm having the same problem. I am using ale-py 0.8.1 on Ubuntu 22.04.5 LTS. I have three 1920x1080 monitors, arranged horizontally. When I open a game window, it is much taller than the monitors. When run ale-py on a single-monitor machine, the game window looks correct. It appears as if changing ScreenSDL::getScaleFactor() so that it uses 40% of min(height, width) instead of 40% of max(height, width) would solve the problem, but would change the size of the window for single-monitor users. Please let me know whether there is a better way to address this issue. |
Thanks for reporting the issue @jim-rothrock, I think the easiest way is to add an argument to specify the size of the window for users. I will investigate adding this |
Using
display_screen
on a1920x1080
display opens a window taller than the display itself. Resizing the window is also disabled. This is on Ubuntu21.10
.Is there any way to scale or adjust the DPI of the SDL window? Or maybe disable HiDPI if it's enabled by default? Looking through the repo I couldn't find anything. Also usual environment flags I've been using in the past with other applications, such as
GDK_SCALE=0.5 GDK_DPI_SCALE=0.5
are not working in this instance.Thank you!
The text was updated successfully, but these errors were encountered: