diff --git a/config.def.h b/config.def.h index 00a5705e17..4c7817699a 100644 --- a/config.def.h +++ b/config.def.h @@ -73,6 +73,7 @@ enum INPUT_XINPUT, INPUT_LINUXRAW, INPUT_IOS, + INPUT_QNX, INPUT_NULL }; @@ -160,6 +161,8 @@ enum #define INPUT_DEFAULT_DRIVER INPUT_X #elif defined(IOS) #define INPUT_DEFAULT_DRIVER INPUT_IOS +#elif defined(__BLACKBERRY_QNX__) +#define INPUT_DEFAULT_DRIVER INPUT_QNX #else #define INPUT_DEFAULT_DRIVER INPUT_NULL #endif diff --git a/driver.c b/driver.c index d9460e9f37..f24edb8399 100644 --- a/driver.c +++ b/driver.c @@ -155,6 +155,9 @@ static const input_driver_t *input_drivers[] = { #ifdef IOS &input_ios, #endif +#ifdef __BLACKBERRY_QNX__ + &input_qnx, +#endif #ifdef HAVE_NULLINPUT &input_null, #endif diff --git a/griffin/griffin.c b/griffin/griffin.c index 2cae3ca558..31be462e05 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -241,6 +241,8 @@ INPUT #elif defined(ANDROID) #include "../android/native/jni/input_autodetect.c" #include "../android/native/jni/input_android.c" +#elif defined(__BLACKBERRY_QNX__) +#include "../playbook/src/qnx_input.c" #endif #if defined(HAVE_NULLINPUT) diff --git a/playbook/src/qnx_input.c b/playbook/src/qnx_input.c new file mode 100644 index 0000000000..7c5ac588ec --- /dev/null +++ b/playbook/src/qnx_input.c @@ -0,0 +1,73 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2013 - Hans-Kristian Arntzen + * + * 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 "../../general.h" +#include "../../driver.h" + +static void *qnx_input_init(void) +{ + return (void*)-1; +} + +static void qnx_input_poll(void *data) +{ + (void)data; +} + +static int16_t qnx_input_state(void *data, const struct retro_keybind **retro_keybinds, unsigned port, unsigned device, unsigned index, unsigned id) +{ + (void)data; + (void)retro_keybinds; + (void)port; + (void)device; + (void)index; + (void)id; + + return 0; +} + +static bool qnx_input_key_pressed(void *data, int key) +{ + (void)data; + (void)key; + + return false; +} + +static void qnx_input_free_input(void *data) +{ + (void)data; +} + +static void qnx_set_keybinds(void *data, unsigned device, + unsigned port, unsigned id, unsigned keybind_action) +{ + (void)data; + (void)device; + (void)port; + (void)id; + (void)keybind_action; +} + +const input_driver_t input_qnx = { + qnx_input_init, + qnx_input_poll, + qnx_input_state, + qnx_input_key_pressed, + qnx_input_free_input, + qnx_set_keybinds, + "qnx_input", +}; + diff --git a/settings.c b/settings.c index cdfb3df81e..35aeeb822c 100644 --- a/settings.c +++ b/settings.c @@ -132,6 +132,8 @@ const char *config_get_default_input(void) return "linuxraw"; case INPUT_IOS: return "ios_input"; + case INPUT_QNX: + return "qnx_input"; case INPUT_NULL: return "null"; default: