notaz.gp2x.de
/
sdl_omap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
standalone: refactor for becoming also a SDL driver
[sdl_omap.git]
/
src
/
video
/
omapdss
/
input.c
diff --git
a/src/video/omapdss/pmsdl_input.c
b/src/video/omapdss/input.c
similarity index 94%
rename from
src/video/omapdss/pmsdl_input.c
rename to
src/video/omapdss/input.c
index
1eb4235
..
6fb8884
100644
(file)
--- a/
src/video/omapdss/pmsdl_input.c
+++ b/
src/video/omapdss/input.c
@@
-1,8
+1,15
@@
+/*
+ * (C) notaz, 2010
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
#include <strings.h>
#include <SDL/SDL.h>
#include <linux/input.h>
#include <strings.h>
#include <SDL/SDL.h>
#include <linux/input.h>
-#include "
pm
sdl.h"
+#include "
omap
sdl.h"
#include "common/input.h"
static unsigned char g_keystate[SDLK_LAST];
#include "common/input.h"
static unsigned char g_keystate[SDLK_LAST];
@@
-333,7
+340,7
@@
static const char *sdl_keynames[SDLK_LAST] = {
DNKEY(COMPOSE),
};
DNKEY(COMPOSE),
};
-void
pm
sdl_input_bind(const char *kname, const char *sdlname)
+void
omap
sdl_input_bind(const char *kname, const char *sdlname)
{
int i, kc;
{
int i, kc;
@@
-363,14
+370,15
@@
bad_sdlkey:
err("can't resolve SDL key '%s'", sdlname);
}
err("can't resolve SDL key '%s'", sdlname);
}
-void
pm
sdl_input_init(void)
+void
omap
sdl_input_init(void)
{
in_init();
in_probe();
}
{
in_init();
in_probe();
}
-
static int do_event(SDL_Event *event
, int timeout)
+
int omapsdl_input_get_event(void *event_
, int timeout)
{
{
+ SDL_Event *event = event_;
int key, is_down;
while (1) {
int key, is_down;
while (1) {
@@
-402,12
+410,14
@@
static int do_event(SDL_Event *event, int timeout)
}
/* SDL */
}
/* SDL */
+#ifdef STANDALONE
+
DECLSPEC int SDLCALL
SDL_WaitEvent(SDL_Event *event)
{
trace("%p", event);
DECLSPEC int SDLCALL
SDL_WaitEvent(SDL_Event *event)
{
trace("%p", event);
- return
do
_event(event, -1);
+ return
omapsdl_input_get
_event(event, -1);
}
DECLSPEC int SDLCALL
}
DECLSPEC int SDLCALL
@@
-415,7
+425,7
@@
SDL_PollEvent(SDL_Event *event)
{
trace("%p", event);
{
trace("%p", event);
- return
do
_event(event, 0);
+ return
omapsdl_input_get
_event(event, 0);
}
DECLSPEC Uint8 * SDLCALL
}
DECLSPEC Uint8 * SDLCALL
@@
-505,3
+515,4
@@
SDL_JoystickOpen(int device_index)
return NULL;
}
return NULL;
}
+#endif // STANDALONE