notaz.gp2x.de
/
ginge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wiz port. Lots of refactoring, some bugfixes
[ginge.git]
/
loader
/
host_pnd.c
diff --git
a/loader/host_pnd.c
b/loader/host_pnd.c
index
a3d4215
..
9064047
100644
(file)
--- a/
loader/host_pnd.c
+++ b/
loader/host_pnd.c
@@
-11,12
+11,12
@@
#include <linux/input.h>
#include "header.h"
#include <linux/input.h>
#include "header.h"
+#include "realfuncs.h"
static int ifds[2] = { -1, -1 };
static int ifds[2] = { -1, -1 };
-static int init_done;
static int keystate;
static int keystate;
-
static void
init(void)
+
int host_
init(void)
{
char buff[64];
int i, ifd, ret;
{
char buff[64];
int i, ifd, ret;
@@
-46,7
+46,8
@@
static void init(void)
fprintf(stderr, PFX "missing buttons\n");
if (ifds[1] < 0)
fprintf(stderr, PFX "missing keypad\n");
fprintf(stderr, PFX "missing buttons\n");
if (ifds[1] < 0)
fprintf(stderr, PFX "missing keypad\n");
- init_done = 1;
+
+ return 0;
}
static const struct {
}
static const struct {
@@
-83,9
+84,6
@@
int host_read_btns(void)
struct input_event ev;
int i, ret;
struct input_event ev;
int i, ret;
- if (!init_done)
- init();
-
while (1)
{
ret = read(ifds[0], &ev, sizeof(ev));
while (1)
{
ret = read(ifds[0], &ev, sizeof(ev));