Windows: Do not drop into debugger when no MAME window has focus #13902
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Windows, the debugger has a special Windows-specific feature that drops the user into the debugger if the key sequence is pressed. This seems to be present so that the key sequence triggers dropping into the debugger not just from the main window, but also from debugger windows.
This has also created an oddity where pressing the debugger key sequence from a MAME window will cause a "User-initiated break" but pressing it from a debugger window will cause "Internal breakpoint" to be displayed.
However, while this logic has a check to not apply when to a MAME window, it seems to also activate even if MAME itself is not in focus. This change ensures that a stray debugger sequence in a completely unrelated application won't cause the user to be dropped in the debugger.