-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Mac - pygame.Window.flip() seemingly doesn't work since v2.5.0.dev4 was implemented #3056
Comments
I have the same problem on 2.5.0 and 2.5.1 on wayland (with swaywm) and it was also fine with 2.4.1. I worked around it by setting |
Thank you for the report. Theory time: I've looked into the code, I think it is this 235b675 Wouldn't have figured this out today if @oddbookworm hadn't asked you on discord what The commit I referenced assumes that if the SDL window says it uses OpenGL, that we requested it. What's actually happening is that SDL is internally using a renderer instead of a surface on your platforms, making a renderer using opengl, the window gets marked as opengl, and then we're off to the races. This is an absolutely classic bug for us, SDL creating renderers when we asked for surfaces has bitten us before. Try setting the env |
I put up #3059 as an attempted fix, although I'm not able to reproduce the problem on Windows. |
Thanks! @niajane: Does it work on your mac? |
I'm not sure how to set env variables myself, but I installed #3059 and it fixes the issue, thanks for looking at this. EDIT: Sorry, just confirming I tested the fix on Intel MacBook Pro |
I was following up on a help post on the Discord server, and I have replicated an issue where pygame.Window.flip() no longer seems to work on Mac.
Current behavior:
When you create a window and get the associated surface, if you fill the surface, or draw to it, or load an image and blit to it, then call flip(), the screen is not updated and remains blank/black.
Expected behavior:
The window surface is updated and images, shapes, fill colors are presented correctly on the surface.
Steps to reproduce:
On a Mac:
Test code
The test code is that which is listed in the docs, however I have tested with drawing shapes and blitting images to the surface and have the same results:
Please note I've repeated the testing on Windows and have no issues, works fine.
On Mac my testing showed the following:
2.4.0 to 2.5.0.dev2 - sample code works successfully
2.5.0.dev4 and beyond - sample code runs but the window / surface is not updated
The text was updated successfully, but these errors were encountered: