diff --git a/gfx/context/bbqnx_ctx.c b/gfx/context/bbqnx_ctx.c index 3995540ca5..14d34152c8 100644 --- a/gfx/context/bbqnx_ctx.c +++ b/gfx/context/bbqnx_ctx.c @@ -262,10 +262,6 @@ static void gfx_ctx_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height, unsigned frame_count) { (void)frame_count; - //Request and process all available BPS events - bps_event_t *event = NULL; - - bps_get_event(&event, 0); *quit = false; @@ -278,28 +274,6 @@ static void gfx_ctx_check_window(bool *quit, *resize = true; } - if (event) - { - int domain = bps_event_get_domain(event); - - if (domain == screen_get_domain()) - { - 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; - } - } - else if ((domain == navigator_get_domain()) && (NAVIGATOR_EXIT == bps_event_get_code(event))) - g_extern.lifecycle_state |= (1ULL << RARCH_QUIT_KEY); - } - // Check if we are exiting. if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY)) *quit = true; diff --git a/playbook/.cproject b/playbook/.cproject index 570b741058..5322927f6a 100644 --- a/playbook/.cproject +++ b/playbook/.cproject @@ -26,8 +26,9 @@ - @@ -113,7 +115,7 @@ - + @@ -228,7 +230,7 @@ - + @@ -346,7 +348,7 @@ - + @@ -420,7 +422,7 @@ - + @@ -579,7 +581,7 @@ - + @@ -696,7 +698,7 @@ - + @@ -769,7 +771,7 @@ - + diff --git a/playbook/bar-descriptor.xml b/playbook/bar-descriptor.xml index a7efdace67..b063a85d5a 100644 --- a/playbook/bar-descriptor.xml +++ b/playbook/bar-descriptor.xml @@ -41,6 +41,8 @@ + landscape + false none false @@ -48,8 +50,9 @@ core.games icon.png - retroarch.cfg lib/test.so + retroarch.cfg + overlays diff --git a/playbook/src/qnx_input.c b/playbook/src/qnx_input.c index 7c5ac588ec..15f378f745 100644 --- a/playbook/src/qnx_input.c +++ b/playbook/src/qnx_input.c @@ -15,15 +15,188 @@ #include "../../general.h" #include "../../driver.h" +#include +#define MAX_TOUCH 16 + +struct touches +{ + int16_t x, y; + int16_t full_x, full_y; + int contact_id; +}; + +static struct touches touch[MAX_TOUCH]; +static unsigned touch_count; + +//Internal helper functions +static void process_touch_event(screen_event_t event, int type){ + int contact_id; + int pos[2]; + int i; + + screen_get_event_property_iv(event, SCREEN_PROPERTY_TOUCH_ID, (int*)&contact_id); + screen_get_event_property_iv(event, SCREEN_PROPERTY_SOURCE_POSITION, pos); + + switch(type){ + case SCREEN_EVENT_MTOUCH_TOUCH: + touch[touch_count].contact_id = contact_id; + input_translate_coord_viewport(pos[0], pos[1], + &touch[touch_count].x, &touch[touch_count].y, + &touch[touch_count].full_x, &touch[touch_count].full_y); + touch_count++; + //printf("New Touch: x:%d, y:%d, id:%d\n", pos[0], pos[1], contact_id);fflush(stdout); + break; + case SCREEN_EVENT_MTOUCH_RELEASE: + //Invalidate the finger + touch_count--; + touch[touch_count].contact_id = -1; + input_translate_coord_viewport(pos[0], pos[1], + &touch[touch_count].x, &touch[touch_count].y, + &touch[touch_count].full_x, &touch[touch_count].full_y); + //printf("Release: x:%d, y:%d, id:%d\n", pos[0], pos[1], contact_id);fflush(stdout); + break; + case SCREEN_EVENT_MTOUCH_MOVE: + //Find the finger we're tracking and update + for(i=0; i