From 39c42b597500cc3524892ccb0012cdcfc9e6f40b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 25 Feb 2013 07:29:09 +0100 Subject: [PATCH] (Playbook) Add frontend_bbqnx.c --- console/griffin/griffin.c | 7 +- frontend/frontend_bbqnx.c | 66 +++++++ playbook/.cproject | 7 + playbook/src/main.c | 365 -------------------------------------- 4 files changed, 79 insertions(+), 366 deletions(-) create mode 100644 frontend/frontend_bbqnx.c delete mode 100644 playbook/src/main.c diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c index 0ea22a5819..a00bf3d3cd 100644 --- a/console/griffin/griffin.c +++ b/console/griffin/griffin.c @@ -383,11 +383,16 @@ MAIN #include "../../frontend/frontend_xenon.c" #elif defined(RARCH_CONSOLE) || defined(PSP) #include "../../frontend/frontend_console.c" -#include "../../frontend/frontend.c" +#elif defined(__BLACKBERRY_QNX__) +#include "../../frontend/frontend_bbqnx.c" #elif defined(ANDROID) #include "../../frontend/frontend_android.c" #endif +#ifdef HAVE_RARCH_MAIN_IMPLEMENTATION +#include "../../frontend/frontend.c" +#endif + /*============================================================ RETROARCH ============================================================ */ diff --git a/frontend/frontend_bbqnx.c b/frontend/frontend_bbqnx.c new file mode 100644 index 0000000000..5b0a43b3f0 --- /dev/null +++ b/frontend/frontend_bbqnx.c @@ -0,0 +1,66 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2013 - Hans-Kristian Arntzen + * Copyright (C) 2011-2013 - Daniel De Matteis + * + * RetroArch 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 Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch 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 RetroArch. + * If not, see . + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "../playbook/src/bbutil.h" + +void handle_screen_event(bps_event_t *event) +{ + screen_event_t screen_event = screen_event_get_event(event); + + int screen_val; + screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_TYPE, &screen_val); + + switch (screen_val) + { + case SCREEN_EVENT_MTOUCH_TOUCH: + case SCREEN_EVENT_MTOUCH_MOVE: + case SCREEN_EVENT_MTOUCH_RELEASE: + break; + } +} + +int rarch_main(int argc, char *argv[]) +{ + bps_initialize(); //Initialize BPS library + + int init_ret; + if ((init_ret = rarch_main_init(argc, argv))) return init_ret; + rarch_init_msg_queue(); + while ((g_extern.is_paused && !g_extern.is_oneshot) ? rarch_main_idle_iterate() : rarch_main_iterate()); + rarch_main_deinit(); + rarch_deinit_msg_queue(); + +#ifdef PERF_TEST + rarch_perf_log(); +#endif + + rarch_main_clear_state(); + + bps_shutdown(); //Shut down BPS library + + return 0; +} diff --git a/playbook/.cproject b/playbook/.cproject index 7d1e37ca98..989d52bffd 100644 --- a/playbook/.cproject +++ b/playbook/.cproject @@ -30,6 +30,7 @@