Emulator launches minimized when using JoyToKey

swimminginthoughts

New member
RL Member
I'm having an issue similar to the one mentioned here:
http://www.rlauncher.com/forum/show...hen-using-Hyperspin-with-RL&p=15931#post15931

When using HyperSpin (any 1.4 beta version) and the latest RocketLauncher with JoyToKey enabled, more often than not, the emulator will launch minimized in the background. I can ALT+TAB to focus it.

I've tested with Nestopia, Snex9x, Fceux, and Fusion. Fusion never launches correctly. The others are hit-or-miss—sometimes they launch focuses and sometimes they don't. I know this is a RocketLauncher issue because if I test launching from RocketLaunch alone, I get the same result, the screen flashes for a second, then focus is returned to RocketLauncher, and the emulator is minimized in the taskbar. If I launch from HyperSpin, the screen flashes, returns to HyperSpin, and I can ALT+TAB to the emulator or close HyperSpin and see the emulator minimized in the taskbar. If I turn JoyToKey off, the problems seems to go away.

I have JoyToKey set to start minimized and to hide from the taskbar when minimized.

I'm running Windows 7 64-bit.

Am I missing something?
 

djvj

Administrator
Staff member
Developer
So if you disable joytokey and the problem goes away, how can you say its an RL issue? See if you can disable all taskbar icons for joytokey, often these cause focus issues.
 

Ninja2bseen

Member
RL Member
I'm not getting the same experience that I'm aware of. I can look again tonight for fusion if you would like. Are you sure that joy2key is set to minimized?
 

swimminginthoughts

New member
RL Member
Yep, I have JoyToKey set for "Start JoyToKey in minimized mode" and "Hide from taskbar when minimized". What version of JoyToKey are you using? I've tried the latest beta, 5.9, and the current 5.8.2 but they both do the same thing.

I'm pretty certain that it is RocketLauncher because JoyToKey doesn't launch or load a profile until RocketLauncher tells it to.

If I have JoyToKey launch with HyperSpin, switch my systems to launch directly without RocketLauncher, they launch fine and the button mappings work. I can also launch them fine without JoyToKey, or open JoyToKey manually, open HyperSpin (without having JoyToKey open with it), and it works fine. It's when I have RocketLauncher handle JoyToKey that I see it do this.

I've verified that in HyperHQ, the systems are set to launch maximized (also tried normal) and in RocketLauncher, I've fiddled with the hide options (cursor, desktop, taskbar, emulator, and frontend).
 

Attachments

  • Untitled.png
    Untitled.png
    27.2 KB · Views: 24

swimminginthoughts

New member
RL Member
I'm using 5.8.2. I switched from Fusion to Regen for Genesis and it works perfectly. I haven't been able to recreate it with Regen. This doesn't help with 32X emulation though.

I'm totally stumped.
 

swimminginthoughts

New member
RL Member
Nope, just tried that and it didn't work. Is there anything in a log file that would show what is going on?

It's something with the way JoyToKey is being loaded.

Here's something strange:
I have a JoyToKey set to load with HyperSpin with a Hyperspin FE profile.
If I turn off keymapper support in Sega 32X (where I'm trying to use Fusion), it launches every time and maintains the HyperSpin profile fine. Of course it the mappings are different than what I need, but I think it shows that there is something with the way RocketLauncher is trying to load JoyToKey on my system, for some reason. It's possible that I overlooked something but I've been through every setting so many times, I'm not sure what it could be. It's weird that Regen launches fine every time. Maybe it's a timing thing?
 

swimminginthoughts

New member
RL Member
And here's another strange thing. If I turn the fade screen ON, the problem appears to go away. I haven't had a chance to test this a lot but from my initial tests, it looks like it corrected the problem.
 

dustind900

Member
Supporter
RL Member
It's good practice to always have fade on. I can't replicate it though

No, that is not true. Fade should be turned on "after" you get your system up and running.

@swimminginthoughts
This is a special case, and since there is no LOG anywhere it's next to impossible to tell whether or not turning on Fade actually fixed the problem, or what the problem was in the first place. What is good practice though would be to post a log when you post a problem. :deal:
 

djvj

Administrator
Staff member
Developer
I tried to replicate as well and fusion always launches fine for me with joytokey enabled.
 

rmzalbar

New member
Focus problem. Yeah. Sure, you can turn off keymapping in Rocketlauncher and set up some auto-profiles in JoyToKey itself, but that will only get you emulator-level profiles. You can't really do it at the system or ROM level. I got fed up with that today and tried to solve it.

I figured out the cause of losing focus when launching emulators or returning to HyperSpin when using JoyToKey with RocketLauncher, and I also figured out a solution.

When launching a game, RL sets the profile in JoyToKey by closing JoyToKey, then launching it again with the desired joytokey profile as an argument. It is the opening of JoyToKey that is the problem; it steals focus. However, this focus-stealing does not occur if JoyToKey is already open! The command to open joytokey with profile name simply causes it to quietly switch to that profile.

The caveat is that the profile must already be loaded, so the secret sauce to make this work is to copy all configs from the profiles into JoyToKey's folder so that they all load into JoyToKey's list when you launch it before you run HyperSpin. Then, you need to comment out (with a semicolon) the four lines of code in \RocketLauncher\Lib\Keymapper.ahk that is concerned with closing JoyToKey; lines 601-605 (if using version 1.1.6 of Keymapper.ahk.) Voila! it works!

Now I just need to clean things up a bit. Scripting must be added somewhere to copy profiles into the joytokey folder and close/reopen joytokey automatically after adding/editing them.

I know this is an old thread, but nobody seems yet to have done this, so I hope it helps someone else.
 

badflame

New member
RL Member
The caveat is that the profile must already be loaded, so the secret sauce to make this work is to copy all configs from the profiles into JoyToKey's folder so that they all load into JoyToKey's list when you launch it before you run HyperSpin. Then, you need to comment out (with a semicolon) the four lines of code in \RocketLauncher\Lib\Keymapper.ahk that is concerned with closing JoyToKey; lines 601-605 (if using version 1.1.6 of Keymapper.ahk.) Voila! it works!

No, not works. Joytokey not load the configuration with the specific keys for the emulator, continues the Hyperspin keys configuration :(
 

Big-T

New member
No, not works. Joytokey not load the configuration with the specific keys for the emulator, continues the Hyperspin keys configuration :(
Apologies for resurrecting an old thread but I stumbled upon the page because I have the same issue when running the BEEBEM emulator through Hyperspin. I've set up lots of different joytokey profiles for each of the games and what rmzalbar says above looks like he's solved the mystery of why the emulators are losing focus. I have the same issue he mentions that joytokey is closed and re-opened by RL, when an individual system or game's joytokey profile is being loaded.

I tried commenting out the lines mentioned by rmzalbar above, but it didn't work for me either. It wouldn't load the emulator profile or a game's. I then added this line:
send !{TAB}
after line 613 (line 613 for me reads "Log("RunJoyToKey - Ended")"

the send!{TAB} line is like pressing ALT-TAB to switch windows.

For me, this brought the emulator back to focus. Before this, i had mapped the right stick on the xbox controller to simulate ALT-TAB, but amending the Keymapper.ahk file seems better :)

Hope this helps someone who stumbles across this page.
 
Top