From 7010034e5499a82f96f9fb45e7be31789a3f63b9 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 18 Feb 2013 03:06:01 +0200 Subject: [PATCH] frontend: maemo: some refactoring --- Makefile | 5 +---- configure | 5 +---- frontend/plugin_lib.c | 14 +------------- maemo/hildon.c | 16 ++++++++++------ 4 files changed, 13 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 4a1e61c9..5b2bef7c 100644 --- a/Makefile +++ b/Makefile @@ -175,10 +175,7 @@ OBJS += maemo/hildon.o maemo/main.o maemo/maemo_xkb.o frontend/pl_gun_ts.o maemo/%.o: maemo/%.c USE_PLUGIN_LIB = 1 LDFLAGS += $(shell pkg-config --libs hildon-1 libpulse) -EXTRA_CFLAGS += $(shell pkg-config --cflags hildon-1) -DHAVE_TSLIB -#EXTRA_CFLAGS += -DMAEMO -DMAEMO_CHANGES -march=armv7-a -O3 -mtune=cortex-a8 -mfpu=neon -funsafe-math-optimizations \ -# -mstructure-size-boundary=32 -falign-functions=32 -falign-loops -CFLAGS += $(EXTRA_CFLAGS) +CFLAGS += $(shell pkg-config --cflags hildon-1) -DHAVE_TSLIB CFLAGS += `pkg-config --cflags glib-2.0 libosso dbus-1 hildon-fm-2` LDFLAGS += `pkg-config --libs glib-2.0 libosso dbus-1 hildon-fm-2` endif diff --git a/configure b/configure index 8b5cbda5..50378cab 100755 --- a/configure +++ b/configure @@ -295,10 +295,7 @@ generic) need_sdl="yes" ;; maemo) - maemo_cflags=`pkg-config --cflags hildon-1` - maemo_ldlibs=`pkg-config --libs hildon-1` - CFLAGS="$CFLAGS -DMAEMO -DMAEMO_CHANGES $maemo_cflags" - MAIN_LDLIBS="$MAIN_LDLIBS $maemo_ldlibs" + CFLAGS="$CFLAGS -DMAEMO -DMAEMO_CHANGES" ;; libretro) CFLAGS="$CFLAGS -fPIC" diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index f045abb8..72b33950 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -582,19 +582,7 @@ static void update_input(void) in_keystate = actions[IN_BINDTYPE_PLAYER12]; } #else /* MAEMO */ -#include -static void update_input(void) -{ - extern int g_maemo_opts; - extern int maemo_x11_update_keys(); - if (g_maemo_opts&8) - maemo_x11_update_keys(); - else{ - /* process GTK+ events */ - while (gtk_events_pending()) - gtk_main_iteration(); - } -} +extern void update_input(void); #endif void pl_update_gun(int *xn, int *yn, int *xres, int *yres, int *in) diff --git a/maemo/hildon.c b/maemo/hildon.c index 4bdd1de1..bd895c96 100644 --- a/maemo/hildon.c +++ b/maemo/hildon.c @@ -772,15 +772,19 @@ void *plat_gvideo_flip(void) } } + return pl_vout_buf; +} + +// for frontend/plugin_lib.c +void update_input(void) +{ if (g_maemo_opts & 8) maemo_x11_update_keys(); - else{ - //process GTK+ events - while (gtk_events_pending()) - gtk_main_iteration(); + else { + /* process GTK+ events */ + while (gtk_events_pending()) + gtk_main_iteration(); } - - return pl_vout_buf; } int omap_enable_layer(int enabled) -- 2.39.5