README.QNX
author Sam Lantinga <slouken@libsdl.org>
Wed, 10 Dec 2003 12:35:56 +0000
changeset 753 b14fdadd8311
parent 718 cbc0f7fabd1c
child 821 30168104389f
permissions -rw-r--r--
Date: Thu, 4 Dec 2003 07:48:40 +0200
From: "Mike Gorchak"
Subject: SDL/QNX6 new patch

Here in attachment my patch for the SDL/QNX6 again :) It contain non-crtitical/cosmetic fixes:

1. Fixed window centering at other than the first consoles.
2. Fixed window centering algorithm in case when window height or width are greater than the desktop resolution.
3. Fixed window positioning on other than the first consoles.
4. Fixed occasional input focus lost when switching to fullscreen.
5. Removed the Photon's default chroma color for the overlays, added RGB(12, 6, 12) color instead (very dark pink).
6. Added more checks to the YUV overlay code (fixed crashes during resolution mode switches).
7. Added support for Enter/Backspace keys in unicode mode (used by Maelstrom and by other games).
8. Fixed window restore/maximize function. It works, finally.
slouken@380
     1
README by Mike Gorchak <mike@malva.ua>, <lestat@i.com.ua>
slouken@753
     2
Last changed at 30 Sep 2003.
slouken@753
     3
slouken@753
     4
======================================================================
slouken@753
     5
Table of Contents:
slouken@753
     6
slouken@753
     7
1. OpenGL.
slouken@753
     8
2. Wheel and multi-button mouses.
slouken@753
     9
3. CDROM handling issues.
slouken@753
    10
4. Hardware video overlays.
slouken@753
    11
5. Shared library building.
slouken@753
    12
6. Some building issues.
slouken@753
    13
7. Environment variables.
slouken@663
    14
slouken@692
    15
======================================================================
slouken@663
    16
OpenGL:
slouken@266
    17
slouken@692
    18
    OpenGL works well and is stable, but fullscreen mode has not  been
slouken@692
    19
heavily tested yet.
slouken@692
    20
    If you have QNX RtP version 6.1.0 or above you must  download  the
slouken@692
    21
Photon3D runtime from http://developers.qnx.com or install it from the
slouken@692
    22
public repository or the  public CD, available  with  QNX. OS versions
slouken@692
    23
below 6.1.0 are not supported.
slouken@692
    24
    When creating an OpenGL context, software renderer mode is artifi-
slouken@692
    25
cially selected (QSSL made acceleration  only  for  Voodoo  boards  in
slouken@692
    26
fullscreen mode, sorry but I don't have this board  to  test  OpenGL -
slouken@692
    27
maybe it works or maybe not :)). If you  want  acceleration - you  can
slouken@753
    28
remove one line in the source code: find the  file SDL_ph_image.c  and
slouken@692
    29
remove the following
slouken@279
    30
slouken@663
    31
    OGLAttrib[OGLargc++]=PHOGL_ATTRIB_FORCE_SW;
slouken@663
    32
     
slouken@692
    33
line in the ph_SetupOpenGLContext() function or change the argument to
slouken@692
    34
PHOGL_ATTRIB_FORCE_HW or PHOGL_ATTRIB_FAVOR_HW.
slouken@266
    35
slouken@692
    36
======================================================================
slouken@692
    37
Wheel and multi-button mouses:
slouken@663
    38
slouken@692
    39
    Photon emits  keyboard  events (key up and down)  when  the  mouse
slouken@692
    40
wheel is moved. The key_scan field appears valid, and it contains zero.
slouken@692
    41
That is a basic method of detecting  mouse  wheel events under Photon.
slouken@692
    42
It looks like a hack, but it works for me :) on various PC  configura-
slouken@692
    43
tions.
slouken@663
    44
slouken@692
    45
I've tested it on:
slouken@663
    46
slouken@663
    47
1. Genius Optical NetScroll/+ (1 wheel)
slouken@692
    48
2. A4Tech Optical  GreatEye  WheelMouse,  model: WOP-35. (2 wheels + 2
slouken@692
    49
   additional buttons). The wheel for vertical scrolling works as usu-
slouken@692
    50
   al, but the second wheel for horizontal scrolling emits two sequen-
slouken@692
    51
   tial events up or down, so it can provide faster scrolling than the
slouken@692
    52
   first wheel. Additional buttons don't emit any events, but it looks
slouken@692
    53
   like they're handled by photon in an unusual  way - like  click  to
slouken@692
    54
   front, but works not with any window, looks like bug-o-feature :).
slouken@663
    55
slouken@692
    56
======================================================================
slouken@663
    57
CDROM handling issues:
slouken@663
    58
slouken@692
    59
    Access to CDROM can only be  provided  with  'root'  privileges. I
slouken@692
    60
can't do anything about that, /dev/cd0 has brw------- permissions  and
slouken@692
    61
root:root rights.
slouken@663
    62
slouken@692
    63
======================================================================
slouken@753
    64
Hardware video overlays:
slouken@663
    65
slouken@692
    66
    Overlays can flicker  during  window  movement,  resizing, etc. It
slouken@692
    67
happens because the photon driver updates the real window contents be-
slouken@692
    68
hind the overlay, then draws the temporary chroma key color  over  the
slouken@692
    69
window contents. It can be done without using the chroma key but  that
slouken@692
    70
causes the overlay to always be on top. So  flickering  during  window
slouken@692
    71
movement is preferred instead.
slouken@692
    72
    Double buffering code is temporarily disabled in the photon driver
slouken@692
    73
code, because on my GF2-MX it can accidentally cause a buffer  switch,
slouken@692
    74
which causes the old frame to show. S3 Savage4 has the  same  problem,
slouken@692
    75
but ATI Rage 128 doesn't. I think it can be fixed later. Current  code
slouken@692
    76
works very well, so maybe double buffering is not needed right now.
slouken@692
    77
    Something strange happens when you try to move the window with the
slouken@692
    78
overlay beyond the left border  of the screen. The  overlay  tries  to
slouken@692
    79
stay at position x=0, but when attempting to move it  a  bit  more  it
slouken@692
    80
jumps to position x=-60 (on GF2-MX, on ATI Rage128 this  value  a  bit
slouken@692
    81
smaller). It's really strange, looks  like  the  overlay  doesn't like
slouken@692
    82
negative coordinates.
slouken@663
    83
slouken@692
    84
=======================================================================
slouken@663
    85
Shared library building:
slouken@663
    86
slouken@692
    87
    A shared library can be built, but before running  the  autogen.sh
slouken@692
    88
script you must manually delete the libtool.m4 stuff from the acinclu-
slouken@692
    89
de.m4 file (it comes after the ESD detection code up to the end of the
slouken@692
    90
file), because the libtool stuff in the acinclude.m4 file is very  old
slouken@753
    91
in SDL distribution before the version 1.2.7 and doesn't know anything
slouken@753
    92
about QNX. SDL 1.2.7 distribution contain  the  new libtool.m4 script,
slouken@753
    93
but anyway  it  is  broken :), Just  remove  it, then  run "libtoolize
slouken@753
    94
--force --copy",  delete the file aclocal.m4 and after  that  run  the
slouken@753
    95
autogen.sh script.
slouken@663
    96
slouken@692
    97
======================================================================
slouken@266
    98
Some building issues:
slouken@266
    99
slouken@692
   100
    Feel free to not use the --disable-shared configure option if you'
slouken@692
   101
ve read the above comment about 'Shared  library  building'. Otherwise
slouken@692
   102
this  option  is  strongly  recommended, as  without it the sdl-config
slouken@692
   103
script will be broken.
slouken@663
   104
slouken@692
   105
    Run the configure script without x11 support, e.g.:
slouken@266
   106
slouken@279
   107
    a) for OpenGL support:
slouken@692
   108
    ./configure --prefix=/usr       \
slouken@279
   109
                --disable-video-x11 \
slouken@279
   110
                --disable-shared
slouken@279
   111
slouken@291
   112
    b) without OpenGL support:
slouken@692
   113
    ./configure --prefix=/usr       \
slouken@279
   114
                --disable-video-x11 \
slouken@279
   115
                --disable-shared    \
slouken@279
   116
                --disable-video-opengl
slouken@266
   117
slouken@692
   118
    In the test directory also run the ./configure script without
slouken@692
   119
x11 support, e.g.:
slouken@266
   120
slouken@692
   121
    ./configure  --with-sdl-prefix=/usr            \
slouken@692
   122
                 --with-sdl-exec-prefix=/usr       \
slouken@692
   123
                 --prefix=/usr --without-x
slouken@753
   124
slouken@753
   125
======================================================================
slouken@753
   126
Environment variables:
slouken@753
   127
slouken@753
   128
    Please note that the photon driver  is  sensible to the  following
slouken@753
   129
environmental variables:
slouken@753
   130
slouken@753
   131
 * SDL_VIDEO_WINDOW_POS - can be  set in the "X,Y" format.  If X and Y
slouken@753
   132
coordinates are bigger than the current desktop resolution, then  win-
slouken@753
   133
dow positioning across  virtual  consoles is activated. If X and Y are
slouken@753
   134
smaller than the desktop resolution  then  window  positioning  in the
slouken@753
   135
current console is activated. The word "center" can be used instead of
slouken@753
   136
coordinates, it  produces  the  same  behavior  as  SDL_VIDEO_CENTERED
slouken@753
   137
environmental variable.
slouken@753
   138
slouken@753
   139
 * SDL_VIDEO_CENTERED - if this environmental variable exists then the
slouken@753
   140
window centering is perfomed in the current virtual console.
slouken@753
   141
slouken@753
   142
    The SDL_VIDEO_CENTERED enviromental variable has greater  priority
slouken@753
   143
than the SDL_VIDEO_WINDOW_POS in case if both variables  are  supplied
slouken@753
   144
to the application.