Mercurial > sdl-ios-xcode
diff src/video/directfb/SDL_DirectFB_events.c @ 2998:d364ee9b9c15
Date: Sun, 04 Jan 2009 20:53:30 +0100
From: Couriersud
Subject: SDL1.3 DirectFB patches
The attached contains the following directfb changes:
- Dynamic loading of libdirectfb.so. This may to turned off as well in configure
- Use linux-input by default. May be switched off by environment variable.
- Added some code which will use directfb's x11 backend when DISPLAY is set.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 04 Jan 2009 23:43:33 +0000 |
parents | 6ce28e5287e9 |
children | 8f4ed5ec2b06 |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_events.c Sun Jan 04 23:41:09 2009 +0000 +++ b/src/video/directfb/SDL_DirectFB_events.c Sun Jan 04 23:43:33 2009 +0000 @@ -144,7 +144,7 @@ if (evt.clazz == DFEC_WINDOW) { switch (evt.type) { case DWET_BUTTONDOWN: - if (!LINUX_INPUT_SUPPORT) { + if (!devdata->use_linux_input) { SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx, evt.cy, 0); SDL_SendMouseButton(devdata->mouse_id[0], SDL_PRESSED, @@ -155,7 +155,7 @@ } break; case DWET_BUTTONUP: - if (!LINUX_INPUT_SUPPORT) { + if (!devdata->use_linux_input) { SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx, evt.cy, 0); SDL_SendMouseButton(devdata->mouse_id[0], @@ -167,7 +167,7 @@ } break; case DWET_MOTION: - if (!LINUX_INPUT_SUPPORT) { + if (!devdata->use_linux_input) { if (!(w->flags & SDL_WINDOW_INPUT_GRABBED)) SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx, evt.cy, 0); @@ -183,7 +183,7 @@ } break; case DWET_KEYDOWN: - if (!LINUX_INPUT_SUPPORT) { + if (!devdata->use_linux_input) { DirectFB_TranslateKey(_this, &evt, &keysym); SDL_SendKeyboardKey(0, SDL_PRESSED, keysym.scancode); if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { @@ -196,7 +196,7 @@ } break; case DWET_KEYUP: - if (!LINUX_INPUT_SUPPORT) { + if (!devdata->use_linux_input) { DirectFB_TranslateKey(_this, &evt, &keysym); SDL_SendKeyboardKey(0, SDL_RELEASED, keysym.scancode); } @@ -260,7 +260,7 @@ switch (ievt.type) { case DIET_AXISMOTION: - if (!LINUX_INPUT_SUPPORT) { + if (!devdata->use_linux_input) { if ((grabbed_window >= 0) && (ievt.flags & DIEF_AXISREL)) { printf("rel devid %d\n", ievt.device_id); if (ievt.axis == DIAI_X) @@ -273,7 +273,7 @@ } break; } - if (LINUX_INPUT_SUPPORT) { + if (devdata->use_linux_input) { IDirectFBInputDevice *idev; static int last_x, last_y; @@ -600,7 +600,7 @@ DirectFB_InitOSKeymap(_this, &oskeymap[0], SDL_arraysize(oskeymap)); devdata->num_keyboard = 0; - if (LINUX_INPUT_SUPPORT) { + if (devdata->use_linux_input) { sys_ids = 0; SDL_DFB_CHECK(devdata->dfb-> EnumInputDevices(devdata->dfb, EnumKeyboards, devdata));