GTK/X11 Port (aka Linux/UNIX GUI)

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

Having recently switched from OS X to Debian/PPC, I thought I'd have a go at building snes9x-gtk to see if it worked.

It builds fine, following the instructions in the first post, but sadly every time I start it up I get a segfault sometime between when the main window appears and when it first draws itself:

Code: Select all

(gdb) run
Starting program: /home/st/Downloads/snes9x-1.51-src/snes9x-gtk 
[Thread debugging using libthread_db enabled]
[New Thread 0xf7fc0000 (LWP 4224)]
Reading config file /etc/snes9x/snes9x.conf
Starting sound

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7fc0000 (LWP 4224)]
0x1020d1d8 in S9xOpenSoundDevice ()
Current language:  auto; currently asm
(gdb) bt
#0  0x1020d1d8 in S9xOpenSoundDevice ()
#1  0x100834ec in S9xInitSound (mode=5, stereo=56 '8', buffer_size=0)
    at soundux.cpp:2276
#2  0x1020d4e8 in S9xPortSoundInit ()
#3  0x10205780 in main ()
It seems my once-strong gdb-fu has left me, and I can't figure out how to dig up any more information on my own.

I tried looking for some kind of command-line switch to configure sound, but couldn't find one. The same crash occurrs if I configure --without-sound.

For what it's worth, Debian's portaudio doesn't seem to link with ALSA:

Code: Select all

$ pkg-config --libs portaudio-2.0 
-lportaudio -lm -lpthread  
Here's my system information:

Code: Select all

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (499, 'experimental')
Architecture: powerpc (ppc64)

Kernel: Linux 2.6.25-2-powerpc64 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Another issue: if you run configure --without-opengl, you get a linking error:

Code: Select all

gtk/gtk_s9x.o: In function `main':
gtk_s9x.cpp:(.text+0x1078): undefined reference to `gtk_gl_init'
gtk/gtk_s9xwindow.o: In function `Snes9xWindow::Snes9xWindow(Snes9xConfig*)':
gtk_s9xwindow.cpp:(.text+0x2a84): undefined reference to `gdk_gl_config_new_by_mode'
gtk_s9xwindow.cpp:(.text+0x2ab8): undefined reference to `gtk_widget_set_gl_capability'
gtk/gtk_s9xwindow.o: In function `Snes9xWindow::Snes9xWindow(Snes9xConfig*)':
gtk_s9xwindow.cpp:(.text+0x2de4): undefined reference to `gdk_gl_config_new_by_mode'
gtk_s9xwindow.cpp:(.text+0x2e18): undefined reference to `gtk_widget_set_gl_capability'
gtk/gtk_display.o: In function `S9xInitDriver()':
gtk_display.cpp:(.text+0x11a8): undefined reference to `S9xOpenGLDisplayDriver::S9xOpenGLDisplayDriver(Snes9xWindow*, Snes9xConfig*)'
collect2: ld returned 1 exit status
make: *** [snes9x-gtk] Error 1
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

Screwtape wrote:Having recently switched from OS X to Debian/PPC, I thought I'd have a go at building snes9x-gtk to see if it worked.

It builds fine, following the instructions in the first post, but sadly every time I start it up I get a segfault sometime between when the main window appears and when it first draws itself:

Code: Select all

(gdb) run
Starting program: /home/st/Downloads/snes9x-1.51-src/snes9x-gtk 
[Thread debugging using libthread_db enabled]
[New Thread 0xf7fc0000 (LWP 4224)]
Reading config file /etc/snes9x/snes9x.conf
Starting sound

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7fc0000 (LWP 4224)]
0x1020d1d8 in S9xOpenSoundDevice ()
Current language:  auto; currently asm
(gdb) bt
#0  0x1020d1d8 in S9xOpenSoundDevice ()
#1  0x100834ec in S9xInitSound (mode=5, stereo=56 '8', buffer_size=0)
    at soundux.cpp:2276
#2  0x1020d4e8 in S9xPortSoundInit ()
#3  0x10205780 in main ()
It seems my once-strong gdb-fu has left me, and I can't figure out how to dig up any more information on my own.
The context switch indicates the error is likely occurring inside the portaudio library. I can try to come up with a workaround, but you'd probably have better luck trying to compile portaudio with a only a specific output. If you want to make sure, try installing and running the app "audacity" (it uses portaudio), and if it crashes, portaudio is definitely the culprit.
I tried looking for some kind of command-line switch to configure sound, but couldn't find one. The same crash occurrs if I configure --without-sound.
--without-sound doesn't yet work in this port. I'm only now aware that it exists. :-)
For what it's worth, Debian's portaudio doesn't seem to link with ALSA:

Code: Select all

$ pkg-config --libs portaudio-2.0 
-lportaudio -lm -lpthread  
This is OK. the alsa libs are dlopened.
Another issue: if you run configure --without-opengl, you get a linking error:

Code: Select all

gtk/gtk_s9x.o: In function `main':
gtk_s9x.cpp:(.text+0x1078): undefined reference to `gtk_gl_init'
gtk/gtk_s9xwindow.o: In function `Snes9xWindow::Snes9xWindow(Snes9xConfig*)':
gtk_s9xwindow.cpp:(.text+0x2a84): undefined reference to `gdk_gl_config_new_by_mode'
gtk_s9xwindow.cpp:(.text+0x2ab8): undefined reference to `gtk_widget_set_gl_capability'
gtk/gtk_s9xwindow.o: In function `Snes9xWindow::Snes9xWindow(Snes9xConfig*)':
gtk_s9xwindow.cpp:(.text+0x2de4): undefined reference to `gdk_gl_config_new_by_mode'
gtk_s9xwindow.cpp:(.text+0x2e18): undefined reference to `gtk_widget_set_gl_capability'
gtk/gtk_display.o: In function `S9xInitDriver()':
gtk_display.cpp:(.text+0x11a8): undefined reference to `S9xOpenGLDisplayDriver::S9xOpenGLDisplayDriver(Snes9xWindow*, Snes9xConfig*)'
collect2: ld returned 1 exit status
make: *** [snes9x-gtk] Error 1
I'll fix this one. *edit* Actually I won't. These functions are properly wrapped. You probably didn't do a "make clean gtkclean" before trying to rebuild with different settings. ;-)

*edit again*

Version 39 is posted. This fixes two extremely unlikely NULL dereferences that could have caused your problem (a new error message will indicate it). It also adds a command-line parameter "-mutesound" and necessary changes to allow the program to start without sound. You can then hopefully go into the sound preferences to mess with the settings. Unchecking the mute box and applying settings will restart the sound system.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

BearOso wrote:You probably didn't do a "make clean gtkclean" before trying to rebuild with different settings. ;-)
Wow, there's a cleaner-than-clean target? How confusing! Why isn't it part of the regular "make clean" process?
BearOso wrote:Version 39 is posted. This fixes two extremely unlikely NULL dereferences that could have caused your problem (a new error message will indicate it).
Rebuilding with version 39, the sound now seems to work perfectly, although it prints this at startup:

Code: Select all

Reading config file /etc/snes9x/snes9x.conf
Starting sound
Error getting device info from host api.
    --> (ALSA : default)...Success
Thanks!

Of course, that just means I can start it up and find more bugs. :)

Since I've got an nVidia card, I have no hardware-accellerated OpenGL. However, for some reason I seem to have XVideo support (at least, Totem plays video full-screen with negligible CPU load) so I thought I'd try it with SNES9x. Bad idea:

Code: Select all

The program 'snes9x-gtk' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 3401 error_code 8 request_code 140 minor_code 13)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Specifically, this happens when I open the Preferences window, change "Hardware Accelleration" to "XVideo - Use hardware video blitter", then click OK.

When I follow the instructions (and install a bazillion debugging-information packages) I get this backtrace (abbreviated for legibility):

Code: Select all

#0  gdk_x_error (display=0x108c7a18, error=0xffc31288)
    at /build/buildd/gtk+2.0-2.12.11/gdk/x11/gdkmain-x11.c:614
#1  0x0eede1e0 in ?? () from /usr/lib/libSDL-1.2.so.0
#2  0x0efa17d4 in _XError (dpy=0x108c7a18, rep=0x10e48f20)
    at ../../src/XlibInt.c:2912
#3  0x0efaa780 in process_responses (dpy=0x108c7a18, wait_for_first_event=0, 
    current_error=0xffc31358, current_request=10489) at ../../src/xcb_io.c:138
#4  0x0efaab44 in _XReply (dpy=0x108c7a18, rep=0xffc31398, extra=0, discard=1)
    at ../../src/xcb_io.c:370
#5  0x0ef9be7c in XSync (dpy=0x108c7a18, discard=0) at ../../src/Sync.c:48
#6  0x0ef9c0a8 in _XSyncFunction (dpy=<value optimized out>)
    at ../../src/Synchro.c:37
#7  0x0ee735f8 in XvSetPortAttribute (dpy=0x108c7a18, port=66, attribute=80, 
    value=1) at ../../src/Xv.c:726
#8  0x1027c1d0 in S9xXVDisplayDriver::init (this=0x10e4bdc8)
    at gtk/gtk_display_driver_xv.cpp:497
#9  0x1020f864 in S9xInitDriver () at gtk/gtk_display.cpp:1528
#10 0x1020febc in S9xReinitDisplay () at gtk/gtk_display.cpp:1602
#11 0x10211b34 in Snes9xPreferences::get_settings_from_dialog (this=0x10c28900)
    at gtk/gtk_preferences.cpp:731
#12 0x10212898 in Snes9xPreferences::show (this=0x10c28900)
    at gtk/gtk_preferences.cpp:880
#13 0x10213364 in snes9x_preferences_open (widget=<value optimized out>, 
    data=0x10905300) at gtk/gtk_preferences.cpp:196
(all the stack-frames beyond this point are in the bowels of gobject, gtk, or glib).

Any ideas?
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

Screwtape wrote:
BearOso wrote:You probably didn't do a "make clean gtkclean" before trying to rebuild with different settings. ;-)
Wow, there's a cleaner-than-clean target? How confusing! Why isn't it part of the regular "make clean" process?
I didn't initially want to modify the clean target. I guess I can do that now.
BearOso wrote:Version 39 is posted. This fixes two extremely unlikely NULL dereferences that could have caused your problem (a new error message will indicate it).
Rebuilding with version 39, the sound now seems to work perfectly, although it prints this at startup:

Code: Select all

Reading config file /etc/snes9x/snes9x.conf
Starting sound
Error getting device info from host api.
    --> (ALSA : default)...Success
Ok, this is good. I had a hunch OSS wasn't making any devices visible. I've already cleaned this error up a bit for the next release.
When I follow the instructions (and install a bazillion debugging-information packages) I get this backtrace (abbreviated for legibility):

Code: Select all

#0  gdk_x_error (display=0x108c7a18, error=0xffc31288)
    at /build/buildd/gtk+2.0-2.12.11/gdk/x11/gdkmain-x11.c:614
#1  0x0eede1e0 in ?? () from /usr/lib/libSDL-1.2.so.0
#2  0x0efa17d4 in _XError (dpy=0x108c7a18, rep=0x10e48f20)
    at ../../src/XlibInt.c:2912
#3  0x0efaa780 in process_responses (dpy=0x108c7a18, wait_for_first_event=0, 
    current_error=0xffc31358, current_request=10489) at ../../src/xcb_io.c:138
#4  0x0efaab44 in _XReply (dpy=0x108c7a18, rep=0xffc31398, extra=0, discard=1)
    at ../../src/xcb_io.c:370
#5  0x0ef9be7c in XSync (dpy=0x108c7a18, discard=0) at ../../src/Sync.c:48
#6  0x0ef9c0a8 in _XSyncFunction (dpy=<value optimized out>)
    at ../../src/Synchro.c:37
#7  0x0ee735f8 in XvSetPortAttribute (dpy=0x108c7a18, port=66, attribute=80, 
    value=1) at ../../src/Xv.c:726
#8  0x1027c1d0 in S9xXVDisplayDriver::init (this=0x10e4bdc8)
    at gtk/gtk_display_driver_xv.cpp:497
#9  0x1020f864 in S9xInitDriver () at gtk/gtk_display.cpp:1528
#10 0x1020febc in S9xReinitDisplay () at gtk/gtk_display.cpp:1602
#11 0x10211b34 in Snes9xPreferences::get_settings_from_dialog (this=0x10c28900)
    at gtk/gtk_preferences.cpp:731
#12 0x10212898 in Snes9xPreferences::show (this=0x10c28900)
    at gtk/gtk_preferences.cpp:880
#13 0x10213364 in snes9x_preferences_open (widget=<value optimized out>, 
    data=0x10905300) at gtk/gtk_preferences.cpp:196
(all the stack-frames beyond this point are in the bowels of gobject, gtk, or glib).

Any ideas?
It appears to be dying after setting the autopaint flag, which probably isn't available in your driver. Autopaint isn't even necessary here, so I can remove it. I'm going to assume this isn't another shared-memory violation.

I'm curious, are you using the nv or the nouveau X11 driver? I wasn't aware of XV support in either.

*edit*
Changes are now available in release 40.
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

Xv? It's perfectly usable with the nv driver from my experience. (And your Snes9x version worked perfectly with it.) I haven't tried Nouveuau.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Revision 41

Post by BearOso »

Yet another revision is posted. This adds back the colorkey code, because apparently some other programs will shut it off. This time it will only try to set it if it finds the value.
deniseweird wrote: Xv? It's perfectly usable with the nv driver from my experience. (And your Snes9x version worked perfectly with it.) I haven't tried Nouveuau.
You're probably only hitting the overlay path. I've investigated the nv driver source, and it appears if the (non-overlay) video blitter is selected, the driver will throw a BadMatch every time when it hits this attribute. I imagine the closed source driver just ignores it.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

BearOso wrote:
Any ideas?
It appears to be dying after setting the autopaint flag, which probably isn't available in your driver. Autopaint isn't even necessary here, so I can remove it. I'm going to assume this isn't another shared-memory violation.
Hmm... xvinfo claims I have two adaptors, one named "NV Video Overlay" that supports a large number of attributes including "XV_AUTOPAINT_COLORKEY" but no RGB image formats, and another one named "NV Video Blitter" which doesn't mention "XV_AUTOPAINT_COLORKEY" but does mention an RGB image-format. Does that match your expectations?
BearOso wrote:I'm curious, are you using the nv or the nouveau X11 driver? I wasn't aware of XV support in either.
I'm using nv - nouveau isn't even available in Debian outside the 'experimental' repository (one step beyond the 'unstable' repository), and I don't think I want to install anything from there unless I'm actively working on fixing it. :/
BearOso wrote:*edit*
Changes are now available in release 40.
I've tried compiling release 40, and it worked well enough except that when I turned on XVideo, the X server started chewing up 100% CPU at such a low level that it wouldn't even respond to Ctrl-Alt-Backspace, and I was forced to reboot it (I ssh'd in from another machine to run top, where I saw Xorg at 100% CPU and snes9x-gtk at about 0%).

You seem to be pretty good at picking up bugs from general hints; does the above suggest anything? I'd rather not crash my machine repeatedly while trying to reproduce the problem if I don't have to - but if you *do* need more information, tell me and I'll see what I can do.

Fake edit:is this the sort of thing that the changes in Revision 41 might help with?
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

Screwtape wrote: Hmm... xvinfo claims I have two adaptors, one named "NV Video Overlay" that supports a large number of attributes including "XV_AUTOPAINT_COLORKEY" but no RGB image formats, and another one named "NV Video Blitter" which doesn't mention "XV_AUTOPAINT_COLORKEY" but does mention an RGB image-format. Does that match your expectations?
Exactly. Snes9x will choose the one with the RGB format to avoid the lossy YUY2 format. So in this case it will choose the blitter.
I've tried compiling release 40, and it worked well enough except that when I turned on XVideo, the X server started chewing up 100% CPU at such a low level that it wouldn't even respond to Ctrl-Alt-Backspace, and I was forced to reboot it (I ssh'd in from another machine to run top, where I saw Xorg at 100% CPU and snes9x-gtk at about 0%).

You seem to be pretty good at picking up bugs from general hints; does the above suggest anything? I'd rather not crash my machine repeatedly while trying to reproduce the problem if I don't have to - but if you *do* need more information, tell me and I'll see what I can do.

Fake edit:is this the sort of thing that the changes in Revision 41 might help with?
Revision 41 will only help a case where the overlay is used. The 100% CPU with Xv problem is common with numerous video cards and programs, so the cause is quite difficult to determine.

Can you try running

Code: Select all

$ xvattr -a XV_SYNC_TO_VBLANK -v 0
to see if disabling vsync alleviates the problem? If it does, then I can probably come up with a fix.

*edit* Also, if you haven't done so, make sure that your MTRR ranges for your video card are properly set. The nv driver doesn't do this on its own.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

BearOso wrote: The 100% CPU with Xv problem is common with numerous video cards and programs, so the cause is quite difficult to determine.
Oh. :(
BearOso wrote:Can you try running

Code: Select all

$ xvattr -a XV_SYNC_TO_VBLANK -v 0
to see if disabling vsync alleviates the problem? If it does, then I can probably come up with a fix.
It seems I can't:

Code: Select all

$ xvattr -a XV_SYNC_TO_VBLANK -v 0
Found Xv 2.2
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (XVideo)
  Minor opcode of failed request:  13 ()
  Serial number of failed request:  11
  Current serial number in output stream:  11
BearOso wrote:*edit* Also, if you haven't done so, make sure that your MTRR ranges for your video card are properly set. The nv driver doesn't do this on its own.
Apparently MTRRs only exist on Pentium Pros and above (for Intel) and K6-2s and above (for AMD), not on PowerPC, so I couldn't set them if I wanted to.

Doing a little more testing, I have noticed that when the problem occurs, my

Code: Select all

Xorg.0.log
file fills up with "

Code: Select all

mieqEnequeue: out-of-order valuator event; dropping.
". A quick google reveals that this happens sometimes to people running some recent X.org versions - regardless of video-card or Linux distribution.

Thanks for looking into it for me, anyway. :)
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

Screwtape wrote: It seems I can't:

Code: Select all

$ xvattr -a XV_SYNC_TO_VBLANK -v 0
Found Xv 2.2
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (XVideo)
  Minor opcode of failed request:  13 ()
  Serial number of failed request:  11
  Current serial number in output stream:  11
It seems xvattr is trying to set the attribute on the overlay adapter. Doh!
Apparently MTRRs only exist on Pentium Pros and above (for Intel) and K6-2s and above (for AMD), not on PowerPC, so I couldn't set them if I wanted to.
Yes, you're right. At that moment I had forgotten you were on ppc.
Doing a little more testing, I have noticed that when the problem occurs, my

Code: Select all

Xorg.0.log
file fills up with "

Code: Select all

mieqEnequeue: out-of-order valuator event; dropping.
". A quick google reveals that this happens sometimes to people running some recent X.org versions - regardless of video-card or Linux distribution.

Thanks for looking into it for me, anyway. :)
I'm glad the problem isn't on my end, because unfortunately I have little recourse to fix it. Nonetheless, I've posted a revision 42 with a fix to the issue I was thinking was the cause, and might somehow be related. I hope you manage to solve the problem on your end. :(
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

Ok, here is another request from me. Can you add support for Kega Fusion filters? It seems to be a nice format which is cross-emulator compatible. Kega, Regen and VBA-M currently has support for it, and adding new filters (As long as they're available in this format) to your emulator would be a matter of downloading a filter file and choosing it in Snes9x's settings.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

deniseweird wrote:Ok, here is another request from me. Can you add support for Kega Fusion filters? It seems to be a nice format which is cross-emulator compatible. Kega, Regen and VBA-M currently has support for it, and adding new filters (As long as they're available in this format) to your emulator would be a matter of downloading a filter file and choosing it in Snes9x's settings.
No chance. Look closer at what, exactly, these "filters" are, and you'll see why.
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

Hmm. When looking at the Eidolon's Inn forum I saw that there was one or two plugins that had a problem with Kega, and they were made with VBA-M in mind. That's what I can think of. You're probably right, but please clarify. So I learn something, hehe.
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

deniseweird wrote:Hmm. When looking at the Eidolon's Inn forum I saw that there was one or two plugins that had a problem with Kega, and they were made with VBA-M in mind. That's what I can think of. You're probably right, but please clarify. So I learn something, hehe.
They are renamed Windows DLL files--essentially complete libraries. Even the "official" ones I looked at are written mostly in x86 assembly with unwrapped MMX, making them extremely unportable.

*edit* As a side note, the main purpose for those plugins is obviously to allow more filters. I think this port has the important filters most people want, but if I'm missing any significant (non-gimmick) ones, don't be afraid to point them out.
deniseweird
Snes9x White Belt
Posts: 41
Joined: Wed Feb 20, 2008 9:38 am

Post by deniseweird »

Damn, I was so wrong :P I thought it was a nice idea since I thought they were actually quite portable, and would need less work for you to support, but it seems like it's the opposite! Well forget this request then.

Ok, I'll be sure to tell you. :D What filter(s) do you use when you play games btw?
terran
Snes9x White Belt
Posts: 3
Joined: Sat Jul 19, 2008 7:58 am

disable xscreensaver?

Post by terran »

Hey BearOSO

Awesome job with the frontend! Hopefully it'll get merged into mainline for snes9x. I know you expressed reservation about wanting to push your port on them, but this really is so much better than the standard X11 frontend and I think it should at least be merged in as a second target on the unix build if not the primary.

I had one request though...any chance that you could put in code to hint that xscreensaver shouldn't activate? It annoys me tha tI have to remember to disable my screensaver before starting games. :-/
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: disable xscreensaver?

Post by BearOso »

terran wrote: I had one request though...any chance that you could put in code to hint that xscreensaver shouldn't activate? It annoys me tha tI have to remember to disable my screensaver before starting games. :-/
Are you using a joystick or gamepad? If so, this should be fixed in the next release.
terran
Snes9x White Belt
Posts: 3
Joined: Sat Jul 19, 2008 7:58 am

Post by terran »

I'm using a SNES gamepad connected via USB with the standard modules whatever those are.

I'll check out the next release to see if it works. However, why is screen-saver disablement based on joystick usage? I would have expected something more similar to mplayer where you had an option like "--disable-xscreensaver". I'd have expected the code to be roughly the same...
User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Post by BearOso »

terran wrote:I'm using a SNES gamepad connected via USB with the standard modules whatever those are.

I'll check out the next release to see if it works. However, why is screen-saver disablement based on joystick usage? I would have expected something more similar to mplayer where you had an option like "--disable-xscreensaver". I'd have expected the code to be roughly the same...
The joysticks aren't connected to X, so when you use them they don't emit events telling the screensaver that you're still doing something. If you were using the keyboard, you wouldn't have the problem.

I don't think the situation is quite the same as mplayer, where you're not pressing anything. The SNES is interaction-based entertainment--you should be pressing buttons constantly.

*edit* The new version is up. This one should fix your problem.

*edit *edit** Another new version is up that just implements the feature you wanted without being done in a roundabout way. :-)
Post Reply