From 6039eb05ba6d82ef56f2868c96654c552d117bf9 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Wed, 7 Feb 2018 20:04:46 -0500 Subject: sdl: remove non-rockbox drivers We never use any of these other drivers, so having them around just takes up space. Change-Id: Iced812162df1fef3fd55522b7e700acb6c3bcd41 --- apps/plugins/sdl/src/video/ggi/SDL_ggievents.c | 264 ------------------------- 1 file changed, 264 deletions(-) delete mode 100644 apps/plugins/sdl/src/video/ggi/SDL_ggievents.c (limited to 'apps/plugins/sdl/src/video/ggi/SDL_ggievents.c') diff --git a/apps/plugins/sdl/src/video/ggi/SDL_ggievents.c b/apps/plugins/sdl/src/video/ggi/SDL_ggievents.c deleted file mode 100644 index d963fe16bc..0000000000 --- a/apps/plugins/sdl/src/video/ggi/SDL_ggievents.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -/* Handle the event stream, converting GGI events into SDL events */ - -#include -#include -#include -#include -#include - -#include - -#include "SDL_ggikeys.h" - -#include "SDL.h" -#include "../SDL_sysvideo.h" -#include "../../events/SDL_sysevents.h" -#include "../../events/SDL_events_c.h" -#include "SDL_ggivideo.h" -#include "SDL_ggievents_c.h" - -/* The translation tables from a GGI keycode to a SDL keysym */ -static SDLKey keymap[128]; -static SDL_keysym *GGI_TranslateKey(ggi_event *ev, SDL_keysym *keysym); - -static int posted = 0; - -void GGI_PumpEvents(_THIS) -{ - struct timeval *tvp, tv = { 0, 0 }; - ggi_event ev; - - tvp = &tv; - -/* ggiFlush(VIS); */ - - while (ggiEventPoll(VIS, emAll, tvp)) -/* while (ggiEventPoll(VIS, (emKeyboard | emPointer | emCommand), tvp)) */ - { - int queueevent_mouse = 0, queueevent_kbd = 0; - static int buttons = 0; - static int mouse_x = 0, mouse_y = 0, mouse_z = 0; - int x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0; - int pressed_mouse, pressed_kbd; - SDL_keysym keysym; - - posted = 0; - - /* FIXME: We do not actually want all events, only - * mouse and keyboard events. Having to handle all - * events will slow things down. */ - - ggiEventRead(VIS, &ev, emAll); -/* ggiEventRead(VIS, &ev, (emKeyboard | emPointer | emCommand)); */ - - switch (ev.any.type) - { - case evPtrRelative: - x = ev.pmove.x; - y = ev.pmove.y; - z = ev.pmove.wheel; - posted += SDL_PrivateMouseMotion(0, 1, x, y); - break; - case evPtrAbsolute: - if (mouse_x != ev.pmove.x || mouse_y != ev.pmove.y || mouse_z != ev.pmove.wheel) - { - x = ev.pmove.x - mouse_x; - y = ev.pmove.y - mouse_y; - z = ev.pmove.wheel - mouse_z; - mouse_x = ev.pmove.x; - mouse_y = ev.pmove.y; - mouse_z = ev.pmove.wheel; - posted += SDL_PrivateMouseMotion(0, 1, x, y); - } - break; - case evPtrButtonPress: - posted += SDL_PrivateMouseButton(SDL_PRESSED, ev.pbutton.button, 0, 0); - break; - case evPtrButtonRelease: - posted += SDL_PrivateMouseButton(SDL_RELEASED, ev.pbutton.button, 0, 0); - break; - case evKeyPress: - case evKeyRepeat: - posted += SDL_PrivateKeyboard(SDL_PRESSED, GGI_TranslateKey(&ev, &keysym)); - break; - case evKeyRelease: - posted += SDL_PrivateKeyboard(SDL_RELEASED, GGI_TranslateKey(&ev, &keysym)); - break; - case evCommand: - fprintf(stderr, "Command event %x recieved\n", ev.cmd.code); - break; - default: - fprintf(stderr, "Unhandled event type %d\n", ev.any.type); - break; - } - } - -} - -void GGI_InitOSKeymap(_THIS) -{ - int i; - - /* Initialize the GGI key translation table */ - for ( i=0; iscancode = ev->key.button; - keysym->sym = keymap[ev->key.button]; - keysym->mod = KMOD_NONE; - - /* If UNICODE is on, get the UNICODE value for the key */ - keysym->unicode = 0; - if (SDL_TranslateUNICODE) - { - keysym->unicode = GII_UNICODE(ev->key.sym); - } - - return keysym; -} -- cgit v1.2.3