[AD] BeOS joystick, Gnome Panel

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello all, I was fairly involved in the Allegro community some years
ago, but lost interest when I moved to Linux (it wasn't ported yet at
that point).

I tried the BeOS port yesterday, since I love BeOS and actively look for
excuses to use it. I was thrilled with how well-done the port is! I was
amazed to watch exaccel -- on my modest PII-300 with a modest ATI Rage
Pro, I had to increase the number of images to 40 to get ANY slowdown
at all!

The only problem I ran into immediately is that Allegro can't seem to
properly detect if a joystick is present. If no joystick is present and
the program tries to read its state, Allegro reports that it is pointed
all the way down and to the right. This causes joy-enabled programs to
be unplayable (and this is the behavior I get from exjoy, so it's not a
programming error).

I'm almost certain that this is not a bug in Allegro; I wrote a quick
test program making direct calls to the BeOS API and sure enough, it
reports that a joystick is present, even though there is none (I have a
Sound Blaster Live with a game port on it, but nothing is plugged into
it). Specifically, BJoystick::CountSticks() returns 1 even though no
joystick is plugged in:

$ cat test.cpp
#include <DeviceKit.h>
#include <SupportKit.h>
#include <iostream>

using namespace std;

int main() {
        BJoystick joy;
        char string[1000];
        cout << "CountDevices(): " << joy.CountDevices() << endl;
        cout << "GetDeviceName(): " << joy.GetDeviceName(0, string) << "
(B_OK: " << B_OK << ")\n";
        cout << "The Device Name: " << string << endl;
        cout << "Open(): " << joy.Open(string) << endl;
        cout << "CountSticks(): " << joy.CountSticks() << endl;
        return 0;
}
$ g++ -o test test.cpp -ldevice
$ ./test
CountDevices(): 2
GetDeviceName(): 0 (B_OK: 0)
The Device Name: gameport/201
Open(): 3
CountSticks(): 1
$

I'm not sure why Open() returns 3 -- the API docs say that functions
should return 0 on no error, or a negative number corresponding to an
error code, so I'm not sure how to interpret "3" -- in any case,
CountSticks() is documented to return "the number of joysticks connected
to the opened game port."

I checked the Joystick Preferences for BeOS, and the ports were enabled,
but it seemed to be aware that nothing was plugged into them; it
wouldn't let me try to calibrate a joystick. I then tried disabling the
game ports completely, and that fixed it -- exjoy and others would then
correctly detect that there was no joystick present.

Even though this bug is not in Allegro, is there any way to work around
the apparent bug in BeOS? I would consider it a rather debilitating
behavior, since any joy-enabled games will be unplayable to a person
without a joystick. If not, should the required configuration change in
the BeOS joystick preferences be documented?

I'm running BeOS R5 Personal Edition installed onto its own partition,
stock dev-tools. I can't think of anything irregular about my setup,
I've hardly touched it. Allegro version is 3.9.34.

One other issue: on Debian Linux (unstable) using XFree 4 and Gnome, any
program using Allegro will, upon exiting,  cause the Gnome tasklist to
crash, with the message: "Tasklist applet appears to have died
unexpectedly. Reload this applet?" No matter how many of them are
running, it kills them all. Can anyone think of anything particularly
dastardly that Allegro does atexit() that would cause this?

My apologies if either of these have been covered before, but this
particular mailing list doesn't seem to be archived on canvaslink.com
like agp and allegro are...

Joshua

P.S. Where is Shawn? When I read these mailing lists in the past, he was
very involved in the discussion, now he seems conspicuously absent. Has
he resigned or taken a break from any major development on Allegro?

-- 
Joshua Haberman                                        <joshua@xxxxxxxxxx>
University of Puget Sound                                <joshua@xxxxxxxxxx>
http://www.reverberate.org                               <jhaberman@xxxxxxxxxx>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/