-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[rcore] [SDL2] Add implementation for FLAG_WINDOW_ALWAYS_RUN
#4598
base: master
Are you sure you want to change the base?
Conversation
@asdqwe Actually, stop running is my expected behaviour when minimizing the Window, I think it's the optimal option, so being default. About the other platforms, the ones that have the minimizing option I think implement similar alternatives (afair, Android also pauses the Activity and Web browsers pauses tabs activity when minimized/unselected tab). I prefer to let the user configure it for the sub-optimal use case that is Also, about the othe Desktop backends (SDL, RGFW), probably behaviour should be the same, just forgot about it when added. Just thinking... what is the default behaviour for games on Windows? |
71885dd
to
449aba9
Compare
FLAG_WINDOW_ALWAYS_RUN
by default on PLATFORM_DESKTOP_GLFW
FLAG_WINDOW_ALWAYS_RUN
@asdqwe thank you very much for the testing and detailed explanations, I'm still thinking about it and the best way to address it. Maybe letting control to the user is the right way... but I'm afraid many users would not control it and just let the application running at full speed on background... but maybe more advanced/professional users would prefer to control it... 🤔 The other option is letting raylib to control it, like now, but instead of halting, reducing framerate... but in that case, probably better to give full control to user... |
Since I was the one who posted issue #4588 which led to this issue being opened I figured I should give my two cents. I don't really care that much if the game stops or not when you minimize the game, but I do think it's bad if you minimize the game for 5 minutes and then when you open the game again As a developer I currently have two options to get around this. A) Set |
@Volcanic-Penguin yeah, definitely |
74ad9d7
to
7bfa878
Compare
There's a whole bunch of reasons a game can get stalled which results in high frame time. If a game can't handle it then this change is not going to help. As such I find this kind of thing unnecessary. |
As requested (ref, ref), the PR was updated to instead add implementation for PR can be tested with:
EDIT: Just to help with evaluation, this PR maintains the current functionality, extends it for SDL and fixes the frame time, with nothing being lost. If, in the future, it's decided to invert the default behavior (aka, continue processing while minimized), this same implemenation can still be used (just a matter of changing the flag name and two ifs). In conclusion, it's a very low friction PR and can be used/reused both ways. |
See #4598 (comment).