From 7b718cd0f3edb17da6e5d42e976a3a491fb50aec Mon Sep 17 00:00:00 2001 From: CatalystG Date: Wed, 12 Jun 2013 20:32:41 -0400 Subject: [PATCH] (BlackBerry) A couple tweaks and fixes for controllers. --- blackberry-qnx/bb10/assets/Controllers.qml | 4 ++-- blackberry-qnx/bb10/src/RetroArch-Cascades.cpp | 2 +- blackberry-qnx/qnx_input.c | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/blackberry-qnx/bb10/assets/Controllers.qml b/blackberry-qnx/bb10/assets/Controllers.qml index 348a302dc3..367536bb69 100644 --- a/blackberry-qnx/bb10/assets/Controllers.qml +++ b/blackberry-qnx/bb10/assets/Controllers.qml @@ -34,7 +34,7 @@ Page ActionItem { title: "Rescan" ActionBar.placement: ActionBarPlacement.OnBar - imageSource: "asset:///images/open.png" + imageSource: "asset:///images/search.png" onTriggered: { RetroArch.discoverController(); } @@ -45,7 +45,7 @@ Page { Container { - preferredWidth: 600 + preferredWidth: 650 horizontalAlignment: HorizontalAlignment.Center DropDown diff --git a/blackberry-qnx/bb10/src/RetroArch-Cascades.cpp b/blackberry-qnx/bb10/src/RetroArch-Cascades.cpp index 6d41510f45..c48a893a64 100644 --- a/blackberry-qnx/bb10/src/RetroArch-Cascades.cpp +++ b/blackberry-qnx/bb10/src/RetroArch-Cascades.cpp @@ -360,7 +360,7 @@ void RetroArch::findDevices() deviceSelection->add(tmp); //QML shows player 1 by default, so set dropdown to their controller. - if(devices[i].port == 0) + if(devices[i].port == 0 || devices[i].device == DEVICE_KEYPAD) { deviceSelection->setSelectedIndex(i); } diff --git a/blackberry-qnx/qnx_input.c b/blackberry-qnx/qnx_input.c index 0f4f9d6f7b..9218e2ba40 100644 --- a/blackberry-qnx/qnx_input.c +++ b/blackberry-qnx/qnx_input.c @@ -201,8 +201,8 @@ static void qnx_input_autodetect_gamepad(input_device_t* controller) } else if (strstr(controller->id, "BB-VKB")) { - controller->device = DEVICE_KEYBOARD; - strlcpy(controller->device_name, "BlackBerry Virtual Keyboard", sizeof(controller->device_name)); + controller->device = DEVICE_NONE; + strlcpy(controller->device_name, "None", sizeof(controller->device_name)); } else if (controller->id[0]) { @@ -275,7 +275,8 @@ static void process_keyboard_event(screen_event_t event, int type) //TODO: Am I missing something? Is there a better way? if((controller->port == 0) && ((unsigned int)g_settings.input.binds[0][RARCH_MENU_TOGGLE].joykey == (unsigned int)(sym&0xFF))) - g_extern.lifecycle_state ^= (1ULL << RARCH_MENU_TOGGLE); + if (flags & KEY_DOWN) + g_extern.lifecycle_state ^= (1ULL << RARCH_MENU_TOGGLE); } static void process_touch_event(screen_event_t event, int type)