Ok, here’s a patch that adds support for SDL_WM_GrabInput (default
state is “ungrabbed”) and SDL_WM_IconifyWindow. Also has some other
tweaks such as taking additional steps to clean up when exiting
(bypassing certain bugs in some versions of Qtopia and/or OPIE) and it
also maps Key_F33 to Key_Return (this is the Zaurus ‘ok’ key).
I’m sorry to say that I only get segfaults with it I’ve tested it
with both scummvm and prboom. The Zaurus screen gets filled at 3/4
(which looks suspicious to me as well), and it segfaults just after. The
current SDL’s CVS works fine however.
Here are the gdb backtraces:
Scummvm:
(gdb) bt
#0 0x405f1810 in sigsuspend () from /lib/libc.so.6
#1 0x405f1800 in sigsuspend () from /lib/libc.so.6
#2 0x4050ca48 in pthread_create () from /lib/libpthread.so.0
#3 0x4050cadc in pthread_create () from /lib/libpthread.so.0
#4 0x40055f74 in SDL_SYS_CreateThread (thread=0x124980, args=0x10b308)
at SDL_systhread.c:99
#5 0x40055e24 in SDL_CreateThread (fn=0x40056f7c ,
data=0x1112b8) at SDL_thread.c:257
#6 0x4005701c in SDL_SYS_TimerInit () at SDL_systimer.c:282
#7 0x40056878 in SDL_TimerInit () at SDL_timer.c:90
#8 0x4002c0e4 in SDL_InitSubSystem (flags=49) at SDL.c:109
#9 0x4002c17c in SDL_Init (flags=49) at SDL.c:166
#10 0x0000a6c4 in OSystem_SDL_Common::create (gfx_mode=0,
full_screen=false) at backends/sdl/sdl-common.cpp:45
#11 0x0000a694 in OSystem_SDL_create (gfx_mode=-4, full_screen=8)
at backends/sdl/sdl-common.cpp:37
#12 0x00066690 in GameDetector::createSystem (this=0x40520dc0)
at common/gameDetector.cpp:631
#13 0x00066ee8 in SDL_main (argc=1, argv=0xbffffa84) at
common/main.cpp:180#14 0x00092b84 in main (argc=1, argv=0xbffffa84) at
SDL_Qtopia_main.cc:27#15 0x405de634 in __libc_start_main () from
/lib/libc.so.6
Prboom:
#0 0x40626810 in sigsuspend () from /lib/libc.so.6
#1 0x40626800 in sigsuspend () from /lib/libc.so.6
#2 0x40560a48 in pthread_create () from /lib/libpthread.so.0
#3 0x40560adc in pthread_create () from /lib/libpthread.so.0
#4 0x400a9f74 in SDL_SYS_CreateThread (thread=0xf16c8, args=0xe9878)
at SDL_systhread.c:99
#5 0x400a9e24 in SDL_CreateThread (fn=0x40080c60 <SDL_RunAudio>,
data=0xe55f8) at SDL_thread.c:257
#6 0x400813e0 in SDL_OpenAudio (desired=0xbfffd8d0,
obtained=0x40062fb4) at SDL_audio.c:488
#7 0x4002a4e0 in Mix_OpenAudio ()
from /opt/QtPalmtop/lib/libSDL_mixer-1.2.so.0
#8 0x00055354 in strcpy ()
strcpy?? Looks like some stack has been eaten there…
I’ve also tested with the test program testsprite:
#0 0x405a124c in memcpy () from /lib/libc.so.6
#1 0x405a1168 in memcpy () from /lib/libc.so.6
#2 0x4004dac0 in SDL_QWin::repaintRotation3 (this=0x2eac8,
rect=@0xbffff744) at SDL_QWin.cc:296
#3 0x4004dee4 in SDL_QWin::repaintRect (this=0x2eac8, rect=@0xbffff744)
at SDL_QWin.cc:349
#4 0x4004df88 in SDL_QWin::paintEvent (this=0x2eac8, ev=0xbffff734)
at SDL_QWin.cc:366
#5 0x403e48c4 in QWidget::event () from /opt/QtPalmtop/lib/libqte.so.2
#6 0xbffff8f8 in ?? ()
Weird - it seems to crash at a completely different place of the lib.
Additional info: running testsprite with height and width at 100
success. Height at 300 and width at 200 too. Height at 320 and width at
240 fails, as well as height at 200 and width at 300.
I’m running OZ 3.1rc1 - please tell if I can help any further, or if you
want me to check with some program.
See you,
Alex.–
http://www.gnurou.org