Hi,
On my system (Ubuntu Hardy with running Gnome with Compiz Desktop effects), I was experiencing a common problem among some games and similar applications: screensaver was being started while I was playing. Always, before start my game, I had to go to gnome-screensaver configurations and disable it, and also disable the monitor's power save mode.
Supposedly SDL should take care of this alone, bug according to some things I read, SDL asks X Server directly to prevent screensaver from appearing, but daemons like gnome-screensaver or kde-screensaver aren't aware of it. I'm not sure, though.
I went a bit further to check what could be done about this. I didn't find anything useful on the Mupen forums about this (maybe my fault? I searched for "screensaver")". Since I was wanting to spend some of my free time trying to see how to contribute to free software in some way, I analyzed some programs, like Totem, MPlayer, VLC, and did some research on this subject.
I've found many solutions, involving sending commands to the daemons (things like "system("gnome-screensaver --....")", using DBUS or using X scrensaver extensions. Apparently, all the solutions I found has downsides (not generic enough, or added too much dependencies, etc.). Well, maybe I missed something... but I sticked to a method which sends fake input events to X Server, which seemed compatible enough for any situation under Linux, and added only 1 dependency (XTst library).
I've changed my Mupen build for including this modification. I did this adding a file (scrsaver_control.c) to take care of this stuff, and it is being called from main.c in start/stop emulation. I guess it should work on every situation, even if Mupen is build without a GUI. I've also added a libxtst dependency to Mupen's Makefile.
Maybe you're already working in it, maybe you don't have interest on my solution, maybe whatever, but if you have interest on adding it to current Mupen's code, let me know, I can send it and try to improve it (maybe extend to other platforms? I don't know how Mupen behaves under Windows or Mac OS X). I've just finished writting and testing the code, so it probably need a little more of polish, but I can do this and send it, if you want.
On my system (Ubuntu Hardy with running Gnome with Compiz Desktop effects), I was experiencing a common problem among some games and similar applications: screensaver was being started while I was playing. Always, before start my game, I had to go to gnome-screensaver configurations and disable it, and also disable the monitor's power save mode.
Supposedly SDL should take care of this alone, bug according to some things I read, SDL asks X Server directly to prevent screensaver from appearing, but daemons like gnome-screensaver or kde-screensaver aren't aware of it. I'm not sure, though.
I went a bit further to check what could be done about this. I didn't find anything useful on the Mupen forums about this (maybe my fault? I searched for "screensaver")". Since I was wanting to spend some of my free time trying to see how to contribute to free software in some way, I analyzed some programs, like Totem, MPlayer, VLC, and did some research on this subject.
I've found many solutions, involving sending commands to the daemons (things like "system("gnome-screensaver --....")", using DBUS or using X scrensaver extensions. Apparently, all the solutions I found has downsides (not generic enough, or added too much dependencies, etc.). Well, maybe I missed something... but I sticked to a method which sends fake input events to X Server, which seemed compatible enough for any situation under Linux, and added only 1 dependency (XTst library).
I've changed my Mupen build for including this modification. I did this adding a file (scrsaver_control.c) to take care of this stuff, and it is being called from main.c in start/stop emulation. I guess it should work on every situation, even if Mupen is build without a GUI. I've also added a libxtst dependency to Mupen's Makefile.
Maybe you're already working in it, maybe you don't have interest on my solution, maybe whatever, but if you have interest on adding it to current Mupen's code, let me know, I can send it and try to improve it (maybe extend to other platforms? I don't know how Mupen behaves under Windows or Mac OS X). I've just finished writting and testing the code, so it probably need a little more of polish, but I can do this and send it, if you want.