Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Removed old touchscreen system, starting to implement mouse-based tou…
…chscreen. Also, more work on a non-software-rendering video driver
  • Loading branch information
Darren Alton committed Jul 10, 2008
1 parent 3e37058 commit 1d02a7168ef044def361bcca055c643e39345fbe
@@ -51,9 +51,6 @@ src/events/SDL_windowevents.c \
src/file/SDL_rwops.c \
src/joystick/nds/SDL_sysjoystick.c \
src/joystick/SDL_joystick.c \
src/touchscreen/nds/SDL_systouchscreen.c \
src/touchscreen/dummy/SDL_systouchscreen.c \
src/touchscreen/SDL_touchscreen.c \
src/stdlib/SDL_getenv.c \
src/stdlib/SDL_iconv.c \
src/stdlib/SDL_malloc.c \
@@ -109,7 +109,6 @@ extern "C" {
#define SDL_INIT_VIDEO 0x00000020
#define SDL_INIT_CDROM 0x00000100
#define SDL_INIT_JOYSTICK 0x00000200
#define SDL_INIT_TOUCHSCREEN 0x00000400
#define SDL_INIT_NOPARACHUTE 0x00100000 /* Don't catch fatal signals */
#define SDL_INIT_EVENTTHREAD 0x01000000 /* Not supported on all OS's */
#define SDL_INIT_EVERYTHING 0x0000FFFF
@@ -100,8 +100,6 @@ typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
/* Enable various input drivers */
#define SDL_JOYSTICK_NDS 1
/*#define SDL_JOYSTICK_DUMMY 1*/
#define SDL_TOUCHSCREEN_NDS 1
/*#define SDL_TOUCHSCREEN_DUMMY 1*/

/* DS has no dynamic linking afaik */
#define SDL_LOADSO_DISABLED 1
@@ -35,7 +35,6 @@
#include "SDL_keyboard.h"
#include "SDL_mouse.h"
#include "SDL_joystick.h"
#include "SDL_touchscreen.h"
#include "SDL_quit.h"

#include "begin_code.h"
@@ -71,9 +70,6 @@ typedef enum
SDL_JOYHATMOTION, /**< Joystick hat position change */
SDL_JOYBUTTONDOWN, /**< Joystick button pressed */
SDL_JOYBUTTONUP, /**< Joystick button released */
SDL_TOUCHPRESSED, /**< Touchscreen pressed */
SDL_TOUCHRELEASED, /**< Touchscreen no longer pressed */
SDL_TOUCHMOTION, /**< Touchscreen point motion */
SDL_QUIT, /**< User-requested quit */
SDL_SYSWMEVENT, /**< System specific event */
SDL_EVENT_RESERVED1, /**< Reserved for future use... */
@@ -115,11 +111,6 @@ typedef enum
SDL_EVENTMASK(SDL_JOYBALLMOTION) |
SDL_EVENTMASK(SDL_JOYHATMOTION) |
SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP),
SDL_TOUCHPRESSEDMASK = SDL_EVENTMASK(SDL_TOUCHPRESSED),
SDL_TOUCHRELEASEDMASK = SDL_EVENTMASK(SDL_TOUCHRELEASED),
SDL_TOUCHMOTIONMASK = SDL_EVENTMASK(SDL_TOUCHMOTION),
SDL_TOUCHEVENTMASK = SDL_EVENTMASK(SDL_TOUCHPRESSED) |
SDL_EVENTMASK(SDL_TOUCHRELEASED) | SDL_EVENTMASK(SDL_TOUCHMOTION),
SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT)
} SDL_EventMask;
@@ -272,21 +263,6 @@ typedef struct SDL_JoyButtonEvent
Uint8 state; /**< SDL_PRESSED or SDL_RELEASED */
} SDL_JoyButtonEvent;

/**
* \struct SDL_TouchEvent
*
* \brief Touchscreen motion event structure (event.touch.*)
*/
typedef struct SDL_TouchEvent
{
Uint8 type; /**< SDL_TOUCHMOTION, SDL_TOUCHPRESS, SDL_TOUCHRELEASED */
Uint8 which; /**< The touchscreen device index */
int point; /**< The touch point index, relevant for multitouch. */
int xpos; /**< The X coordinate of the touch point. */
int ypos; /**< The Y coordinate of the touch point. */
int pressure; /**< The pressure of the touch */
} SDL_TouchEvent;

/**
* \struct SDL_QuitEvent
*
@@ -358,7 +334,6 @@ typedef union SDL_Event
SDL_JoyBallEvent jball; /**< Joystick ball event data */
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
SDL_TouchEvent touch; /**< Touchscreen event data */
SDL_QuitEvent quit; /**< Quit request event data */
SDL_UserEvent user; /**< Custom event data */
SDL_SysWMEvent syswm; /**< System dependent window event data */

This file was deleted.

@@ -38,10 +38,6 @@
extern int SDL_JoystickInit(void);
extern void SDL_JoystickQuit(void);
#endif
#if !SDL_TOUCHSCREEN_DISABLED
extern int SDL_TouchscreenInit(void);
extern void SDL_TouchscreenQuit(void);
#endif
#if !SDL_CDROM_DISABLED
extern int SDL_CDROMInit(void);
extern void SDL_CDROMQuit(void);
@@ -127,21 +123,6 @@ SDL_InitSubSystem(Uint32 flags)
}
#endif

#if !SDL_TOUCHSCREEN_DISABLED
/* Initialize the touchscreen subsystem */
if ((flags & SDL_INIT_TOUCHSCREEN) && !(SDL_initialized & SDL_INIT_TOUCHSCREEN)) {
if (SDL_TouchscreenInit() < 0) {
return (-1);
}
SDL_initialized |= SDL_INIT_TOUCHSCREEN;
}
#else
if (flags & SDL_INIT_TOUCHSCREEN) {
SDL_SetError("SDL not built with touchscreen support");
return (-1);
}
#endif

#if !SDL_CDROM_DISABLED
/* Initialize the CD-ROM subsystem */
if ((flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM)) {
@@ -199,12 +180,6 @@ SDL_QuitSubSystem(Uint32 flags)
SDL_initialized &= ~SDL_INIT_JOYSTICK;
}
#endif
#if !SDL_TOUCHSCREEN_DISABLED
if ((flags & SDL_initialized & SDL_INIT_TOUCHSCREEN)) {
SDL_TouchscreenQuit();
SDL_initialized &= ~SDL_INIT_TOUCHSCREEN;
}
#endif
#if !SDL_TIMERS_DISABLED
if ((flags & SDL_initialized & SDL_INIT_TIMER)) {
SDL_TimerQuit();
@@ -31,9 +31,6 @@
#if !SDL_JOYSTICK_DISABLED
#include "../joystick/SDL_joystick_c.h"
#endif
#if !SDL_TOUCHSCREEN_DISABLED
#include "../touchscreen/SDL_touchscreen_c.h"
#endif

/* Public data -- the event filter */
SDL_EventFilter SDL_EventOK = NULL;
@@ -120,12 +117,6 @@ SDL_GobbleEvents(void *unused)
SDL_JoystickUpdate();
}
#endif
#if !SDL_TOUCHSCREEN_DISABLED
/* Similarly, check for touchscreen state change */
if (SDL_numtouchscreens && (SDL_eventstate & SDL_TOUCHEVENTMASK)) {
SDL_TouchscreenUpdate();
}
#endif

/* Give up the CPU for the rest of our timeslice */
SDL_EventLock.safe = 1;
@@ -396,12 +387,6 @@ SDL_PumpEvents(void)
if (SDL_numjoysticks && (SDL_eventstate & SDL_JOYEVENTMASK)) {
SDL_JoystickUpdate();
}
#endif
#if !SDL_TOUCHSCREEN_DISABLED
/* Check for touchscreen state change */
if (SDL_numtouchscreens && (SDL_eventstate & SDL_TOUCHEVENTMASK)) {
SDL_TouchscreenUpdate();
}
#endif
}
}

0 comments on commit 1d02a71

Please sign in to comment.