Dolphin, the GameCube and Wii emulator - Forums

Full Version: man dolphin-emu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I found a workaround for closing Dolphin with the escape key that was easier than learning enough C++ to insert an exit() call. I'm still interested in how to modify the source though. I would prefer compiling a special version of Dolphin over adding an extra layer of input configurations to the cabinet. Here's what I did:

install xbindkeys and wmctrl

run

Code:
xbindkeys --defaults > /home/user/.xbindkeysrc

to create a default config file
edit the file, comment out the examples with #, and add the lines

Code:
"wmctrl -c :ACTIVE:"
  Escape

then save the file and run

Code:
xbindkeys

This will make the escape key close the currently active window. I haven't set it up on the actual cabinet yet, but it's working great on this computer. I think instead of the active window, I will set it to close the Dolphin window specifically so it has no effect on all the other emulators that are working properly.
Instead of "wmctrl -c :ACTIVE:", I will use "wmctrl -c Dolphin-emu Rev XXXXX", or whatever the exact window title is.
Maybe it's just my years of experience programming, but I don't see how that's easier than typing this in right place in the source code:

Code:
exit(); //yup, that's it, a one-liner :p

But whatever floats you boat Wink

Also, I probably should have checked this earlier, but this is even easier. Dolphin has a hotkey for exiting. Stopping emulation is set to Escape, but you can change that:

http://i3.minus.com/ibteBTSoCROquh.png
What!? You can configure hotkeys? How did I not notice that before? Thanks for pointing it out. Looks like I've been trying to solve a problem that's been fixed since 2010.

Quote:Maybe it's just my years of experience programming, but I don't see how that's easier than typing this in right place in the source code:

Yeah, if I knew what I was doing, I could just find the right spot and drop it in. Other than playing around in Python a few times, the only programming experience I've had has been making leds blink with an Arduino, so finding that right spot would mean many hours of reading for me. I have been thinking about getting into programming, so if you have any advice on where to start, it would be appreciated.
I got back to the cabinet today and I set the exit hotkey to escape, and I was able to exit the game with the button on my control panel, but it still didn't close Dolphin. Alt-F4 was still required to close the Dolphin window. I did end up having to use xbindkeys and wmctrl to make it work. Perhaps the latest versions exit properly, but I'm using an old version that seems to run fastest on my old E8400@3.6GHz (5a77cae2e343). For anyone who's interested, I'm using Cabrio as my frontend, and it's working perfectly for the following emulators:

MAME
Stella
Mednafen
PCSX2
and now... Dolphin-emu
(05-16-2014, 08:24 PM)artantaaa Wrote: [ -> ]I just found Ikaruga. It's perfect for the cabinet, and lots of fun. I'll probably do SSBM too. I've almost got everything setup, but I can't seem to get Dolphin to exit when I hit escape. I've tried the -b option that is supposed to "Exit Dolphin with emulator" but the Dolphin window remains open after I push escape. I have to close the window with the mouse, or hit Alt-F4 to get back to the front end. This is a problem since there will be no mouse or keyboard on the finished cabinet. Is there a way to make the game selection window close when exiting a game, or better yet, never even open?

If there is no way to do that, I will have to somehow get the escape key to also trigger Alt-F4, perhaps with a slight delay. Does anyone know how to set that up in Debian?

Use the -b command line switch, and dolphin will close when you end emulation.
Thanks RachelB. I did add the -b option to Dolphin from within the frontend, but it didn't make a difference. Perhaps Cabrio is not sending the commands properly. Next time I visit the cabinet, I'll try running dolphin-emu -b directly and see if that helps.
I tried the -b option in the command line without using the front end, and it doesn't seem to work in the older version I'm using in the cabinet. It does work in 3.5 though. In the cabinet's next incarnation, with newer hardware, I'll use a newer version of Dolphin. For now, it's nice to have lightweight GC/Wii games up and running with the xbindkeys and wmctrl workaround. Even though it's not needed for Dolphin anymore, hopefully it will help someone who needs to map keys in Linux for something.
3.5? That's the newer version you tried? Really? You're still thousands of revisions behind.
I've tried the new builds too, but I don't have the hardware it takes to run full speed with them. I'll probably leave the cabinet alone for a while now that it's assembled and working, but I tested the -b option on a different computer that had 3.5 on it to see if it worked, and it does.
The newest builds are actually much faster on some hardware configurations than 3.5. 3.5 is probably overall the slowest release of all.
Pages: 1 2