Author Topic: losing focus tips/tricks?  (Read 5896 times)

snax087

  • Newbie
  • *
  • Posts: 9
    • View Profile
losing focus tips/tricks?
« on: January 03, 2021, 04:54:43 PM »
Are there any guidelines to follow to reduce or eliminate the possibility of AM losing focus either on itself when exiting a game, or on the game when it launches? I have AM as the shell startup executable instead of explorer.exe, so explorer is never running when AM is unless I start it manually, but sometimes when a game starts it wont be the focused window and wont respond until I Alt+Tab so i'm not sure what else it could be focused on. It happens with multiple emulators as well but mostly ones that use Retroarch. MAME seems to work great. Are there any settings in windows and or AM that i should apply to ensure that games or AM doesnt lose focus? Ive looked around on the forum but theres not any centralized information around this subject. I'm currently using AM 2.6. Thanks!  :D

snax087

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: losing focus tips/tricks?
« Reply #1 on: January 03, 2021, 10:39:18 PM »
So it seems to lose focus in the very short time in between the hand off from AM to the Retroarch window. If you press any keys during that time before the RA window is fully booted and in focus, it causes it to lose focus on the game. MAME does not have this problem though no matter how many keys i press in that same time between the AM to MAME hand off so i'm not sure if this is an AM issue or a Retroarch issue....

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: losing focus tips/tricks?
« Reply #2 on: January 04, 2021, 10:32:04 PM »
You can try using a nb_mode_wait setting. It might help.

http://forum.attractmode.org/index.php?topic=3362.msg23569#msg23569

snax087

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: losing focus tips/tricks?
« Reply #3 on: January 05, 2021, 10:38:03 AM »
You can try using a nb_mode_wait setting. It might help.

http://forum.attractmode.org/index.php?topic=3362.msg23569#msg23569
Yea ive tried messing around with that as well, but it seems to make it worse. I figured out that if you set the Exit Hotkey in AM it will actually exit the emulator for you even if the window isnt in focus and will return focus to AM so at least that option will give them the ability to exit and relaunch the game and hopefully not have it lose focus on startup provided no buttons are pressed in the ~1 second window of handoff. I was looking at trying to run an AHK script to check if the Retroarch window was running and if it is to make it the active window but ive never done any kind of scripting so i'm a little green in that aspect of it. Best solution i can think of.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: losing focus tips/tricks?
« Reply #4 on: January 06, 2021, 12:59:49 AM »
You can also trying turning on Resfix in AM plugins.

zestful

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: losing focus tips/tricks?
« Reply #5 on: September 05, 2024, 02:23:55 PM »
Anyone ever find a solution for this, happens often for me as well, doesn't seem to matter what emulator, but you'll be in the middle of playing a game, then attract mode will become the window focus, pushing the game to the background.