The GGI driver hasn't been maintained in 8 years. It's probably safe to remove. :)
authorSam Lantinga <slouken@libsdl.org>
Thu, 10 Aug 2006 15:15:06 +0000
changeset 19813f21778e7433
parent 1980 0e7becb566ee
child 1982 3b4ce57c6215
The GGI driver hasn't been maintained in 8 years. It's probably safe to remove. :)
CREDITS
configure.in
include/SDL_config.h.in
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/ggi/SDL_ggievents.c
src/video/ggi/SDL_ggievents_c.h
src/video/ggi/SDL_ggikeys.h
src/video/ggi/SDL_ggimouse.c
src/video/ggi/SDL_ggimouse_c.h
src/video/ggi/SDL_ggivideo.c
src/video/ggi/SDL_ggivideo.h
     1.1 --- a/CREDITS	Thu Aug 10 14:55:45 2006 +0000
     1.2 +++ b/CREDITS	Thu Aug 10 15:15:06 2006 +0000
     1.3 @@ -50,8 +50,6 @@
     1.4  
     1.5  * Eugenia Loli, for endless work on porting SDL games to BeOS
     1.6  
     1.7 -* Jon Taylor for the GGI front-end
     1.8 -
     1.9  * Paulus Esterhazy, for the Visual C++ testing and libraries
    1.10  
    1.11  * Brenda Tantzen, for Metrowerks CodeWarrior on MacOS
     2.1 --- a/configure.in	Thu Aug 10 14:55:45 2006 +0000
     2.2 +++ b/configure.in	Thu Aug 10 15:15:06 2006 +0000
     2.3 @@ -1153,32 +1153,6 @@
     2.4      fi
     2.5  }
     2.6  
     2.7 -dnl Find the GGI includes
     2.8 -CheckGGI()
     2.9 -{
    2.10 -    AC_ARG_ENABLE(video-ggi,
    2.11 -AC_HELP_STRING([--enable-video-ggi], [use GGI video driver [[default=no]]]),
    2.12 -                  , enable_video_ggi=no)
    2.13 -    if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
    2.14 -        AC_MSG_CHECKING(for GGI support)
    2.15 -        video_ggi=no
    2.16 -        AC_TRY_COMPILE([
    2.17 -         #include <ggi/ggi.h>
    2.18 -         #include <ggi/gii.h>
    2.19 -        ],[
    2.20 -        ],[
    2.21 -        video_ggi=yes
    2.22 -        ])
    2.23 -        AC_MSG_RESULT($video_ggi)
    2.24 -        if test x$video_ggi = xyes; then
    2.25 -            AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
    2.26 -            SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
    2.27 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
    2.28 -            have_video=yes
    2.29 -        fi
    2.30 -    fi
    2.31 -}
    2.32 -
    2.33  dnl Find the SVGAlib includes and libraries
    2.34  CheckSVGA()
    2.35  {
    2.36 @@ -2007,7 +1981,6 @@
    2.37          CheckFBCON
    2.38          CheckDirectFB
    2.39          CheckPS2GS
    2.40 -        CheckGGI
    2.41          CheckSVGA
    2.42          CheckVGL
    2.43          CheckWscons
     3.1 --- a/include/SDL_config.h.in	Thu Aug 10 14:55:45 2006 +0000
     3.2 +++ b/include/SDL_config.h.in	Thu Aug 10 15:15:06 2006 +0000
     3.3 @@ -255,7 +255,6 @@
     3.4  #undef SDL_VIDEO_DRIVER_FBCON
     3.5  #undef SDL_VIDEO_DRIVER_GAPI
     3.6  #undef SDL_VIDEO_DRIVER_GEM
     3.7 -#undef SDL_VIDEO_DRIVER_GGI
     3.8  #undef SDL_VIDEO_DRIVER_IPOD
     3.9  #undef SDL_VIDEO_DRIVER_NANOX
    3.10  #undef SDL_VIDEO_DRIVER_OS2FS
     4.1 --- a/src/video/SDL_sysvideo.h	Thu Aug 10 14:55:45 2006 +0000
     4.2 +++ b/src/video/SDL_sysvideo.h	Thu Aug 10 15:15:06 2006 +0000
     4.3 @@ -318,9 +318,6 @@
     4.4  #if SDL_VIDEO_DRIVER_PS2GS
     4.5  extern VideoBootStrap PS2GS_bootstrap;
     4.6  #endif
     4.7 -#if SDL_VIDEO_DRIVER_GGI
     4.8 -extern VideoBootStrap GGI_bootstrap;
     4.9 -#endif
    4.10  #if SDL_VIDEO_DRIVER_VGL
    4.11  extern VideoBootStrap VGL_bootstrap;
    4.12  #endif
     5.1 --- a/src/video/SDL_video.c	Thu Aug 10 14:55:45 2006 +0000
     5.2 +++ b/src/video/SDL_video.c	Thu Aug 10 15:15:06 2006 +0000
     5.3 @@ -67,9 +67,6 @@
     5.4  #if SDL_VIDEO_DRIVER_PS2GS
     5.5      &PS2GS_bootstrap,
     5.6  #endif
     5.7 -#if SDL_VIDEO_DRIVER_GGI
     5.8 -    &GGI_bootstrap,
     5.9 -#endif
    5.10  #if SDL_VIDEO_DRIVER_VGL
    5.11      &VGL_bootstrap,
    5.12  #endif
     6.1 --- a/src/video/ggi/SDL_ggievents.c	Thu Aug 10 14:55:45 2006 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,274 +0,0 @@
     6.4 -/*
     6.5 -    SDL - Simple DirectMedia Layer
     6.6 -    Copyright (C) 1997-2006 Sam Lantinga
     6.7 -
     6.8 -    This library is free software; you can redistribute it and/or
     6.9 -    modify it under the terms of the GNU Lesser General Public
    6.10 -    License as published by the Free Software Foundation; either
    6.11 -    version 2.1 of the License, or (at your option) any later version.
    6.12 -
    6.13 -    This library is distributed in the hope that it will be useful,
    6.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.16 -    Lesser General Public License for more details.
    6.17 -
    6.18 -    You should have received a copy of the GNU Lesser General Public
    6.19 -    License along with this library; if not, write to the Free Software
    6.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    6.21 -
    6.22 -    Sam Lantinga
    6.23 -    slouken@libsdl.org
    6.24 -*/
    6.25 -#include "SDL_config.h"
    6.26 -
    6.27 -/* Handle the event stream, converting GGI events into SDL events */
    6.28 -
    6.29 -#include <sys/types.h>
    6.30 -#include <sys/time.h>
    6.31 -#include <unistd.h>
    6.32 -#include <fcntl.h>
    6.33 -#include <termios.h>
    6.34 -
    6.35 -#include <ggi/keyboard.h>
    6.36 -
    6.37 -#include "SDL_ggikeys.h"
    6.38 -
    6.39 -#include "SDL.h"
    6.40 -#include "../SDL_sysvideo.h"
    6.41 -#include "../../events/SDL_sysevents.h"
    6.42 -#include "../../events/SDL_events_c.h"
    6.43 -#include "SDL_ggivideo.h"
    6.44 -#include "SDL_ggievents_c.h"
    6.45 -
    6.46 -/* The translation tables from a GGI keycode to a SDL keysym */
    6.47 -static SDLKey keymap[128];
    6.48 -static SDL_keysym *GGI_TranslateKey(ggi_event * ev, SDL_keysym * keysym);
    6.49 -
    6.50 -static int posted = 0;
    6.51 -
    6.52 -void
    6.53 -GGI_PumpEvents(_THIS)
    6.54 -{
    6.55 -    struct timeval *tvp, tv = { 0, 0 };
    6.56 -    ggi_event ev;
    6.57 -
    6.58 -    tvp = &tv;
    6.59 -
    6.60 -/*	ggiFlush(VIS); */
    6.61 -
    6.62 -    while (ggiEventPoll(VIS, emAll, tvp))
    6.63 -/*	while (ggiEventPoll(VIS, (emKeyboard | emPointer | emCommand), tvp)) */
    6.64 -    {
    6.65 -        int queueevent_mouse = 0, queueevent_kbd = 0;
    6.66 -        static int buttons = 0;
    6.67 -        static int mouse_x = 0, mouse_y = 0, mouse_z = 0;
    6.68 -        int x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0;
    6.69 -        uint32 sym;
    6.70 -        int pressed_mouse, pressed_kbd;
    6.71 -        SDL_keysym keysym;
    6.72 -
    6.73 -        posted = 0;
    6.74 -
    6.75 -        /* FIXME: We do not actually want all events, only
    6.76 -         * mouse and keyboard events.  Having to handle all
    6.77 -         * events will slow things down.  */
    6.78 -
    6.79 -        ggiEventRead(VIS, &ev, emAll);
    6.80 -/*		ggiEventRead(VIS, &ev, (emKeyboard | emPointer | emCommand)); */
    6.81 -
    6.82 -        switch (ev.any.type) {
    6.83 -        case evPtrRelative:
    6.84 -            x = ev.pmove.x;
    6.85 -            y = ev.pmove.y;
    6.86 -            z = ev.pmove.wheel;
    6.87 -            posted += SDL_PrivateMouseMotion(0, 1, x, y);
    6.88 -            break;
    6.89 -        case evPtrAbsolute:
    6.90 -            if (mouse_x != ev.pmove.x || mouse_y != ev.pmove.y
    6.91 -                || mouse_z != ev.pmove.wheel) {
    6.92 -                x = ev.pmove.x - mouse_x;
    6.93 -                y = ev.pmove.y - mouse_y;
    6.94 -                z = ev.pmove.wheel - mouse_z;
    6.95 -                mouse_x = ev.pmove.x;
    6.96 -                mouse_y = ev.pmove.y;
    6.97 -                mouse_z = ev.pmove.wheel;
    6.98 -                posted += SDL_PrivateMouseMotion(0, 1, x, y);
    6.99 -            }
   6.100 -            break;
   6.101 -        case evPtrButtonPress:
   6.102 -            posted +=
   6.103 -                SDL_PrivateMouseButton(SDL_PRESSED, ev.pbutton.button, 0, 0);
   6.104 -            break;
   6.105 -        case evPtrButtonRelease:
   6.106 -            posted +=
   6.107 -                SDL_PrivateMouseButton(SDL_RELEASED, ev.pbutton.button, 0, 0);
   6.108 -            break;
   6.109 -        case evKeyPress:
   6.110 -        case evKeyRepeat:
   6.111 -            posted +=
   6.112 -                SDL_PrivateKeyboard(SDL_PRESSED,
   6.113 -                                    GGI_TranslateKey(&ev, &keysym));
   6.114 -            break;
   6.115 -        case evKeyRelease:
   6.116 -            posted +=
   6.117 -                SDL_PrivateKeyboard(SDL_RELEASED,
   6.118 -                                    GGI_TranslateKey(&ev, &keysym));
   6.119 -            break;
   6.120 -        case evCommand:
   6.121 -            fprintf(stderr, "Command event %x recieved\n", ev.cmd.code);
   6.122 -            break;
   6.123 -        default:
   6.124 -            fprintf(stderr, "Unhandled event type %d\n", ev.any.type);
   6.125 -            break;
   6.126 -        }
   6.127 -    }
   6.128 -
   6.129 -}
   6.130 -
   6.131 -void
   6.132 -GGI_InitOSKeymap(_THIS)
   6.133 -{
   6.134 -    int i;
   6.135 -
   6.136 -    /* Initialize the GGI key translation table */
   6.137 -    for (i = 0; i < SDL_arraysize(keymap); ++i)
   6.138 -        keymap[i] = SDLK_UNKNOWN;
   6.139 -
   6.140 -    keymap[SCANCODE_ESCAPE] = SDLK_ESCAPE;
   6.141 -    keymap[SCANCODE_1] = SDLK_1;
   6.142 -    keymap[SCANCODE_2] = SDLK_2;
   6.143 -    keymap[SCANCODE_3] = SDLK_3;
   6.144 -    keymap[SCANCODE_4] = SDLK_4;
   6.145 -    keymap[SCANCODE_5] = SDLK_5;
   6.146 -    keymap[SCANCODE_6] = SDLK_6;
   6.147 -    keymap[SCANCODE_7] = SDLK_7;
   6.148 -    keymap[SCANCODE_8] = SDLK_8;
   6.149 -    keymap[SCANCODE_9] = SDLK_9;
   6.150 -    keymap[SCANCODE_0] = SDLK_0;
   6.151 -    keymap[SCANCODE_MINUS] = SDLK_MINUS;
   6.152 -    keymap[SCANCODE_EQUAL] = SDLK_EQUALS;
   6.153 -    keymap[SCANCODE_BACKSPACE] = SDLK_BACKSPACE;
   6.154 -    keymap[SCANCODE_TAB] = SDLK_TAB;
   6.155 -    keymap[SCANCODE_Q] = SDLK_q;
   6.156 -    keymap[SCANCODE_W] = SDLK_w;
   6.157 -    keymap[SCANCODE_E] = SDLK_e;
   6.158 -    keymap[SCANCODE_R] = SDLK_r;
   6.159 -    keymap[SCANCODE_T] = SDLK_t;
   6.160 -    keymap[SCANCODE_Y] = SDLK_y;
   6.161 -    keymap[SCANCODE_U] = SDLK_u;
   6.162 -    keymap[SCANCODE_I] = SDLK_i;
   6.163 -    keymap[SCANCODE_O] = SDLK_o;
   6.164 -    keymap[SCANCODE_P] = SDLK_p;
   6.165 -    keymap[SCANCODE_BRACKET_LEFT] = SDLK_LEFTBRACKET;
   6.166 -    keymap[SCANCODE_BRACKET_RIGHT] = SDLK_RIGHTBRACKET;
   6.167 -    keymap[SCANCODE_ENTER] = SDLK_RETURN;
   6.168 -    keymap[SCANCODE_LEFTCONTROL] = SDLK_LCTRL;
   6.169 -    keymap[SCANCODE_A] = SDLK_a;
   6.170 -    keymap[SCANCODE_S] = SDLK_s;
   6.171 -    keymap[SCANCODE_D] = SDLK_d;
   6.172 -    keymap[SCANCODE_F] = SDLK_f;
   6.173 -    keymap[SCANCODE_G] = SDLK_g;
   6.174 -    keymap[SCANCODE_H] = SDLK_h;
   6.175 -    keymap[SCANCODE_J] = SDLK_j;
   6.176 -    keymap[SCANCODE_K] = SDLK_k;
   6.177 -    keymap[SCANCODE_L] = SDLK_l;
   6.178 -    keymap[SCANCODE_SEMICOLON] = SDLK_SEMICOLON;
   6.179 -    keymap[SCANCODE_APOSTROPHE] = SDLK_QUOTE;
   6.180 -    keymap[SCANCODE_GRAVE] = SDLK_BACKQUOTE;
   6.181 -    keymap[SCANCODE_LEFTSHIFT] = SDLK_LSHIFT;
   6.182 -    keymap[SCANCODE_BACKSLASH] = SDLK_BACKSLASH;
   6.183 -    keymap[SCANCODE_Z] = SDLK_z;
   6.184 -    keymap[SCANCODE_X] = SDLK_x;
   6.185 -    keymap[SCANCODE_C] = SDLK_c;
   6.186 -    keymap[SCANCODE_V] = SDLK_v;
   6.187 -    keymap[SCANCODE_B] = SDLK_b;
   6.188 -    keymap[SCANCODE_N] = SDLK_n;
   6.189 -    keymap[SCANCODE_M] = SDLK_m;
   6.190 -    keymap[SCANCODE_COMMA] = SDLK_COMMA;
   6.191 -    keymap[SCANCODE_PERIOD] = SDLK_PERIOD;
   6.192 -    keymap[SCANCODE_SLASH] = SDLK_SLASH;
   6.193 -    keymap[SCANCODE_RIGHTSHIFT] = SDLK_RSHIFT;
   6.194 -    keymap[SCANCODE_KEYPADMULTIPLY] = SDLK_KP_MULTIPLY;
   6.195 -    keymap[SCANCODE_LEFTALT] = SDLK_LALT;
   6.196 -    keymap[SCANCODE_SPACE] = SDLK_SPACE;
   6.197 -    keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK;
   6.198 -    keymap[SCANCODE_F1] = SDLK_F1;
   6.199 -    keymap[SCANCODE_F2] = SDLK_F2;
   6.200 -    keymap[SCANCODE_F3] = SDLK_F3;
   6.201 -    keymap[SCANCODE_F4] = SDLK_F4;
   6.202 -    keymap[SCANCODE_F5] = SDLK_F5;
   6.203 -    keymap[SCANCODE_F6] = SDLK_F6;
   6.204 -    keymap[SCANCODE_F7] = SDLK_F7;
   6.205 -    keymap[SCANCODE_F8] = SDLK_F8;
   6.206 -    keymap[SCANCODE_F9] = SDLK_F9;
   6.207 -    keymap[SCANCODE_F10] = SDLK_F10;
   6.208 -    keymap[SCANCODE_NUMLOCK] = SDLK_NUMLOCK;
   6.209 -    keymap[SCANCODE_SCROLLLOCK] = SDLK_SCROLLOCK;
   6.210 -    keymap[SCANCODE_KEYPAD7] = SDLK_KP7;
   6.211 -    keymap[SCANCODE_CURSORUPLEFT] = SDLK_KP7;
   6.212 -    keymap[SCANCODE_KEYPAD8] = SDLK_KP8;
   6.213 -    keymap[SCANCODE_CURSORUP] = SDLK_KP8;
   6.214 -    keymap[SCANCODE_KEYPAD9] = SDLK_KP9;
   6.215 -    keymap[SCANCODE_CURSORUPRIGHT] = SDLK_KP9;
   6.216 -    keymap[SCANCODE_KEYPADMINUS] = SDLK_KP_MINUS;
   6.217 -    keymap[SCANCODE_KEYPAD4] = SDLK_KP4;
   6.218 -    keymap[SCANCODE_CURSORLEFT] = SDLK_KP4;
   6.219 -    keymap[SCANCODE_KEYPAD5] = SDLK_KP5;
   6.220 -    keymap[SCANCODE_KEYPAD6] = SDLK_KP6;
   6.221 -    keymap[SCANCODE_CURSORRIGHT] = SDLK_KP6;
   6.222 -    keymap[SCANCODE_KEYPADPLUS] = SDLK_KP_PLUS;
   6.223 -    keymap[SCANCODE_KEYPAD1] = SDLK_KP1;
   6.224 -    keymap[SCANCODE_CURSORDOWNLEFT] = SDLK_KP1;
   6.225 -    keymap[SCANCODE_KEYPAD2] = SDLK_KP2;
   6.226 -    keymap[SCANCODE_CURSORDOWN] = SDLK_KP2;
   6.227 -    keymap[SCANCODE_KEYPAD3] = SDLK_KP3;
   6.228 -    keymap[SCANCODE_CURSORDOWNRIGHT] = SDLK_KP3;
   6.229 -    keymap[SCANCODE_KEYPAD0] = SDLK_KP0;
   6.230 -    keymap[SCANCODE_KEYPADPERIOD] = SDLK_KP_PERIOD;
   6.231 -    keymap[SCANCODE_LESS] = SDLK_LESS;
   6.232 -    keymap[SCANCODE_F11] = SDLK_F11;
   6.233 -    keymap[SCANCODE_F12] = SDLK_F12;
   6.234 -    keymap[SCANCODE_KEYPADENTER] = SDLK_KP_ENTER;
   6.235 -    keymap[SCANCODE_RIGHTCONTROL] = SDLK_RCTRL;
   6.236 -    keymap[SCANCODE_CONTROL] = SDLK_RCTRL;
   6.237 -    keymap[SCANCODE_KEYPADDIVIDE] = SDLK_KP_DIVIDE;
   6.238 -    keymap[SCANCODE_PRINTSCREEN] = SDLK_PRINT;
   6.239 -    keymap[SCANCODE_RIGHTALT] = SDLK_RALT;
   6.240 -    keymap[SCANCODE_BREAK] = SDLK_BREAK;
   6.241 -    keymap[SCANCODE_BREAK_ALTERNATIVE] = SDLK_UNKNOWN;
   6.242 -    keymap[SCANCODE_HOME] = SDLK_HOME;
   6.243 -    keymap[SCANCODE_CURSORBLOCKUP] = SDLK_UP;
   6.244 -    keymap[SCANCODE_PAGEUP] = SDLK_PAGEUP;
   6.245 -    keymap[SCANCODE_CURSORBLOCKLEFT] = SDLK_LEFT;
   6.246 -    keymap[SCANCODE_CURSORBLOCKRIGHT] = SDLK_RIGHT;
   6.247 -    keymap[SCANCODE_END] = SDLK_END;
   6.248 -    keymap[SCANCODE_CURSORBLOCKDOWN] = SDLK_DOWN;
   6.249 -    keymap[SCANCODE_PAGEDOWN] = SDLK_PAGEDOWN;
   6.250 -    keymap[SCANCODE_INSERT] = SDLK_INSERT;
   6.251 -    keymap[SCANCODE_REMOVE] = SDLK_DELETE;
   6.252 -    keymap[119] = SDLK_PAUSE;
   6.253 -    keymap[SCANCODE_RIGHTWIN] = SDLK_RSUPER;
   6.254 -    keymap[SCANCODE_LEFTWIN] = SDLK_LSUPER;
   6.255 -    keymap[127] = SDLK_MENU;
   6.256 -}
   6.257 -
   6.258 -
   6.259 -
   6.260 -static SDL_keysym *
   6.261 -GGI_TranslateKey(gii_event * ev, SDL_keysym * keysym)
   6.262 -{
   6.263 -    /* Set the keysym information */
   6.264 -    keysym->scancode = ev->key.button;
   6.265 -    keysym->sym = keymap[ev->key.button];
   6.266 -    keysym->mod = KMOD_NONE;
   6.267 -
   6.268 -    /* If UNICODE is on, get the UNICODE value for the key */
   6.269 -    keysym->unicode = 0;
   6.270 -    if (SDL_TranslateUNICODE) {
   6.271 -        keysym->unicode = GII_UNICODE(ev->key.sym);
   6.272 -    }
   6.273 -
   6.274 -    return keysym;
   6.275 -}
   6.276 -
   6.277 -/* vi: set ts=4 sw=4 expandtab: */
     7.1 --- a/src/video/ggi/SDL_ggievents_c.h	Thu Aug 10 14:55:45 2006 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,29 +0,0 @@
     7.4 -/*
     7.5 -    SDL - Simple DirectMedia Layer
     7.6 -    Copyright (C) 1997-2006 Sam Lantinga
     7.7 -
     7.8 -    This library is free software; you can redistribute it and/or
     7.9 -    modify it under the terms of the GNU Lesser General Public
    7.10 -    License as published by the Free Software Foundation; either
    7.11 -    version 2.1 of the License, or (at your option) any later version.
    7.12 -
    7.13 -    This library is distributed in the hope that it will be useful,
    7.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    7.16 -    Lesser General Public License for more details.
    7.17 -
    7.18 -    You should have received a copy of the GNU Lesser General Public
    7.19 -    License along with this library; if not, write to the Free Software
    7.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    7.21 -
    7.22 -    Sam Lantinga
    7.23 -    slouken@libsdl.org
    7.24 -*/
    7.25 -#include "SDL_config.h"
    7.26 -
    7.27 -#include "SDL_ggivideo.h"
    7.28 -
    7.29 -/* Functions to be exported */
    7.30 -extern void GGI_InitOSKeymap(_THIS);
    7.31 -extern void GGI_PumpEvents(_THIS);
    7.32 -/* vi: set ts=4 sw=4 expandtab: */
     8.1 --- a/src/video/ggi/SDL_ggikeys.h	Thu Aug 10 14:55:45 2006 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,135 +0,0 @@
     8.4 -
     8.5 -#define SCANCODE_ESCAPE			1
     8.6 -
     8.7 -#define SCANCODE_1			2
     8.8 -#define SCANCODE_2			3
     8.9 -#define SCANCODE_3			4
    8.10 -#define SCANCODE_4			5
    8.11 -#define SCANCODE_5			6
    8.12 -#define SCANCODE_6			7
    8.13 -#define SCANCODE_7			8
    8.14 -#define SCANCODE_8			9
    8.15 -#define SCANCODE_9			10
    8.16 -#define SCANCODE_0			11
    8.17 -
    8.18 -#define SCANCODE_MINUS			12
    8.19 -#define SCANCODE_EQUAL			13
    8.20 -
    8.21 -#define SCANCODE_BACKSPACE		14
    8.22 -#define SCANCODE_TAB			15
    8.23 -
    8.24 -#define SCANCODE_Q			16
    8.25 -#define SCANCODE_W			17
    8.26 -#define SCANCODE_E			18
    8.27 -#define SCANCODE_R			19
    8.28 -#define SCANCODE_T			20
    8.29 -#define SCANCODE_Y			21
    8.30 -#define SCANCODE_U			22
    8.31 -#define SCANCODE_I			23
    8.32 -#define SCANCODE_O			24
    8.33 -#define SCANCODE_P			25
    8.34 -#define SCANCODE_BRACKET_LEFT		26
    8.35 -#define SCANCODE_BRACKET_RIGHT		27
    8.36 -
    8.37 -#define SCANCODE_ENTER			28
    8.38 -
    8.39 -#define SCANCODE_LEFTCONTROL		29
    8.40 -
    8.41 -#define SCANCODE_A			30
    8.42 -#define SCANCODE_S			31
    8.43 -#define SCANCODE_D			32
    8.44 -#define SCANCODE_F			33
    8.45 -#define SCANCODE_G			34
    8.46 -#define SCANCODE_H			35
    8.47 -#define SCANCODE_J			36
    8.48 -#define SCANCODE_K			37
    8.49 -#define SCANCODE_L			38
    8.50 -#define SCANCODE_SEMICOLON		39
    8.51 -#define SCANCODE_APOSTROPHE		40
    8.52 -#define SCANCODE_GRAVE			41
    8.53 -
    8.54 -#define SCANCODE_LEFTSHIFT		42
    8.55 -#define SCANCODE_BACKSLASH		43
    8.56 -
    8.57 -#define SCANCODE_Z			44
    8.58 -#define SCANCODE_X			45
    8.59 -#define SCANCODE_C			46
    8.60 -#define SCANCODE_V			47
    8.61 -#define SCANCODE_B			48
    8.62 -#define SCANCODE_N			49
    8.63 -#define SCANCODE_M			50
    8.64 -#define SCANCODE_COMMA			51
    8.65 -#define SCANCODE_PERIOD			52
    8.66 -#define SCANCODE_SLASH			53
    8.67 -
    8.68 -#define SCANCODE_RIGHTSHIFT		54
    8.69 -#define SCANCODE_KEYPADMULTIPLY		55
    8.70 -
    8.71 -#define SCANCODE_LEFTALT		56
    8.72 -#define SCANCODE_SPACE			57
    8.73 -#define SCANCODE_CAPSLOCK		58
    8.74 -
    8.75 -#define SCANCODE_F1			59
    8.76 -#define SCANCODE_F2			60
    8.77 -#define SCANCODE_F3			61
    8.78 -#define SCANCODE_F4			62
    8.79 -#define SCANCODE_F5			63
    8.80 -#define SCANCODE_F6			64
    8.81 -#define SCANCODE_F7			65
    8.82 -#define SCANCODE_F8			66
    8.83 -#define SCANCODE_F9			67
    8.84 -#define SCANCODE_F10			68
    8.85 -
    8.86 -#define SCANCODE_NUMLOCK		69
    8.87 -#define SCANCODE_SCROLLLOCK		70
    8.88 -
    8.89 -#define SCANCODE_KEYPAD7		71
    8.90 -#define SCANCODE_CURSORUPLEFT		71
    8.91 -#define SCANCODE_KEYPAD8		72
    8.92 -#define SCANCODE_CURSORUP		72
    8.93 -#define SCANCODE_KEYPAD9		73
    8.94 -#define SCANCODE_CURSORUPRIGHT		73
    8.95 -#define SCANCODE_KEYPADMINUS		74
    8.96 -#define SCANCODE_KEYPAD4		75
    8.97 -#define SCANCODE_CURSORLEFT		75
    8.98 -#define SCANCODE_KEYPAD5		76
    8.99 -#define SCANCODE_KEYPAD6		77
   8.100 -#define SCANCODE_CURSORRIGHT		77
   8.101 -#define SCANCODE_KEYPADPLUS		78
   8.102 -#define SCANCODE_KEYPAD1		79
   8.103 -#define SCANCODE_CURSORDOWNLEFT		79
   8.104 -#define SCANCODE_KEYPAD2		80
   8.105 -#define SCANCODE_CURSORDOWN		80
   8.106 -#define SCANCODE_KEYPAD3		81
   8.107 -#define SCANCODE_CURSORDOWNRIGHT	81
   8.108 -#define SCANCODE_KEYPAD0		82
   8.109 -#define SCANCODE_KEYPADPERIOD		83
   8.110 -
   8.111 -#define SCANCODE_LESS			86
   8.112 -
   8.113 -#define SCANCODE_F11			87
   8.114 -#define SCANCODE_F12			88
   8.115 -
   8.116 -#define SCANCODE_KEYPADENTER		96
   8.117 -#define SCANCODE_RIGHTCONTROL		97
   8.118 -#define SCANCODE_CONTROL		97
   8.119 -#define SCANCODE_KEYPADDIVIDE		98
   8.120 -#define SCANCODE_PRINTSCREEN		99
   8.121 -#define SCANCODE_RIGHTALT		100
   8.122 -#define SCANCODE_BREAK			101     /* Beware: is 119     */
   8.123 -#define SCANCODE_BREAK_ALTERNATIVE	119     /* on some keyboards! */
   8.124 -
   8.125 -#define SCANCODE_HOME			102
   8.126 -#define SCANCODE_CURSORBLOCKUP		90      /* Cursor key block */
   8.127 -#define SCANCODE_PAGEUP			104
   8.128 -#define SCANCODE_CURSORBLOCKLEFT	92      /* Cursor key block */
   8.129 -#define SCANCODE_CURSORBLOCKRIGHT	94      /* Cursor key block */
   8.130 -#define SCANCODE_END			107
   8.131 -#define SCANCODE_CURSORBLOCKDOWN	108     /* Cursor key block */
   8.132 -#define SCANCODE_PAGEDOWN		109
   8.133 -#define SCANCODE_INSERT			110
   8.134 -#define SCANCODE_REMOVE			111
   8.135 -
   8.136 -#define SCANCODE_RIGHTWIN		126
   8.137 -#define SCANCODE_LEFTWIN		125
   8.138 -/* vi: set ts=4 sw=4 expandtab: */
     9.1 --- a/src/video/ggi/SDL_ggimouse.c	Thu Aug 10 14:55:45 2006 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,34 +0,0 @@
     9.4 -/*
     9.5 -    SDL - Simple DirectMedia Layer
     9.6 -    Copyright (C) 1997-2006 Sam Lantinga
     9.7 -
     9.8 -    This library is free software; you can redistribute it and/or
     9.9 -    modify it under the terms of the GNU Lesser General Public
    9.10 -    License as published by the Free Software Foundation; either
    9.11 -    version 2.1 of the License, or (at your option) any later version.
    9.12 -
    9.13 -    This library is distributed in the hope that it will be useful,
    9.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    9.16 -    Lesser General Public License for more details.
    9.17 -
    9.18 -    You should have received a copy of the GNU Lesser General Public
    9.19 -    License along with this library; if not, write to the Free Software
    9.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    9.21 -
    9.22 -    Sam Lantinga
    9.23 -    slouken@libsdl.org
    9.24 -*/
    9.25 -#include "SDL_config.h"
    9.26 -
    9.27 -#include "SDL_mouse.h"
    9.28 -#include "../../events/SDL_events_c.h"
    9.29 -#include "SDL_ggimouse_c.h"
    9.30 -
    9.31 -
    9.32 -/* The implementation dependent data for the window manager cursor */
    9.33 -struct WMcursor
    9.34 -{
    9.35 -    int unused;
    9.36 -};
    9.37 -/* vi: set ts=4 sw=4 expandtab: */
    10.1 --- a/src/video/ggi/SDL_ggimouse_c.h	Thu Aug 10 14:55:45 2006 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,27 +0,0 @@
    10.4 -/*
    10.5 -    SDL - Simple DirectMedia Layer
    10.6 -    Copyright (C) 1997-2006 Sam Lantinga
    10.7 -
    10.8 -    This library is free software; you can redistribute it and/or
    10.9 -    modify it under the terms of the GNU Lesser General Public
   10.10 -    License as published by the Free Software Foundation; either
   10.11 -    version 2.1 of the License, or (at your option) any later version.
   10.12 -
   10.13 -    This library is distributed in the hope that it will be useful,
   10.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   10.16 -    Lesser General Public License for more details.
   10.17 -
   10.18 -    You should have received a copy of the GNU Lesser General Public
   10.19 -    License along with this library; if not, write to the Free Software
   10.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   10.21 -
   10.22 -    Sam Lantinga
   10.23 -    slouken@libsdl.org
   10.24 -*/
   10.25 -#include "SDL_config.h"
   10.26 -
   10.27 -#include "SDL_ggivideo.h"
   10.28 -
   10.29 -/* Functions to be exported */
   10.30 -/* vi: set ts=4 sw=4 expandtab: */
    11.1 --- a/src/video/ggi/SDL_ggivideo.c	Thu Aug 10 14:55:45 2006 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,400 +0,0 @@
    11.4 -/*
    11.5 -    SDL - Simple DirectMedia Layer
    11.6 -    Copyright (C) 1997-2006 Sam Lantinga
    11.7 -
    11.8 -    This library is free software; you can redistribute it and/or
    11.9 -    modify it under the terms of the GNU Lesser General Public
   11.10 -    License as published by the Free Software Foundation; either
   11.11 -    version 2.1 of the License, or (at your option) any later version.
   11.12 -
   11.13 -    This library is distributed in the hope that it will be useful,
   11.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   11.16 -    Lesser General Public License for more details.
   11.17 -
   11.18 -    You should have received a copy of the GNU Lesser General Public
   11.19 -    License along with this library; if not, write to the Free Software
   11.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   11.21 -
   11.22 -    Sam Lantinga
   11.23 -    slouken@libsdl.org
   11.24 -*/
   11.25 -#include "SDL_config.h"
   11.26 -
   11.27 -/* GGI-based SDL video driver implementation.
   11.28 -*/
   11.29 -
   11.30 -#include <fcntl.h>
   11.31 -#include <unistd.h>
   11.32 -#include <sys/mman.h>
   11.33 -
   11.34 -#include <ggi/ggi.h>
   11.35 -#include <ggi/gii.h>
   11.36 -
   11.37 -#include "SDL_video.h"
   11.38 -#include "SDL_mouse.h"
   11.39 -#include "../SDL_sysvideo.h"
   11.40 -#include "../SDL_pixels_c.h"
   11.41 -#include "../../events/SDL_events_c.h"
   11.42 -#include "SDL_ggivideo.h"
   11.43 -#include "SDL_ggimouse_c.h"
   11.44 -#include "SDL_ggievents_c.h"
   11.45 -
   11.46 -
   11.47 -struct private_hwdata
   11.48 -{
   11.49 -    ggi_visual_t vis;
   11.50 -};
   11.51 -
   11.52 -ggi_visual_t VIS;
   11.53 -
   11.54 -/* Initialization/Query functions */
   11.55 -static int GGI_VideoInit(_THIS, SDL_PixelFormat * vformat);
   11.56 -static SDL_Rect **GGI_ListModes(_THIS, SDL_PixelFormat * format,
   11.57 -                                Uint32 flags);
   11.58 -static SDL_Surface *GGI_SetVideoMode(_THIS, SDL_Surface * current, int width,
   11.59 -                                     int height, int bpp, Uint32 flags);
   11.60 -static int GGI_SetColors(_THIS, int firstcolor, int ncolors,
   11.61 -                         SDL_Color * colors);
   11.62 -static void GGI_VideoQuit(_THIS);
   11.63 -
   11.64 -/* Hardware surface functions */
   11.65 -static int GGI_AllocHWSurface(_THIS, SDL_Surface * surface);
   11.66 -static int GGI_LockHWSurface(_THIS, SDL_Surface * surface);
   11.67 -static void GGI_UnlockHWSurface(_THIS, SDL_Surface * surface);
   11.68 -static void GGI_FreeHWSurface(_THIS, SDL_Surface * surface);
   11.69 -
   11.70 -/* GGI driver bootstrap functions */
   11.71 -
   11.72 -static int
   11.73 -GGI_Available(void)
   11.74 -{
   11.75 -    ggi_visual_t *vis;
   11.76 -
   11.77 -    vis = NULL;
   11.78 -    if (ggiInit() == 0) {
   11.79 -        vis = ggiOpen(NULL);
   11.80 -        if (vis != NULL) {
   11.81 -            ggiClose(vis);
   11.82 -        }
   11.83 -    }
   11.84 -    return (vis != NULL);
   11.85 -}
   11.86 -
   11.87 -static void
   11.88 -GGI_DeleteDevice(SDL_VideoDevice * device)
   11.89 -{
   11.90 -    SDL_free(device->hidden);
   11.91 -    SDL_free(device);
   11.92 -}
   11.93 -
   11.94 -static SDL_VideoDevice *
   11.95 -GGI_CreateDevice(int devindex)
   11.96 -{
   11.97 -    SDL_VideoDevice *device;
   11.98 -
   11.99 -    /* Initialize all variables that we clean on shutdown */
  11.100 -    device = (SDL_VideoDevice *) SDL_malloc(sizeof(SDL_VideoDevice));
  11.101 -    if (device) {
  11.102 -        SDL_memset(device, 0, (sizeof *device));
  11.103 -        device->hidden = (struct SDL_PrivateVideoData *)
  11.104 -            SDL_malloc((sizeof *device->hidden));
  11.105 -    }
  11.106 -    if ((device == NULL) || (device->hidden == NULL)) {
  11.107 -        SDL_OutOfMemory();
  11.108 -        if (device) {
  11.109 -            SDL_free(device);
  11.110 -        }
  11.111 -        return (0);
  11.112 -    }
  11.113 -    SDL_memset(device->hidden, 0, (sizeof *device->hidden));
  11.114 -
  11.115 -    /* Set the function pointers */
  11.116 -    device->VideoInit = GGI_VideoInit;
  11.117 -    device->ListModes = GGI_ListModes;
  11.118 -    device->SetVideoMode = GGI_SetVideoMode;
  11.119 -    device->SetColors = GGI_SetColors;
  11.120 -    device->UpdateRects = NULL;
  11.121 -    device->VideoQuit = GGI_VideoQuit;
  11.122 -    device->AllocHWSurface = GGI_AllocHWSurface;
  11.123 -    device->CheckHWBlit = NULL;
  11.124 -    device->FillHWRect = NULL;
  11.125 -    device->SetHWColorKey = NULL;
  11.126 -    device->SetHWAlpha = NULL;
  11.127 -    device->LockHWSurface = GGI_LockHWSurface;
  11.128 -    device->UnlockHWSurface = GGI_UnlockHWSurface;
  11.129 -    device->FlipHWSurface = NULL;
  11.130 -    device->FreeHWSurface = GGI_FreeHWSurface;
  11.131 -    device->SetCaption = NULL;
  11.132 -    device->SetIcon = NULL;
  11.133 -    device->IconifyWindow = NULL;
  11.134 -    device->GrabInput = NULL;
  11.135 -    device->GetWMInfo = NULL;
  11.136 -    device->InitOSKeymap = GGI_InitOSKeymap;
  11.137 -    device->PumpEvents = GGI_PumpEvents;
  11.138 -
  11.139 -    device->free = GGI_DeleteDevice;
  11.140 -
  11.141 -    return device;
  11.142 -}
  11.143 -
  11.144 -VideoBootStrap GGI_bootstrap = {
  11.145 -    "ggi", "General Graphics Interface (GGI)",
  11.146 -    GGI_Available, GGI_CreateDevice
  11.147 -};
  11.148 -
  11.149 -
  11.150 -static SDL_Rect video_mode;
  11.151 -static SDL_Rect *SDL_modelist[4] = { NULL, NULL, NULL, NULL };
  11.152 -
  11.153 -int
  11.154 -GGI_VideoInit(_THIS, SDL_PixelFormat * vformat)
  11.155 -{
  11.156 -    ggi_mode mode = {
  11.157 -        1,
  11.158 -        {GGI_AUTO, GGI_AUTO},
  11.159 -        {GGI_AUTO, GGI_AUTO},
  11.160 -        {0, 0},
  11.161 -        GT_AUTO,
  11.162 -        {GGI_AUTO, GGI_AUTO}
  11.163 -    };
  11.164 -    struct private_hwdata *priv;
  11.165 -    ggi_color pal[256], map[256];
  11.166 -    const ggi_directbuffer *db;
  11.167 -    int err, num_bufs;
  11.168 -    ggi_pixel white, black;
  11.169 -
  11.170 -    priv = SDL_malloc(sizeof(struct private_hwdata));
  11.171 -    if (priv == NULL) {
  11.172 -        SDL_SetError("Unhandled GGI mode type!\n");
  11.173 -        GGI_VideoQuit(NULL);
  11.174 -    }
  11.175 -
  11.176 -    if (ggiInit() != 0) {
  11.177 -        SDL_SetError("Unable to initialize GGI!\n");
  11.178 -        GGI_VideoQuit(NULL);
  11.179 -    }
  11.180 -
  11.181 -    VIS = ggiOpen(NULL);
  11.182 -    if (VIS == NULL) {
  11.183 -        SDL_SetError("Unable to open default GGI visual!\n");
  11.184 -        ggiExit();
  11.185 -        GGI_VideoQuit(NULL);
  11.186 -    }
  11.187 -
  11.188 -    ggiSetFlags(VIS, GGIFLAG_ASYNC);
  11.189 -
  11.190 -    /* Validate mode, autodetecting any GGI_AUTO or GT_AUTO fields */
  11.191 -    ggiCheckMode(VIS, &mode);
  11.192 -
  11.193 -    /* At this point we should have a valid mode - try to set it */
  11.194 -    err = ggiSetMode(VIS, &mode);
  11.195 -
  11.196 -    /* If we couldn't set _any_ modes, something is very wrong */
  11.197 -    if (err) {
  11.198 -        SDL_SetError("Can't set a mode!\n");
  11.199 -        ggiClose(VIS);
  11.200 -        ggiExit();
  11.201 -        GGI_VideoQuit(NULL);
  11.202 -    }
  11.203 -
  11.204 -    /* Determine the current screen size */
  11.205 -    this->info.current_w = mode.virt.x;
  11.206 -    this->info.current_h = mode.virt.y;
  11.207 -
  11.208 -    /* Set a palette for palletized modes */
  11.209 -    if (GT_SCHEME(mode.graphtype) == GT_PALETTE) {
  11.210 -        ggiSetColorfulPalette(VIS);
  11.211 -        ggiGetPalette(VIS, 0, 1 << vformat->BitsPerPixel, pal);
  11.212 -    }
  11.213 -
  11.214 -    /* Now we try to get the DirectBuffer info, which determines whether
  11.215 -     * SDL can access hardware surfaces directly. */
  11.216 -
  11.217 -    num_bufs = ggiDBGetNumBuffers(VIS);
  11.218 -
  11.219 -    if (num_bufs > 0) {
  11.220 -        db = ggiDBGetBuffer(VIS, 0);    /* Only handle one DB for now */
  11.221 -
  11.222 -        vformat->BitsPerPixel = db->buffer.plb.pixelformat->depth;
  11.223 -
  11.224 -        vformat->Rmask = db->buffer.plb.pixelformat->red_mask;
  11.225 -        vformat->Gmask = db->buffer.plb.pixelformat->green_mask;
  11.226 -        vformat->Bmask = db->buffer.plb.pixelformat->blue_mask;
  11.227 -
  11.228 -        /* Fill in our hardware acceleration capabilities */
  11.229 -
  11.230 -        this->info.wm_available = 0;
  11.231 -        this->info.hw_available = 1;
  11.232 -        this->info.video_mem = db->buffer.plb.stride * mode.virt.y;
  11.233 -    }
  11.234 -
  11.235 -    video_mode.x = 0;
  11.236 -    video_mode.y = 0;
  11.237 -    video_mode.w = mode.virt.x;
  11.238 -    video_mode.h = mode.virt.y;
  11.239 -    SDL_modelist[((vformat->BitsPerPixel + 7) / 8) - 1] = &video_mode;
  11.240 -
  11.241 -    /* We're done! */
  11.242 -    return (0);
  11.243 -}
  11.244 -
  11.245 -static SDL_Rect **
  11.246 -GGI_ListModes(_THIS, SDL_PixelFormat * format, Uint32 flags)
  11.247 -{
  11.248 -    return (&SDL_modelist[((format->BitsPerPixel + 7) / 8) - 1]);
  11.249 -}
  11.250 -
  11.251 -/* Various screen update functions available */
  11.252 -static void GGI_DirectUpdate(_THIS, int numrects, SDL_Rect * rects);
  11.253 -
  11.254 -SDL_Surface *
  11.255 -GGI_SetVideoMode(_THIS, SDL_Surface * current, int width, int height,
  11.256 -                 int bpp, Uint32 flags)
  11.257 -{
  11.258 -    ggi_mode mode = {
  11.259 -        1,
  11.260 -        {GGI_AUTO, GGI_AUTO},
  11.261 -        {GGI_AUTO, GGI_AUTO},
  11.262 -        {0, 0},
  11.263 -        GT_AUTO,
  11.264 -        {GGI_AUTO, GGI_AUTO}
  11.265 -    };
  11.266 -    const ggi_directbuffer *db;
  11.267 -    ggi_color pal[256];
  11.268 -    int err;
  11.269 -
  11.270 -    fprintf(stderr, "GGI_SetVideoMode()\n");
  11.271 -
  11.272 -    mode.visible.x = mode.virt.x = width;
  11.273 -    mode.visible.y = mode.virt.y = height;
  11.274 -
  11.275 -    /* Translate requested SDL bit depth into a GGI mode */
  11.276 -    switch (bpp) {
  11.277 -    case 1:
  11.278 -        mode.graphtype = GT_1BIT;
  11.279 -        break;
  11.280 -    case 2:
  11.281 -        mode.graphtype = GT_2BIT;
  11.282 -        break;
  11.283 -    case 4:
  11.284 -        mode.graphtype = GT_4BIT;
  11.285 -        break;
  11.286 -    case 8:
  11.287 -        mode.graphtype = GT_8BIT;
  11.288 -        break;
  11.289 -    case 15:
  11.290 -        mode.graphtype = GT_15BIT;
  11.291 -        break;
  11.292 -    case 16:
  11.293 -        mode.graphtype = GT_16BIT;
  11.294 -        break;
  11.295 -    case 24:
  11.296 -        mode.graphtype = GT_24BIT;
  11.297 -        break;
  11.298 -    case 32:
  11.299 -        mode.graphtype = GT_32BIT;
  11.300 -        break;
  11.301 -    default:
  11.302 -        SDL_SetError("Unknown SDL bit depth, using GT_AUTO....\n");
  11.303 -        mode.graphtype = GT_AUTO;
  11.304 -    }
  11.305 -
  11.306 -    /* Validate mode, autodetecting any GGI_AUTO or GT_AUTO fields */
  11.307 -    ggiCheckMode(VIS, &mode);
  11.308 -
  11.309 -    /* At this point we should have a valid mode - try to set it */
  11.310 -    err = ggiSetMode(VIS, &mode);
  11.311 -
  11.312 -    /* If we couldn't set _any_ modes, something is very wrong */
  11.313 -    if (err) {
  11.314 -        SDL_SetError("Can't set a mode!\n");
  11.315 -        ggiClose(VIS);
  11.316 -        ggiExit();
  11.317 -        GGI_VideoQuit(NULL);
  11.318 -    }
  11.319 -
  11.320 -    /* Set a palette for palletized modes */
  11.321 -    if (GT_SCHEME(mode.graphtype) == GT_PALETTE) {
  11.322 -        ggiSetColorfulPalette(VIS);
  11.323 -        ggiGetPalette(VIS, 0, 1 << bpp, pal);
  11.324 -    }
  11.325 -
  11.326 -    db = ggiDBGetBuffer(VIS, 0);
  11.327 -
  11.328 -    /* Set up the new mode framebuffer */
  11.329 -    current->flags = (SDL_FULLSCREEN | SDL_HWSURFACE);
  11.330 -    current->w = mode.virt.x;
  11.331 -    current->h = mode.virt.y;
  11.332 -    current->pitch = db->buffer.plb.stride;
  11.333 -    current->pixels = db->read;
  11.334 -
  11.335 -    /* Set the blit function */
  11.336 -    this->UpdateRects = GGI_DirectUpdate;
  11.337 -
  11.338 -    /* We're done */
  11.339 -    return (current);
  11.340 -}
  11.341 -
  11.342 -static int
  11.343 -GGI_AllocHWSurface(_THIS, SDL_Surface * surface)
  11.344 -{
  11.345 -    return (-1);
  11.346 -}
  11.347 -static void
  11.348 -GGI_FreeHWSurface(_THIS, SDL_Surface * surface)
  11.349 -{
  11.350 -    return;
  11.351 -}
  11.352 -static int
  11.353 -GGI_LockHWSurface(_THIS, SDL_Surface * surface)
  11.354 -{
  11.355 -    return (0);
  11.356 -}
  11.357 -static void
  11.358 -GGI_UnlockHWSurface(_THIS, SDL_Surface * surface)
  11.359 -{
  11.360 -    return;
  11.361 -}
  11.362 -
  11.363 -static void
  11.364 -GGI_DirectUpdate(_THIS, int numrects, SDL_Rect * rects)
  11.365 -{
  11.366 -    int i;
  11.367 -
  11.368 -/*	ggiFlush(VIS); */
  11.369 -
  11.370 -    for (i = 0; i < numrects; i++) {
  11.371 -        ggiFlushRegion(VIS, rects[i].x, rects[i].y, rects[i].w, rects[i].h);
  11.372 -    }
  11.373 -    return;
  11.374 -}
  11.375 -
  11.376 -int
  11.377 -GGI_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color * colors)
  11.378 -{
  11.379 -    int i;
  11.380 -    ggi_color pal[256];
  11.381 -
  11.382 -    /* Set up the colormap */
  11.383 -    for (i = 0; i < ncolors; i++) {
  11.384 -        pal[i].r = (colors[i].r << 8) | colors[i].r;
  11.385 -        pal[i].g = (colors[i].g << 8) | colors[i].g;
  11.386 -        pal[i].b = (colors[i].b << 8) | colors[i].b;
  11.387 -    }
  11.388 -
  11.389 -    ggiSetPalette(VIS, firstcolor, ncolors, pal);
  11.390 -
  11.391 -    return 1;
  11.392 -}
  11.393 -
  11.394 -void
  11.395 -GGI_VideoQuit(_THIS)
  11.396 -{
  11.397 -}
  11.398 -void
  11.399 -GGI_FinalQuit(void)
  11.400 -{
  11.401 -}
  11.402 -
  11.403 -/* vi: set ts=4 sw=4 expandtab: */
    12.1 --- a/src/video/ggi/SDL_ggivideo.h	Thu Aug 10 14:55:45 2006 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,49 +0,0 @@
    12.4 -/*
    12.5 -    SDL - Simple DirectMedia Layer
    12.6 -    Copyright (C) 1997-2006 Sam Lantinga
    12.7 -
    12.8 -    This library is free software; you can redistribute it and/or
    12.9 -    modify it under the terms of the GNU Lesser General Public
   12.10 -    License as published by the Free Software Foundation; either
   12.11 -    version 2.1 of the License, or (at your option) any later version.
   12.12 -
   12.13 -    This library is distributed in the hope that it will be useful,
   12.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12.16 -    Lesser General Public License for more details.
   12.17 -
   12.18 -    You should have received a copy of the GNU Lesser General Public
   12.19 -    License along with this library; if not, write to the Free Software
   12.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   12.21 -
   12.22 -    Sam Lantinga
   12.23 -    slouken@libsdl.org
   12.24 -*/
   12.25 -#include "SDL_config.h"
   12.26 -
   12.27 -#ifndef _SDL_ggivideo_h
   12.28 -#define _SDL_ggivideo_h
   12.29 -
   12.30 -#include <ggi/ggi.h>
   12.31 -
   12.32 -#include "SDL_mouse.h"
   12.33 -#include "../SDL_sysvideo.h"
   12.34 -
   12.35 -#define _THIS SDL_VideoDevice *this
   12.36 -
   12.37 -/* Private display data */
   12.38 -
   12.39 -struct SDL_PrivateVideoData
   12.40 -{
   12.41 -    ggi_visual_t *ggivis;
   12.42 -};
   12.43 -
   12.44 -extern ggi_visual_t VIS;        /* FIXME: use the private data struct */
   12.45 -
   12.46 -extern int SDL_OpenKeyboard(void);
   12.47 -extern void SDL_CloseKeyboard(void);
   12.48 -extern int SDL_OpenMouse(void);
   12.49 -extern void SDL_CloseMouse(void);
   12.50 -
   12.51 -#endif /* _SDL_ggivideo_h */
   12.52 -/* vi: set ts=4 sw=4 expandtab: */