Skip to content

Commit

Permalink
Date: Sat, 24 Apr 2004 15:13:32 +0300
Browse files Browse the repository at this point in the history
From: "Mike Gorchak"
Subject: SDL updates for the QNX6

1. Updated the README.QNX
2. Updated libtool scripts, which are shipped with SDL for QNX6 support.
3. Added some code to support the new QNX 6.3.0, which is in beta now.
4. Added code to detect the hw features, which driver supports.
5. Added hw alpha blits code.
6. Fixed bug when application switches to fullscreen more the 2 times. (afte\
r that window becames always stay on top).
7. Updated a bit README for the tests.
8. Added information about acceleration show in the testalpha.c test.
9. Added small fixes to the testoverlay2.c test.
10. Added alpha and cc+alpha blits benchmarks to the testvidinfo.c test.
  • Loading branch information
slouken committed May 6, 2004
1 parent a3ed564 commit 246cb99
Show file tree
Hide file tree
Showing 13 changed files with 334 additions and 78 deletions.
64 changes: 35 additions & 29 deletions README.QNX
@@ -1,5 +1,5 @@
README by Mike Gorchak <mike@malva.ua>, <lestat@i.com.ua>
Last changed at 14 Feb 2004.
README.QNX by Mike Gorchak <mike@malva.ua>, <lestat@i.com.ua>
Last changed at 24 Apr 2004.

======================================================================
Table of Contents:
Expand All @@ -19,8 +19,8 @@ Table of Contents:
heavily tested yet.
If you have QNX RtP version 6.1.0 or above you must download the
Photon3D runtime from http://developers.qnx.com or install it from the
public repository or the public CD, available with QNX. OS versions
below 6.1.0 are not supported.
public repository or from the public CD, available with QNX. OS versi-
ons below 6.1.0 are not supported.
When creating an OpenGL context, software renderer mode is artifi-
cially selected (QSSL made acceleration only for Voodoo boards in
fullscreen mode, sorry but I don't have this board to test OpenGL -
Expand All @@ -36,22 +36,23 @@ PHOGL_ATTRIB_FORCE_HW or PHOGL_ATTRIB_FAVOR_HW.
======================================================================
2. Wheel and multi-button mouses:

Photon emits keyboard events (key up and down) when the mouse
Photon emits keyboard events (key up and down) when the mouse
wheel is moved. The key_scan field appears valid, and it contains zero.
That is a basic method of detecting mouse wheel events under Photon.
It looks like a hack, but it works for me :) on various PC configura-
It looks like a hack, but it works for me :) on various PC configura-
tions.

I've tested it on:

1. Genius Optical NetScroll/+ (1 wheel)
2. A4Tech Optical GreatEye WheelMouse, model: WOP-35. (2 wheels + 2
additional buttons). The wheel for vertical scrolling works as usu-
al, but the second wheel for horizontal scrolling emits two sequen-
tial events up or down, so it can provide faster scrolling than the
first wheel. Additional buttons don't emit any events, but it looks
like they're handled by photon in an unusual way - like click to
front, but works not with any window, looks like bug-o-feature :).
1. Genius Optical NetScroll/+ PS/2 (1 wheel)
2. A4Tech Optical GreatEye WheelMouse PS/2, model: WOP-35. (2 wheels
+ 2 additional buttons). The wheel for vertical scrolling works as
usual, but the second wheel for horizontal scrolling emits two se-
quential events up or down, so it can provide faster scrolling than
the first wheel. Additional buttons don't emit any events, but it
looks like they're handled by photon in an unusual way - like click
to front, but works not with any window, looks like a fun bug-o-fe-
ature :).

======================================================================
3. CDROM handling issues:
Expand Down Expand Up @@ -89,10 +90,12 @@ script you must manually delete the libtool.m4 stuff from the acinclu-
de.m4 file (it comes after the ESD detection code up to the end of the
file), because the libtool stuff in the acinclude.m4 file was very old
in SDL distribution before the version 1.2.7 and doesn't knew anything
about QNX. SDL 1.2.7 distribution contain the new libtool.m4 script,
about QNX. SDL 1.2.7 distribution contains the new libtool.m4 script,
but anyway it is broken :), Just remove it, then run "libtoolize
--force --copy", delete the file aclocal.m4 and after that run the
autogen.sh script.
--force --copy", delete the file aclocal.m4 if it is exists and after
that run the autogen.sh script. SDL 1.2.8 contains fixed libtool.m4,
ltmain.sh and config.sub files, so you can just run the autogen.sh
script.

======================================================================
6. Some building issues:
Expand All @@ -105,16 +108,19 @@ script will be broken.
Run the configure script without x11 support, e.g.:

a) for OpenGL support:
./configure --prefix=/usr \
--disable-video-x11 \
./configure --prefix=/usr \
--disable-video-x11 \
--disable-shared

b) without OpenGL support:
./configure --prefix=/usr \
--disable-video-x11 \
--disable-shared \
./configure --prefix=/usr \
--disable-video-x11 \
--disable-shared \
--disable-video-opengl

And of course dont forget to specify --disable-debug, which is on
by default, to disable debug and enable the expensive optimizations.

In the test directory also run the ./configure script without
x11 support, e.g.:

Expand All @@ -128,10 +134,10 @@ x11 support, e.g.:
Please note that the photon driver is sensible to the following
environmental variables:

* SDL_PHOTON_FULLSCREEN_REFRESH - this environment variable controls
the refresh rate in all fullscreen modes. Be carefull !!! Photon drivers
usually do not checking the maximum refresh rate, which video adapter or
monitor supports.
* SDL_PHOTON_FULLSCREEN_REFRESH - this environment variable controls
the refresh rate in all fullscreen modes. Be carefull !!! Photon
drivers usually do not checking the maximum refresh rate, which video
adapter or monitor supports.

* SDL_VIDEO_WINDOW_POS - can be set in the "X,Y" format. If X and Y
coordinates are bigger than the current desktop resolution, then win-
Expand All @@ -144,6 +150,6 @@ environmental variable.
* SDL_VIDEO_CENTERED - if this environmental variable exists then the
window centering is perfomed in the current virtual console.

The SDL_VIDEO_CENTERED enviromental variable has greater priority
than the SDL_VIDEO_WINDOW_POS in case if both variables are supplied
to the application.
Notes: The SDL_VIDEO_CENTERED enviromental variable has greater pri-
ority than the SDL_VIDEO_WINDOW_POS in case if both variables are sup-
plied to the application.
39 changes: 30 additions & 9 deletions acinclude.m4
Expand Up @@ -1652,14 +1652,16 @@ newsos6)
shlibpath_overrides_runpath=yes
;;
nto-qnx)
version_type=linux
*qnx* | *nto*)
version_type=qnx
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
openbsd*)
Expand Down Expand Up @@ -2356,6 +2358,10 @@ irix5* | irix6* | nonstopux*)
lt_cv_deplibs_check_method=pass_all
;;
*qnx* | *nto*)
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux*)
case $host_cpu in
Expand All @@ -2382,10 +2388,6 @@ newos6*)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
nto-qnx)
lt_cv_deplibs_check_method=unknown
;;
openbsd*)
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Expand Down Expand Up @@ -3614,6 +3616,8 @@ case $host_os in
# FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
*qnx* | *nto*)
;;
*)
# FIXME: insert proper C++ library support
_LT_AC_TAGVAR(ld_shlibs, $1)=no
Expand Down Expand Up @@ -4729,6 +4733,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise it will coredumped.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
;;
*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
Expand Down Expand Up @@ -4768,6 +4776,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
freebsd*)
# FreeBSD uses GNU C++
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise it will coredumped.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
;;
hpux9* | hpux10* | hpux11*)
case $cc_basename in
CC)
Expand Down Expand Up @@ -4988,6 +5000,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
;;
esac
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise it will coredumped.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
;;
*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Expand Down Expand Up @@ -5028,6 +5044,11 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise it will coredumped.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
;;
irix5* | irix6* | nonstopux*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
# PIC (with -KPIC) is the default.
Expand Down
4 changes: 1 addition & 3 deletions config.sub
Expand Up @@ -1140,10 +1140,8 @@ case $os in
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
os=-nto-qnx
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
Expand Down
9 changes: 9 additions & 0 deletions configure.in
Expand Up @@ -528,6 +528,14 @@ CheckNASM()
SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
use_nasm=yes

case "$target" in
# this line is needed for QNX, because it's not defined the __ELF__
*-*-qnx*) CFLAGS="$CFLAGS -D__ELF__"
;;

esac

fi
fi
}
Expand Down Expand Up @@ -2309,6 +2317,7 @@ case "$target" in
ARCH=qnx
CheckDummyVideo
CheckDiskAudio
# CheckNASM
CheckDLOPEN
CheckNAS
CheckPHOTON
Expand Down
6 changes: 6 additions & 0 deletions ltmain.sh
Expand Up @@ -2975,6 +2975,12 @@ EOF
versuffix=".$current";
;;

qnx)
major=".$current"
versuffix=".$current"
deplibs_check_method="pass_all"
;;

irix | nonstopux)
major=`expr $current - $age + 1`

Expand Down
9 changes: 8 additions & 1 deletion src/video/photon/SDL_ph_events.c
Expand Up @@ -32,6 +32,7 @@ static char rcsid =
#include <stdio.h>
#include <setjmp.h>
#include <sys/time.h>
#include <sys/neutrino.h>

#include <Ph.h>
#include <photon/PkKeyDef.h>
Expand Down Expand Up @@ -235,7 +236,13 @@ static int ph_DispatchEvent(_THIS)
/* request to resize */
else if (winEvent->event_f==Ph_WM_RESIZE)
{
SDL_PrivateResize(winEvent->size.w+1, winEvent->size.h+1);
currently_maximized=0;
#if (_NTO_VERSION < 630)
SDL_PrivateResize(winEvent->size.w+1, winEvent->size.h+1);
#else
/* QNX 6.3.0 have this bug fixed */
SDL_PrivateResize(winEvent->size.w, winEvent->size.h);
#endif /* _NTO_VERSION */
}
/* request to move */
else if (winEvent->event_f==Ph_WM_MOVE)
Expand Down

0 comments on commit 246cb99

Please sign in to comment.