diff --git a/arch/nds/event.c b/arch/nds/event.c index 8defc893..3b9dbc5f 100644 --- a/arch/nds/event.c +++ b/arch/nds/event.c @@ -116,14 +116,7 @@ static void do_unicode_key_event(struct buffered_status *status, bool down, { if(down) { - status->keymap[code] = 1; - status->key_pressed = code; - status->key = code; - status->key_repeat = code; - status->unicode = unicode; - status->unicode_repeat = unicode; - status->keypress_time = get_ticks(); - status->key_release = IKEY_UNKNOWN; + key_press(status, code, unicode); } else { diff --git a/arch/pandora/Makefile.in b/arch/pandora/Makefile.in new file mode 100644 index 00000000..53cfde13 --- /dev/null +++ b/arch/pandora/Makefile.in @@ -0,0 +1,28 @@ +TOOLCHAIN ?= /usr/local/pandora/arm-2009q3 +CROSS_COMPILE ?= $(TOOLCHAIN)/bin/arm-none-linux-gnueabi- +PANDORA_LIBPATH ?= $(PREFIX)/lib +PANDORA_INCPATH ?= $(PREFIX)/include + +CC = $(CROSS_COMPILE)gcc +CXX = $(CROSS_COMPILE)g++ +AR = $(CROSS_COMPILE)ar +OBJCOPY = $(CROSS_COMPILE)objcopy +STRIP = $(CROSS_COMPILE)strip --strip-unneeded + +ARCH_CFLAGS = -march=armv7-a -mtune=cortex-a8 -fPIC -I$(PANDORA_INCPATH) +ARCH_CXXFLAGS = $(ARCH_CFLAGS) + +ARCH_LDFLAGS = -L$(PANDORA_LIBPATH) + +LIBPNG_CFLAGS = -I$(PANDORA_INCPATH)/libpng12 +LIBPNG_LDFLAGS = -lpng12 -lz +SDL_CFLAGS = `$(TOOLCHAIN)/usr/bin/sdl-config --cflags` +SDL_LDFLAGS = `$(TOOLCHAIN)/usr/bin/sdl-config --libs` + +DSOLDFLAGS = -shared +DSOPRE = lib +DSOPOST = .so +DSORPATH = -Wl,-rpath,$(LIBDIR) +DSOSONAME = -Wl,-soname, + +include arch/zip.inc diff --git a/arch/pandora/README b/arch/pandora/README new file mode 100644 index 00000000..15390ca6 --- /dev/null +++ b/arch/pandora/README @@ -0,0 +1 @@ +WRITE ME diff --git a/arch/wii/event.c b/arch/wii/event.c index b89d8980..30215733 100644 --- a/arch/wii/event.c +++ b/arch/wii/event.c @@ -763,14 +763,7 @@ static bool process_event(union event *ev) enum keycode skey = input.joystick_button_map[ev->button.pad][button]; if(skey && (status->keymap[skey] == 0)) { - status->key_pressed = skey; - status->key = skey; - status->unicode = skey; - status->key_repeat = skey; - status->unicode_repeat = skey; - status->keymap[skey] = 1; - status->keypress_time = get_ticks(); - status->key_release = IKEY_UNKNOWN; + key_press(status, skey, skey); rval = true; } } @@ -818,10 +811,7 @@ static bool process_event(union event *ev) enum keycode skey = input.joystick_button_map[ev->button.pad][button]; if(skey) { - status->keymap[skey] = 0; - status->key_repeat = IKEY_UNKNOWN; - status->unicode_repeat = 0; - status->key_release = skey; + key_release(status, skey); rval = true; } } @@ -857,23 +847,12 @@ static bool process_event(union event *ev) if(skey) { if(status->keymap[skey] == 0) - { - status->key_pressed = skey; - status->key = skey; - status->unicode = skey; - status->key_repeat = skey; - status->unicode_repeat = skey; - status->keymap[skey] = 1; - status->keypress_time = get_ticks(); - status->key_release = IKEY_UNKNOWN; - } + key_press(status, skey, skey); + if(last_axis == (digital_value ^ 1)) { skey = input.joystick_axis_map[ev->axis.pad][axis][last_axis]; - status->keymap[skey] = 0; - status->key_repeat = IKEY_UNKNOWN; - status->unicode_repeat = 0; - status->key_release = skey; + key_release(status, skey); } } } @@ -883,12 +862,7 @@ static bool process_event(union event *ev) { skey = input.joystick_axis_map[ev->axis.pad][axis][last_axis]; if(skey) - { - status->keymap[skey] = 0; - status->key_repeat = IKEY_UNKNOWN; - status->unicode_repeat = 0; - status->key_release = skey; - } + key_release(status, skey); } } status->axis[ev->axis.pad][axis] = digital_value; @@ -961,14 +935,7 @@ static bool process_event(union event *ev) } } - status->keymap[ckey] = 1; - status->key_pressed = ckey; - status->key = ckey; - status->unicode = ev->key.unicode; - status->key_repeat = ckey; - status->unicode_repeat = status->unicode; - status->keypress_time = get_ticks(); - status->key_release = IKEY_UNKNOWN; + key_press(status, skey, ev->key.unicode); break; } case EVENT_KEY_UP: diff --git a/config.sh b/config.sh index 85243fba..f86b23d7 100755 --- a/config.sh +++ b/config.sh @@ -28,6 +28,7 @@ usage() { echo " wii Experimental Wii port" echo " amiga Experimental AmigaOS 4 port" echo " android Experimental Android port" + echo " pandora Experimental Pandora port" echo echo "Supported