aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--frontend/main.c9
-rw-r--r--frontend/plugin_lib.c5
-rw-r--r--frontend/xkb.c138
4 files changed, 5 insertions, 162 deletions
diff --git a/Makefile b/Makefile
index e904128..d0e4bef 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,9 @@ endif
CC_LINK = $(CC)
LDFLAGS += $(MAIN_LDFLAGS)
LDLIBS += $(MAIN_LDLIBS)
+ifdef PCNT
+CFLAGS += -DPCNT
+endif
# core
OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/debug.o \
@@ -186,18 +189,10 @@ else
CFLAGS += -DNO_FRONTEND
endif
-ifdef X11
-frontend/%.o: CFLAGS += -DX11
-OBJS += frontend/xkb.o
-endif
-ifdef PCNT
-CFLAGS += -DPCNT
-endif
-
# misc
OBJS += frontend/main.o frontend/plugin.o
-frontend/%.o: CFLAGS += -DIN_EVDEV
+
frontend/menu.o frontend/main.o frontend/plat_sdl.o: frontend/revision.h
frontend/libpicofe/%.c:
@@ -205,7 +200,6 @@ frontend/libpicofe/%.c:
@echo "git submodule init && git submodule update"
@exit 1
-
libpcsxcore/gte_nf.o: libpcsxcore/gte.c
$(CC) -c -o $@ $^ $(CFLAGS) -DFLAGLESS
@@ -217,6 +211,7 @@ frontend/revision.h: FORCE
%.o: %.S
$(CC) $(CFLAGS) -c $^ -o $@
+
target_: $(TARGET)
$(TARGET): $(OBJS)
diff --git a/frontend/main.c b/frontend/main.c
index 24e1f12..a71ddea 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -860,15 +860,6 @@ void *SysLoadLibrary(const char *lib) {
return (void *)(long)(PLUGIN_DL_BASE + builtin_plugin_ids[i]);
}
-#if defined(__x86_64__) || defined(__i386__)
- // convenience hack
- if (strstr(lib, ".x86") == NULL) {
- char name[MAXPATHLEN];
- snprintf(name, sizeof(name), "%s.x86_64", lib);
- lib = name;
- }
-#endif
-
ret = dlopen(lib, RTLD_NOW);
if (ret == NULL)
fprintf(stderr, "dlopen: %s\n", dlerror());
diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c
index 79f41fe..5017a1b 100644
--- a/frontend/plugin_lib.c
+++ b/frontend/plugin_lib.c
@@ -474,11 +474,6 @@ static void update_input(void)
emu_set_action(emu_act);
in_keystate = actions[IN_BINDTYPE_PLAYER12];
-#ifdef X11
- extern int x11_update_keys(unsigned int *action);
- in_keystate |= x11_update_keys(&emu_act);
- emu_set_action(emu_act);
-#endif
}
#else /* MAEMO */
static void update_input(void)
diff --git a/frontend/xkb.c b/frontend/xkb.c
deleted file mode 100644
index f015dd0..0000000
--- a/frontend/xkb.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2009, Wei Mingzhi <whistler@openoffice.org>.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses>.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-#include <X11/XKBlib.h>
-
-#include "main.h"
-#include "plugin_lib.h"
-
-static const struct {
- uint16_t xkey, psxkey;
-} keymap[] = {
- { XK_Left, DKEY_LEFT },
- { XK_Right, DKEY_RIGHT },
- { XK_Up, DKEY_UP },
- { XK_Down, DKEY_DOWN },
- { XK_z, DKEY_CROSS },
- { XK_s, DKEY_SQUARE },
- { XK_x, DKEY_CIRCLE },
- { XK_d, DKEY_TRIANGLE },
- { XK_w, DKEY_L1 },
- { XK_r, DKEY_R1 },
- { XK_e, DKEY_L2 },
- { XK_t, DKEY_R2 },
- { XK_c, DKEY_SELECT },
- { XK_v, DKEY_START },
-
- { XK_F6, 32 + SACTION_SAVE_STATE },
- { XK_F7, 32 + SACTION_PREV_SSLOT },
- { XK_F8, 32 + SACTION_NEXT_SSLOT },
- { XK_F9, 32 + SACTION_LOAD_STATE },
-};
-
-static Atom wmprotocols, wmdelwindow;
-static int initialized;
-
-static void InitKeyboard(void) {
- Display *disp = (Display *)gpuDisp;
- if (disp == NULL) {
- fprintf(stderr, "xkb: null display\n");
- exit(1);
- }
-
- wmprotocols = XInternAtom(disp, "WM_PROTOCOLS", 0);
- wmdelwindow = XInternAtom(disp, "WM_DELETE_WINDOW", 0);
-
- XkbSetDetectableAutoRepeat(disp, 1, NULL);
-}
-
-static void DestroyKeyboard(void) {
- Display *disp = (Display *)gpuDisp;
- if (disp)
- XkbSetDetectableAutoRepeat(disp, 0, NULL);
-}
-
-int x11_update_keys(unsigned int *action) {
- uint8_t i;
- XEvent evt;
- XClientMessageEvent *xce;
- uint16_t Key;
- static int keystate_x11;
- int psxkey, leave = 0;
- Display *disp = (Display *)gpuDisp;
-
- if (!disp)
- return 0;
-
- if (!initialized) {
- initialized++;
- InitKeyboard();
- }
-
- while (XPending(disp)) {
- XNextEvent(disp, &evt);
- switch (evt.type) {
- case KeyPress:
- case KeyRelease:
- Key = XLookupKeysym((XKeyEvent *)&evt, 0);
- //printf("%s %x\n", evt.type == KeyPress ? "press" : "rel ", Key);
- psxkey = -1;
- for (i = 0; i < ARRAY_SIZE(keymap); i++) {
- if (keymap[i].xkey == Key) {
- psxkey = keymap[i].psxkey;
- break;
- }
- }
-
- if (0 <= psxkey && psxkey < 32) {
- if (evt.type == KeyPress)
- keystate_x11 |= 1 << psxkey;
- else
- keystate_x11 &= ~(1 << psxkey);
- }
- if (evt.type == KeyPress) {
- if (psxkey > 32)
- *action = psxkey - 32;
- if (Key == XK_Escape)
- leave = 1;
- }
- break;
-
- case ClientMessage:
- xce = (XClientMessageEvent *)&evt;
- if (xce->message_type == wmprotocols && (Atom)xce->data.l[0] == wmdelwindow)
- leave = 1;
- break;
- }
- }
-
- if (leave) {
- extern void OnFile_Exit();
- DestroyKeyboard();
- OnFile_Exit();
- exit(1);
- }
-
- return keystate_x11;
-}