BUGS
author Sam Lantinga <slouken@libsdl.org>
Mon, 02 Jun 2003 14:50:22 +0000
changeset 632 85e104fe14c2
parent 571 8e3ce997621c
child 663 8bedd6d61642
permissions -rw-r--r--
Date: Sun, 1 Jun 2003 15:38:45 -0700 (PDT)
From: Jeff Brown <jabrown@caida.org>
Subject: [patch] SDL-1.2.5 + FreeBSD joystick axes, hat fixes

Hello again! When I sent in some SDL fixes last December, I found out
they'd already been fixed in the CVS version. This time, I checked the
repository before bugging you. =)

I'm using SDL-1.2.5 on a FreeBSD 4.6.2-RELEASE system, and in the course
of getting my multi-analog-axis USB controller (with a hat switch!)
working with d2x-sdl -- the SDL port of the Descent 2 engine -- I came
across a few problems:

1) The second analog stick is reported as a slider in one direction, and
"Rz" in the other. SDL was ignoring the Rz axis, so I added Rx/Ry/Rz to
the set of things SDL considers to be axes.

2) After the above change, the set of JOYAXE_* axes for my gamepad was
{0,1,3,7}; however, d2x-sdl expects the axes to be contiguously numbered
from 0, which seems like a pretty reasonable expectation, rather than
having to scan the entire space of axes that SDL may or may not have.
So, I added a table lookup which maps the JOYAXE_* axis numbers to 0,1,...
in the order they're detected by SDL_SYS_JoystickOpen(), when reporting
them to the application. I also added a function "usage_to_joyaxe()"
which maps the USB HUG_* usage values to JOYAXE_values, since the repeated
case statements testing for HUG_* were getting out of hand.

3) The BSD joystick driver had no hat support, so I added it. It looks
like our USB library can only support one hat switch per device, which
makes life easy.

The patch against SDL-1.2.5 which implements these changes is at:

http://www.caida.org/~jabrown/patches/sdl-1.2.5-bsdhat.diff

After applying, SDL's "testjoystick" reports all activity from my gamepad
correctly, and d2x works too (though it needed some other fixes).

Moving on...

There is also a problem with slightly different USBHID library interfaces
on different versions of FreeBSD. I wasn't going to mention this since the
FreeBSD port for SDL-1.2.5 (and not SDL itself) was doing the FreeBSD
version-specific patching, so I e-mailed the port maintainer with this
change. However, I see that you've incorporated the FreeBSD
version-checking stuff into the CVS version of SDL, so now it's relevant
for you too.

The problem is, the FreeBSD #if tests don't work right for FreeBSD
4.6.2-RELEASE. There may be other versions with this problem, but I've
only tested 4.6.2-R. The following patch against your latest CVS version
fixes this:

--- SDL_sysjoystick.c-1.16 Tue Apr 15 09:02:08 2003
+++ SDL_sysjoystick.c Sun Jun 1 15:10:28 2003
@@ -420,6 +420,8 @@
# else
len = hid_report_size(rd, repinfo[repind].kind, r->rid);
# endif
+# elif (__FreeBSD_version == 460002)
+ len = hid_report_size(rd, r->rid, repinfo[repind].kind);
# else
len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
#endif


I hope this is all useful to you. I've been getting myself dizzy playing
Descent 2 with it, all morning!

-Jeff Brown


P.S. My USB controller is a Thrustmaster Firestorm Dual Analog 2. That's
probably irrelevant, but I threw it in for completeness.
slouken@0
     1
slouken@0
     2
All:
slouken@0
     3
	Audio rate conversion is only implemented by multiplying or dividing
slouken@0
     4
	by a power of two.  This is a side-effect of the requirement that the
slouken@0
     5
	raw audio buffer size be a power of two, and can hopefully be fixed.
slouken@0
     6
	This means 8 KHz audio converted to 22 KHz ends up being 16 KHz. :-/
slouken@0
     7
slouken@0
     8
	When the implementation is writing directly to video memory the mouse
slouken@0
     9
	cursor doesn't work properly.  Applications which do this should use
slouken@0
    10
	their own mouse cursor and call SDL_ShowCursor(0) to hide the system
slouken@0
    11
	cursor.
slouken@0
    12
slouken@0
    13
Linux:
slouken@0
    14
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
    15
	It requires handling of keyboard mapping events and using the XIM
slouken@0
    16
	input translation extension.  I will implement it as requested.
slouken@0
    17
	Latin-1 keyboard input works fine.
slouken@0
    18
slouken@27
    19
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
    20
slouken@0
    21
	The AAlib, GGI, and SVGAlib video drivers are not heavily tested.
slouken@0
    22
slouken@0
    23
Win32:
slouken@0
    24
	The MCI driver can't tell if the CD-ROM drive is paused or stopped.
slouken@0
    25
slouken@0
    26
	The SDL_INIT_EVENTTHREAD flag is not supported on Win32
slouken@0
    27
	(Idea: create a separate DirectInput polling thread)
slouken@0
    28
	The main purpose of this flag is for smooth cursor motion in
slouken@0
    29
	fullscreen environments.
slouken@0
    30
slouken@0
    31
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
    32
	This requires the ToUnicode() API which is only implemented on
slouken@0
    33
	Windows NT/2000, not on Windows 95/98.
slouken@0
    34
	Latin-1 keyboard input works fine.
slouken@0
    35
slouken@0
    36
	Joysticks are only supported under the Win32 MultiMedia API,
slouken@0
    37
	DirectInput support is not yet implemented.
slouken@0
    38
slouken@0
    39
BeOS:
slouken@0
    40
	BePPC is not supported, apparently not even by Be Inc.
slouken@0
    41
slouken@0
    42
	SDL_WM_GrabInput() is not implemented.
slouken@0
    43
	Does anyone know how to do this?  SDL_WM_GrabInput() is designed
slouken@0
    44
	to prevent the user from switching input and mouse focus away from
slouken@0
    45
	the SDL application.
slouken@0
    46
slouken@0
    47
	Continuous relative mouse motion is not implemented.
slouken@0
    48
slouken@0
    49
	Wide UNICODE character input (Kanji, etc.) has not been tested.
slouken@0
    50
	Latin-1 keyboard input works fine.
slouken@0
    51
slouken@0
    52
MacOS:
slouken@0
    53
	Palette handling isn't implemented in windowed mode yet.
slouken@0
    54
slouken@0
    55
	Audio hasn't been extensively tested, in particular the locking
slouken@0
    56
	isn't implemented and mixer routines may not call malloc() or free()
slouken@0
    57
	because they are called at interrupt time.
slouken@0
    58
slouken@0
    59
	SDL_WM_GrabInput() is not implemented.
slouken@0
    60
	Does anyone know how to do this?  SDL_WM_GrabInput() is designed
slouken@0
    61
	to prevent the user from switching input and mouse focus away from
slouken@0
    62
	the SDL application.
slouken@0
    63
slouken@0
    64
	Continuous relative mouse motion is not implemented.
slouken@0
    65
slouken@0
    66
	SDL_AddTimer() and SDL_RemoveTimer() haven't been implemented yet.
slouken@0
    67
slouken@0
    68
	Not all of the keys are properly recognized on the keyboard.
slouken@0
    69
slouken@0
    70
MacOS X:
slouken@172
    71
	CD-ROM functions are not implemented yet.
slouken@0
    72
slouken@172
    73
	Joystick code is not extensively tested yet.
slouken@58
    74
slouken@58
    75
	Resizeable windows aren't implemented yet.
slouken@58
    76
slouken@47
    77
	Depth switching for windowed mode isn't implemented yet.
slouken@47
    78
	
slouken@0
    79
	Palette handling isn't implemented in windowed mode yet.
slouken@47
    80
	
slouken@390
    81
	Command-line arguments dialog is not implemented yet.
slouken@0
    82
slouken@47
    83
	Fullscreen drawing has some artifacts.
slouken@47
    84
	
slouken@47
    85
	Fullscreen OpenGL for the software renderer is broken.
slouken@0
    86
slouken@47
    87
	Some OpenGL parameters are not accounted for, for example color bits customization.
slouken@47
    88
	
slouken@47
    89
	Continuous mouse motion perhaps is not as smooth as it should be.
slouken@0
    90
slouken@47
    91
	SDL_WM_GrabInput() is implemented, but it "freezes" the hardware
slouken@47
    92
	cursor in the center of the window/screen.  Also, mouse moved events
slouken@47
    93
	are not generated, and the keyboard cannot be grabbed.
slouken@0
    94
slouken@0
    95
	MacOS X seems to have a broken pthread_cancel() implementation.
slouken@0
    96
slouken@0
    97
FreeBSD:
slouken@0
    98
	pthread_cancel() isn't supported by FreeBSD 3.X, so threads don't
slouken@0
    99
	work on versions of FreeBSD earlier than 4.0.
slouken@0
   100
slouken@0
   101
	The CD-ROM handling doesn't work completely.
slouken@0
   102
slouken@0
   103
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
   104
	It requires handling of keyboard mapping events and using the XIM
slouken@0
   105
	input translation extension.  I will implement it as requested.
slouken@0
   106
	Latin-1 keyboard input works fine.
slouken@0
   107
slouken@27
   108
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
   109
slouken@0
   110
Solaris:
slouken@0
   111
	The joystick functions are not implemented yet.
slouken@0
   112
slouken@0
   113
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
   114
	It requires handling of keyboard mapping events and using the XIM
slouken@0
   115
	input translation extension.  I will implement it as requested.
slouken@0
   116
	Latin-1 keyboard input works fine.
slouken@0
   117
slouken@27
   118
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
   119
slouken@0
   120
IRIX:
slouken@0
   121
	The CD-ROM handling doesn't work completely.
slouken@0
   122
slouken@0
   123
	The joystick functions are not implemented yet.
slouken@0
   124
slouken@0
   125
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
   126
	It requires handling of keyboard mapping events and using the XIM
slouken@0
   127
	input translation extension.  I will implement it as requested.
slouken@0
   128
	Latin-1 keyboard input works fine.
slouken@0
   129
slouken@27
   130
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
   131
slouken@250
   132
EPOC:
slouken@250
   133
    Only Crystal version of Epoc/SymbianOS is currently supported.
slouken@250
   134
slouken@250
   135
    SDL is implemented in static library only. SDL uses static/global
slouken@250
   136
    variables and that is not allowed in EPOC dll libraries.
slouken@250
   137
slouken@250
   138
    Sound is not yet supported.
slouken@250
   139
slouken@250
   140
    Joystick, OpenGL and cdrom is not supported (think about cdrom in a cell phone:-).
slouken@250
   141
    
slouken@250
   142
    No console output screen. Printing to stdout do not have any effect.
slouken@250
   143
slouken@0
   144
OpenBSD:  -= NOT YET SUPPORTED =-
slouken@0
   145
	This is reported to work, but I haven't verified this.
slouken@0
   146
slouken@0
   147
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
   148
	It requires handling of keyboard mapping events and using the XIM
slouken@0
   149
	input translation extension.  I will implement it as requested.
slouken@0
   150
	Latin-1 keyboard input works fine.
slouken@0
   151
slouken@27
   152
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
   153
slouken@0
   154
OSF/Tru64:  -= NOT YET SUPPORTED =-
slouken@0
   155
	The audio functions are not implemented yet.
slouken@0
   156
slouken@0
   157
	Joysticks and CD-ROM functions are not implemented yet.
slouken@0
   158
slouken@0
   159
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
   160
	It requires handling of keyboard mapping events and using the XIM
slouken@0
   161
	input translation extension.  I will implement it as requested.
slouken@0
   162
	Latin-1 keyboard input works fine.
slouken@0
   163
slouken@27
   164
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
   165
slouken@0
   166
AIX:  -= NOT YET SUPPORTED =-
slouken@0
   167
	This port has only been tested with AIX 4.3.3
slouken@0
   168
slouken@0
   169
	The OpenGL support doesn't work yet.
slouken@0
   170
slouken@0
   171
	The joystick subsystem isn't implemented yet.
slouken@0
   172
slouken@0
   173
	Endian detection doesn't work yet - needs a unique CPP symbol.
slouken@0
   174
slouken@0
   175
	Wide UNICODE character input (Kanji, etc.) is not yet supported.
slouken@0
   176
	It requires handling of keyboard mapping events and using the XIM
slouken@0
   177
	input translation extension.  I will implement it as requested.
slouken@0
   178
	Latin-1 keyboard input works fine.
slouken@0
   179
slouken@27
   180
	The keyboard modifiers are not set to the correct state on startup.
slouken@27
   181
slouken@0
   182
	The AIX port was done by Carsten.Griwodz@KOM.tu-darmstadt.de
slouken@0
   183
	More information on this port is available at:
slouken@0
   184
	http://www.kom.e-technik.tu-darmstadt.de/~griff/SDL/
slouken@0
   185
slouken@0
   186
QNX:  -= NOT YET SUPPORTED =-
slouken@0
   187
	Only static libraries are being made, no shared ones.
slouken@0
   188
 
slouken@0
   189
	The only hardware surface is the primary view surface.
slouken@0
   190
 
slouken@0
   191
	Fullscreen doesn't display correctly.
slouken@0
   192
 
slouken@0
   193
AmigaOS:  -= NOT YET SUPPORTED =-
slouken@0
   194
	The OpenGL support isn't implemented yet.
slouken@0
   195
slouken@0
   196
	SDL_WM_GrabInput() is not implemented.
slouken@0
   197
	Does anyone know how to do this?  SDL_WM_GrabInput() is designed
slouken@0
   198
	to prevent the user from switching input and mouse focus away from
slouken@0
   199
	the SDL application.
slouken@0
   200
slouken@0
   201
	Continuous relative mouse motion is not implemented.
slouken@0
   202
slouken@0
   203
	The AmigaOS port was done by Gabriele.Greco@galactica.it
slouken@250
   204