diff -ur mythplugins-0.18.1/mythgame/mythgame/atarihandler.cpp mythplugins-0.18.1.mod/mythgame/mythgame/atarihandler.cpp --- mythplugins-0.18.1/mythgame/mythgame/atarihandler.cpp 2005-02-24 16:21:37.000000000 -0500 +++ mythplugins-0.18.1.mod/mythgame/mythgame/atarihandler.cpp 2005-11-14 23:42:47.000000000 -0500 @@ -9,6 +9,7 @@ #include #include +#include using namespace std; @@ -30,9 +31,15 @@ romdata->Romname() + "\""; cout << exec << endl; - // Run the emulator and wait for it to terminate. + // Mute Joystick events in libmyth while ROM is executing + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(true)); + + // Run the emulator and wait for it to terminate. FILE* command = popen(exec, "w"); pclose(command); + + // Un-Mute Joystick events in libmyth now that ROM execution is finished + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(false)); } void AtariHandler::edit_settings(RomInfo* romdata) diff -ur mythplugins-0.18.1/mythgame/mythgame/mamehandler.cpp mythplugins-0.18.1.mod/mythgame/mythgame/mamehandler.cpp --- mythplugins-0.18.1/mythgame/mythgame/mamehandler.cpp 2005-04-11 14:04:52.000000000 -0400 +++ mythplugins-0.18.1.mod/mythgame/mythgame/mamehandler.cpp 2005-11-14 23:40:09.000000000 -0500 @@ -15,6 +15,7 @@ #include #include #include +#include #include using namespace std; @@ -525,6 +526,9 @@ pclose(romlist_info); + // Mute Joystick events in libmyth while ROM is executing + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(true)); + FILE *command; command = popen(exec + " 2>&1", "r"); @@ -538,6 +542,9 @@ } pclose(command); + + // Un-Mute Joystick events in libmyth now that ROM execution is finished + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(false)); } void MameHandler::edit_settings(RomInfo * romdata) diff -ur mythplugins-0.18.1/mythgame/mythgame/neshandler.cpp mythplugins-0.18.1.mod/mythgame/mythgame/neshandler.cpp --- mythplugins-0.18.1/mythgame/mythgame/neshandler.cpp 2005-02-24 16:21:39.000000000 -0500 +++ mythplugins-0.18.1.mod/mythgame/mythgame/neshandler.cpp 2005-11-14 23:40:57.000000000 -0500 @@ -12,6 +12,7 @@ #include #include +#include using namespace std; @@ -34,9 +35,15 @@ romdata->Romname() + "\""; cout << exec << endl; - // Run the emulator and wait for it to terminate. + // Mute Joystick events in libmyth while ROM is executing + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(true)); + + // Run the emulator and wait for it to terminate. FILE* command = popen(exec, "w"); pclose(command); + + // Un-Mute Joystick events in libmyth now that ROM execution is finished + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(false)); } void NesHandler::edit_settings(RomInfo* romdata) diff -ur mythplugins-0.18.1/mythgame/mythgame/odyssey2handler.cpp mythplugins-0.18.1.mod/mythgame/mythgame/odyssey2handler.cpp --- mythplugins-0.18.1/mythgame/mythgame/odyssey2handler.cpp 2005-02-24 16:21:39.000000000 -0500 +++ mythplugins-0.18.1.mod/mythgame/mythgame/odyssey2handler.cpp 2005-11-14 23:41:55.000000000 -0500 @@ -9,6 +9,7 @@ #include #include +#include using namespace std; @@ -30,9 +31,15 @@ romdata->Romname() + "\""; cout << exec << endl; - // Run the emulator and wait for it to terminate. + // Mute Joystick events in libmyth while ROM is executing + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(true)); + + // Run the emulator and wait for it to terminate. FILE* command = popen(exec, "w"); pclose(command); + + // Un-Mute Joystick events in libmyth now that ROM execution is finished + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(false)); } void Odyssey2Handler::edit_settings(RomInfo* romdata) diff -ur mythplugins-0.18.1/mythgame/mythgame/pchandler.cpp mythplugins-0.18.1.mod/mythgame/mythgame/pchandler.cpp --- mythplugins-0.18.1/mythgame/mythgame/pchandler.cpp 2005-02-24 16:21:39.000000000 -0500 +++ mythplugins-0.18.1.mod/mythgame/mythgame/pchandler.cpp 2005-11-14 23:39:32.000000000 -0500 @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -103,9 +104,15 @@ void PCHandler::start_game(RomInfo * romdata) { + // Mute Joystick events in libmyth while ROM is executing + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(true)); + // Run the game and wait for it to terminate. FILE* command = popen(romdata->Romname(), "w"); pclose(command); + + // Un-Mute Joystick events in libmyth now that ROM execution is finished + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(false)); } void PCHandler::edit_settings(RomInfo * romdata) diff -ur mythplugins-0.18.1/mythgame/mythgame/sneshandler.cpp mythplugins-0.18.1.mod/mythgame/mythgame/sneshandler.cpp --- mythplugins-0.18.1/mythgame/mythgame/sneshandler.cpp 2005-02-24 16:21:39.000000000 -0500 +++ mythplugins-0.18.1.mod/mythgame/mythgame/sneshandler.cpp 2005-11-13 02:21:54.000000000 -0500 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -445,9 +446,15 @@ exec+= " \"" + gContext->GetSetting("SnesRomLocation") + "/" + romdata->Romname() + "\""; cout << exec << endl; + // Mute Joystick events in libmyth while ROM is executing + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(true)); + // Run the emulator and wait for it to terminate. FILE* command = popen(exec, "w"); pclose(command); + + // Un-Mute Joystick events in libmyth now that ROM execution is finished + QApplication::postEvent(gContext->GetMainWindow(), new JoystickMenuMuteEvent(false)); } void SnesHandler::edit_settings(RomInfo * romdata)