RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

Combining Game Focus with Menu

Open chinagreenelvis opened this issue 1 year ago • 2 comments

Description

In version 1.15, I set up the menu and game-focus hotkeys to be scroll_lock so that I'm able to bring up the menu when auto game-focus mode is on (necessary for Dosbox Pure). Pressing the button once disables game-focus and brings up the menu; pressing it again exits the menu and brings back game-focus.

In all versions after 1.15, the game-focus is not restored when exiting the menu this way.

Expected behavior

When both menu and game-focus are bound to a single key, pressing that key twice (to exit the menu) should restore game-focus.

Actual behavior

Game focus is not restored.

Steps to reproduce the bug

  1. Bind menu and game-focus to scroll_lock
  2. Start a text-based game in Dosbox
  3. Press scroll_lock twice
  4. attempt to type

Bisect Results

After updating from 1.15 to 1.18; the behavior was changed in 1.16

Version/Commit

  • RetroArch: 1.16, 1.17, 1.18

Environment information

  • OS: Windows 10 64bit

chinagreenelvis avatar May 18 '24 22:05 chinagreenelvis

This is less of a bug and more a case of making clever use of undefined/unintentional behavior. Unfortunately, that sort of thing is always at risk of being wiped out by changes to the underlying feature.

It was probably @sonninnos who changed/fixed the behavior, in which case it'd likely be up to him whether to try and restore this unintended (but, again, quite clever) behavior or not.

hizzlekizzle avatar May 19 '24 01:05 hizzlekizzle

Either that or an option to exempt the menu hotkey from game-focus would be helpful, just so much more convenient to hit one button rather than two each time I want to enter the menu for save states.

chinagreenelvis avatar May 19 '24 06:05 chinagreenelvis

Is there any chance of working out a solution for this? I've tried setting up a workaround in AHK but apparently AutoHotKey does not work with Retroarch... ?

Edit: Apparently RA is just really quirky about getting AHK to work. I have a workaround, but it's not nearly as good of a solution as what I had been able to do in 1.15 (or having a set of defined keys that can be exempted from Game Focus).

In fact, this is only useful if you never want to disable Game Focus without bringing up the menu, in which case all hotkeys are useless anyway... hrmm.

#IFWINACTIVE, ahk_exe retroarch.exe

$ScrollLock::

	Send {ScrollLock Down}
	Sleep 100
	Send {ScrollLock Up}
	Sleep 100
	Send {F1 Down}
	Sleep 100
	Send {F1 Up}
	Soundbeep, 500, 250
	
Return

#IF

chinagreenelvis avatar Jun 07 '24 21:06 chinagreenelvis

Uhh, here it behaves exactly as expected, as in Game Focus is re-enabled as menu toggles off:

retroarch_2024_11_06_03_04_57_853

Edit: Ok, if Auto Game Focus is enabled on startup, then it goes back off, as in the cycle breaks.

sonninnos avatar Nov 06 '24 01:11 sonninnos

Edit: Ok, if Auto Game Focus is enabled on startup, then it goes back off, as in the cycle breaks.

Good to know you were able to reproduce it, any chance it will be corrected in the next release?

chinagreenelvis avatar Nov 06 '24 01:11 chinagreenelvis

I figured out a way, but I'll do a bit more testing to see if I can figure out a better way.

sonninnos avatar Nov 06 '24 01:11 sonninnos

I figured out a way, but I'll do a bit more testing to see if I can figure out a better way.

Well, I know it's been a while since I posted this issue but I want to say thanks so much for taking a look into it.

chinagreenelvis avatar Nov 06 '24 04:11 chinagreenelvis