Author Topic: Windows games focus issue  (Read 4827 times)

pocketpal

  • Newbie
  • *
  • Posts: 7
    • View Profile
Windows games focus issue
« on: December 05, 2017, 08:04:09 AM »
Since upgrading to 2.3, my Windows games (non-emulator) are not launching correctly.  AM launches the selected game, but then regains the focus and runs simultaneously with the game in the background.  I can alt+tab to the game and play it, but it's slow and stuttery, and I can still hear the video playing in AM and selection sounds when I move the joystick!  I have searched high and low for a solution to no avail, and am starting to wonder if it's a bug.  Is anyone else experiencing this?

pocketpal

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Windows games focus issue
« Reply #1 on: December 20, 2017, 08:03:03 AM »
For what it's worth, I switched from using Windows shortcut *.lnk files to using batch files, and everything is groovy. My guess is the problem goes something like:
  • AM launches shortcut
  • shortcut launches game
  • shortcut has done it's job, so it quits
  • AM sees shortcut is no longer running and thinks it's time to take back control

dukpoki

  • Sr. Member
  • ****
  • Posts: 138
    • View Profile
Re: Windows games focus issue
« Reply #2 on: December 21, 2017, 11:34:41 PM »
Hey glad to hear you got it sorted out.  I'm wondering though, is there a good guide/thread/link to creating batches for Attract Mode that you can recommend?  I've looked up some general "how to create batches in windows" on google and tried some stuff and I don't know if I was doing it wrong or not, but I never got it to work properly at the end of the day.  Lnk files are easier (just right click the exe and create a shortcut) but I find that not all games work.  So far, i've been staying away from PC games for AM because I can never make it work without things going haywire. :(
« Last Edit: December 21, 2017, 11:38:17 PM by dukpoki »

pocketpal

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Windows games focus issue
« Reply #3 on: December 26, 2017, 08:11:27 PM »
I was having weird issues at first, too, until I realized that I needed to change to the directory containing the executable with the 'cd' command prior to running it. So my batch files look like this:
Code: [Select]
@echo off
cd [path to directory containing executable]
[executable]
The path will need to be in quotes if it contains spaces, but that's it, and it works perfectly.

dukpoki

  • Sr. Member
  • ****
  • Posts: 138
    • View Profile
Re: Windows games focus issue
« Reply #4 on: January 01, 2018, 03:57:01 PM »
Thanks a lot.

Your method works but I had to add /D right after cd because my files were on a different drive.

However there is still one game for some reason that does not want to work correctly.

It's Guilty Gear Xrd Rev 2.
I have the code like this:
Quote
@echo off
cd /D "C:\Program Files (x86)\GUILTY GEAR Xrd REV 2\Binaries\Win32"
"BootGGXrd.exe"

Apparently with this game I have your original problem where the game launches but pressing on the controller starts controlling AM in the background (no focus on the game).

Also another weird bug I can't figure out is, if I kill the game (alt+F4) upon boot, it will return to AM but now AM's resolution is all messed up.  Enabling ResFix nut does nothing too.

If anyone who reads this can chime in with some suggestions that would be great.

All in all, your batch tip has helped for the rest of my game list so thanks!

pocketpal

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Windows games focus issue
« Reply #5 on: January 05, 2018, 01:11:57 PM »
The only thing I can think of is if the .exe you're running launches another executable, and then quits itself.  Were this the case, to your batch file (just like with the shortcuts in AM) it would appear as if the game had exited, and the batch file would close, which would signal to AM that it was time for it to resume control.

I also had loads of trouble with the resolution issues you describe.  Several of my emulators would screw up the AM menu after exit, and ResFix only helped with one of them.  After a great deal of tinkering around, I eventually gave up, and just ran the problem emulators at 640x480.  I'm not getting the crispiest resolution I would like on my arcade monitor this way, but it isn't bad.

dukpoki

  • Sr. Member
  • ****
  • Posts: 138
    • View Profile
Re: Windows games focus issue
« Reply #6 on: January 06, 2018, 09:46:19 PM »
So after what you've said, I tried looking into the folder to see if I could spot any re-routes and sure enough I find this:



So the actual game exe seems to be GuiltyGearXrd.exe but if you click on that alone/directly, then the game crashes and does not boot.  You have to use BootGGXrd.exe, which I believe loads configuration files and then starts the GuiltyGearXrd.exe immediately after.  I've also confirmed this with Window's Task Manager.  Every time I double click BootGGXrd, GuiltyGearXrd is shown in the process tree near immediately.  So you were right.  It's loading something else.  Unfortunately there doesn't seem to be a fix because it doesn't look like you can skip the BootGGXrd route in order for the game to run.  That sucks, but at least the mystery is solved now.  :P

The resolution thing really bites too.  I hope the next revision they can find a way to truly fix all of these issues for us.  Anyways thanks and happy gaming my friend!


EDIT:  I found a fix!  In the emulator config menu, there's a line called "Minimum Run Time".  You change this value from 0 to something longer like 10.  I guess it waits 10 seconds for the BootGGXrd.exe to open and run GuiltyGearXrd.exe.  That solves it and the resolution problem.  For your games with resolution problems perhaps try messing with this value.  You never know it might fix it!
« Last Edit: January 08, 2018, 11:47:26 AM by dukpoki »