Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Removed old touchscreen system, starting to implement mouse-based tou…
Browse files Browse the repository at this point in the history
…chscreen. Also, more work on a non-software-rendering video driver
  • Loading branch information
Darren Alton committed Jul 10, 2008
1 parent 3e37058 commit 1d02a71
Show file tree
Hide file tree
Showing 14 changed files with 233 additions and 1,129 deletions.
3 changes: 0 additions & 3 deletions Makefile.ds
Expand Up @@ -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 \
Expand Down
1 change: 0 additions & 1 deletion include/SDL.h
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions include/SDL_config_nintendods.h
Expand Up @@ -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
Expand Down
25 changes: 0 additions & 25 deletions include/SDL_events.h
Expand Up @@ -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"
Expand Down Expand Up @@ -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... */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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 */
Expand Down
153 changes: 0 additions & 153 deletions include/SDL_touchscreen.h

This file was deleted.

25 changes: 0 additions & 25 deletions src/SDL.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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();
Expand Down
15 changes: 0 additions & 15 deletions src/events/SDL_events.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 1d02a71

Please sign in to comment.