Screensaver not suppressed in ZSNES WIN since May 1st WIP
Moderator: ZSNES Mods
Screensaver not suppressed in ZSNES WIN since May 1st WIP
I thought I'd make a post about this issue that has been creeping up in ZSNES for a while on my end. I apologize if this has already been addressed, but I searched through the documentation and these forums without mention of it. Anyway:
Having the "disable screensaver" option checked doesn't work on my machine since the May 1st WIP, and in subsequent WIPs since then (The newest build of October 19th 2004 included). Looking through ipher's page, it seems that the May 1st build was the first to implement a new code for disabling the Windows screensaver. Maybe this has something to do with it?
I'm running: Windows XP Pro Service Pack 2, if this helps. Additional information will gladly be provided upon request.
Having the "disable screensaver" option checked doesn't work on my machine since the May 1st WIP, and in subsequent WIPs since then (The newest build of October 19th 2004 included). Looking through ipher's page, it seems that the May 1st build was the first to implement a new code for disabling the Windows screensaver. Maybe this has something to do with it?
I'm running: Windows XP Pro Service Pack 2, if this helps. Additional information will gladly be provided upon request.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Might as well add my request here.
Is there any easy way to prevent xscreensaver from activating while zsnesl is running ? I currently have to disable it manually to watch movies.
Note: please disregard this post if there's no easy way (i.e. ASM hell).
Is there any easy way to prevent xscreensaver from activating while zsnesl is running ? I currently have to disable it manually to watch movies.
Note: please disregard this post if there's no easy way (i.e. ASM hell).
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Regular
- Posts: 317
- Joined: Tue Sep 14, 2004 12:48 am
- Location: In a small padded white room
- Contact:
Seconded.grinvader wrote:Might as well add my request here.
Is there any easy way to prevent xscreensaver from activating while zsnesl is running ? I currently have to disable it manually to watch movies.
Note: please disregard this post if there's no easy way (i.e. ASM hell).
http://jdrrant.blogspot.com/ - CODEpendent Blog
http://games.technoplaza.net/ - Emulation Goodies
http://games.technoplaza.net/ - Emulation Goodies
-
- Regular
- Posts: 317
- Joined: Tue Sep 14, 2004 12:48 am
- Location: In a small padded white room
- Contact:
http://www.jwz.org/xscreensaver/faq.html#dvdgrinvader wrote:Might as well add my request here.
Is there any easy way to prevent xscreensaver from activating while zsnesl is running ? I currently have to disable it manually to watch movies.
Note: please disregard this post if there's no easy way (i.e. ASM hell).
http://jdrrant.blogspot.com/ - CODEpendent Blog
http://games.technoplaza.net/ - Emulation Goodies
http://games.technoplaza.net/ - Emulation Goodies
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Is this code compatible with ZSNES ?
I was talking about snes movies...
I was talking about snes movies...
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Regular
- Posts: 317
- Joined: Tue Sep 14, 2004 12:48 am
- Location: In a small padded white room
- Contact:
Yeah, I know. There isn't a difference. All zsnes needs to do is make that call to the xscreensaver command progam which tells it to disable. Course it needs a timer it seems. That might be difficult.grinvader wrote:Is this code compatible with ZSNES ?
I was talking about snes movies...
http://jdrrant.blogspot.com/ - CODEpendent Blog
http://games.technoplaza.net/ - Emulation Goodies
http://games.technoplaza.net/ - Emulation Goodies
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Zsnes must already be full of timers for synchronization purposes.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- Regular
- Posts: 317
- Joined: Tue Sep 14, 2004 12:48 am
- Location: In a small padded white room
- Contact:
This isn't a perfect solution. Maybe it's no better than disabling the screensaver before you start, but maybe it is.
I have written a little program and script that will disable xscreensaver using the method in the FAQ. Every 45 seconds, my little program calls the xscreensaver-command with -disable.
It also writes its PID to a file for later.
The script starts the program in the bg, starts zsnes, then kills the program and removes the PID file after zsnes has exited.
I only tested it for about 5 minutes, but it worked well for me.
Here is the C program (noblank.c). Compile it with gcc -o noblank noblank.c
Here is the script, zsnes.sh
Run sh zsnes.sh from a directory you have write access to, and zsnes will need to be in your path, or you could modify the script.
I think it's slightly easier than disabling and re-enabling the screensaver, because after you have the program compiled, you can simply use the script instead of calling zsnes, or put it on a menu if you like. Plus you don't have to reenable the screensaver.
I have written a little program and script that will disable xscreensaver using the method in the FAQ. Every 45 seconds, my little program calls the xscreensaver-command with -disable.
It also writes its PID to a file for later.
The script starts the program in the bg, starts zsnes, then kills the program and removes the PID file after zsnes has exited.
I only tested it for about 5 minutes, but it worked well for me.
Here is the C program (noblank.c). Compile it with gcc -o noblank noblank.c
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
int main(int argc, char *argv[]) {
pid_t pid = getpid();
const char pidfile[] = "noblank.pid";
FILE *f;
if ((f = fopen(pidfile, "wt")) == NULL) {
fprintf(stderr, "error: unable to open pidfile for writing\n");
return -1;
}
fprintf(f, "%hu", pid);
fclose(f);
for (;;) {
system("xscreensaver-command -deactivate >&- 2>&- &");
sleep(45);
}
// program will never reach here...
return 0;
}
Code: Select all
#! /bin/sh
./noblank &
zsnes
kill `cat noblank.pid`
rm noblank.pid
I think it's slightly easier than disabling and re-enabling the screensaver, because after you have the program compiled, you can simply use the script instead of calling zsnes, or put it on a menu if you like. Plus you don't have to reenable the screensaver.
http://jdrrant.blogspot.com/ - CODEpendent Blog
http://games.technoplaza.net/ - Emulation Goodies
http://games.technoplaza.net/ - Emulation Goodies
-
- New Member
- Posts: 9
- Joined: Fri Jul 22, 2005 4:19 am
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
With so little information, how do you expect us to help.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Trooper
- Posts: 535
- Joined: Wed Jul 28, 2004 3:26 am
This is very old, does this still apply to the latest wip? I don't run linux so I can't check.
[code]<Guo_Si> Hey, you know what sucks?
<TheXPhial> vaccuums
<Guo_Si> Hey, you know what sucks in a metaphorical sense?
<TheXPhial> black holes
<Guo_Si> Hey, you know what just isn't cool?
<TheXPhial> lava?[/code]
<TheXPhial> vaccuums
<Guo_Si> Hey, you know what sucks in a metaphorical sense?
<TheXPhial> black holes
<Guo_Si> Hey, you know what just isn't cool?
<TheXPhial> lava?[/code]
-
- New Member
- Posts: 9
- Joined: Fri Jul 22, 2005 4:19 am
It's the Windows version, version 1.42. Actually it's not doing it now. but it was earlier. Right after I changed resolution, it did it. I even restarted the computer and it still did it. I shut down last night and this morning it worked. there's still other problems. but It seems better then snes9x
OS: Windows 2000 SP4
OS: Windows 2000 SP4
-
- New Member
- Posts: 9
- Joined: Fri Jul 22, 2005 4:19 am