-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Only allow pausing when there is an active core #18543
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
base: master
Are you sure you want to change the base?
Conversation
|
Hi @neil4 , what do you think of this? |
|
I think @sonninnos might have some thoughts, as well. IIRC, he was talking to someone recently who complained about pause behavior being unpredictable/unintuitive coming in and out of menus. |
|
I'm not sure I understand the overlay example, but the description sounds reasonable as far as general pause toggle behavior. I'm miles from my PC, but I can look at this in a couple of days. |
|
@alanide Ok, one suggestion, maybe two. In the I'm pretty neutral on changing the stay-paused behavior when loading content while paused (hot swapping). Fastforward and slowmotion are the same way, even if most of RetroArch (like the overlay) is reinitialized with new content. But, you could make it unpaused on start by moving |
|
Thank you for the feedback. I will make some changes later this week. |
|
@neil4 - I have pushed the requested changes. Thank you for pointing me in the right direction. The I do want to call out that the issue can still manifest if the pause state is changed while the quick-menu is open, and the user returns to the game without restarting, closing, or 'hot swapping'. (ie: no core deinit takes place). But based on my limited understanding of how the quick-menu is intended to work, I don't think changing that behavior would be correct for all use cases. So I can live with it, if everyone else feels the same. |
| if (!(runloop_st->flags & RUNLOOP_FLAG_CORE_RUNNING)) | ||
| break; | ||
|
|
||
| bool paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED) ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave you bad example code -- pause needs to be declared before checking RUNLOOP_FLAG_CORE_RUNNING.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated and squashed.
I apologize, I have forgotten the idiosyncrasies of the C language...
|
One last nit: |
|
@neil4 - Updated |
|
LGTM |
Guidelines
Description
Please see this forum link for details.
TLDR: This change blocks the
pauseaction from taking effect when there is no active core. And forces anunpauseaction upon the closing of an active core.The intended result of which is a more consistent transition between game launches. Specifically when a custom
input_overlayconfiguration has been defined which keys off of the pause action. For example:Prior to this change, toggling pause without a core being loaded could result in the pause action being 180° out of phase with the pause overlay being displayed.
PS - I apologize in advance if I am stepping on anyone's toes, or if this is the incorrect way to introduce such a change. I am a software engineer by trade, but it has probably been a decade or more since my last contribution to an open source project. And probably 2 decades since I last wrote anything in C... 🙃
Related Issues
There is one additional manifestation of this issue. Specifically when 'hot swapping' between games via the quick menu, without first closing the open content. I was unable to determine how to properly resolve that without introducing unintended side effects. Suggestions are welcome.
Related Pull Requests
[Any other PRs from related repositories that might be needed for this pull request to work]
Reviewers
[If possible @mention all the people that should review your pull request]