(Playbook) Fix build

This commit is contained in:
twinaphex 2014-05-17 14:36:15 +02:00
parent f8f5a4a108
commit 3e667a8c07
5 changed files with 47 additions and 38 deletions

View File

@ -521,7 +521,7 @@ static void *qnx_input_init(void)
//Get screen dimensions //Get screen dimensions
if(gfx_ctx_bbqnx.get_video_size) if(gfx_ctx_bbqnx.get_video_size)
gfx_ctx_bbqnx.get_video_size(&screen_width, &screen_height); gfx_ctx_bbqnx.get_video_size(driver.video_data, &screen_width, &screen_height);
if(initialized) if(initialized)
return (void*)-1; return (void*)-1;

2
deps/rzlib/gzguts.h vendored
View File

@ -164,7 +164,7 @@
#define MODE_COPY 1 /* copy input directly */ #define MODE_COPY 1 /* copy input directly */
#define MODE_GZIP 2 /* decompress a gzip stream */ #define MODE_GZIP 2 /* decompress a gzip stream */
#if defined(__APPLE__) || defined(PSP) #if defined(__APPLE__) || defined(PSP) || defined(__QNX__)
struct gzFile_s struct gzFile_s
{ {
unsigned have; unsigned have;

View File

@ -23,7 +23,7 @@
#include "../../dynamic.h" #include "../../dynamic.h"
#include "../../libretro_private.h" #include "../../libretro_private.h"
static void get_environment_settings(int argc, char *argv[], void *args) static void frontend_qnx_get_environment_settings(int argc, char *argv[], void *args)
{ {
(void)argc; (void)argc;
(void)argv; (void)argv;
@ -36,7 +36,7 @@ static void get_environment_settings(int argc, char *argv[], void *args)
config_load(); config_load();
} }
static void system_init(void *data) static void frontend_qnx_init(void *data)
{ {
(void)data; (void)data;
/* FIXME - should this apply for both BB10 and PB? */ /* FIXME - should this apply for both BB10 and PB? */
@ -45,8 +45,9 @@ static void system_init(void *data)
#endif #endif
} }
static void system_shutdown(void) static void frontend_qnx_shutdown(bool unused)
{ {
(void)unused;
bps_shutdown(); bps_shutdown();
} }
@ -58,14 +59,14 @@ static int frontend_qnx_get_rating(void)
} }
const frontend_ctx_driver_t frontend_ctx_qnx = { const frontend_ctx_driver_t frontend_ctx_qnx = {
get_environment_settings, /* get_environment_settings */ frontend_qnx_get_environment_settings, /* get_environment_settings */
system_init, /* init */ frontend_qnx_init, /* init */
NULL, /* deinit */ NULL, /* deinit */
NULL, /* exitspawn */ NULL, /* exitspawn */
NULL, /* process_args */ NULL, /* process_args */
NULL, /* process_events */ NULL, /* process_events */
NULL, /* exec */ NULL, /* exec */
system_shutdown, /* shutdown */ frontend_qnx_shutdown, /* shutdown */
frontend_qnx_get_rating, /* get_rating */ frontend_qnx_get_rating, /* get_rating */
"qnx", "qnx",
}; };

View File

@ -48,17 +48,15 @@ static screen_display_t screen_disp;
static enum gfx_ctx_api g_api; static enum gfx_ctx_api g_api;
static void gfx_ctx_set_swap_interval(void *data, unsigned interval) static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned interval)
{ {
(void)data; (void)data;
RARCH_LOG("gfx_ctx_set_swap_interval(%d).\n", interval);
eglSwapInterval(g_egl_dpy, interval); eglSwapInterval(g_egl_dpy, interval);
} }
static void gfx_ctx_destroy(void *data) static void gfx_ctx_qnx_destroy(void *data)
{ {
(void)data; (void)data;
RARCH_LOG("gfx_ctx_destroy().\n");
eglMakeCurrent(g_egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglMakeCurrent(g_egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
eglDestroyContext(g_egl_dpy, g_egl_ctx); eglDestroyContext(g_egl_dpy, g_egl_ctx);
eglDestroySurface(g_egl_dpy, g_egl_surf); eglDestroySurface(g_egl_dpy, g_egl_surf);
@ -72,7 +70,7 @@ static void gfx_ctx_destroy(void *data)
g_resize = false; g_resize = false;
} }
static void gfx_ctx_get_video_size(void *data, unsigned *width, unsigned *height) static void gfx_ctx_qnx_get_video_size(void *data, unsigned *width, unsigned *height)
{ {
(void)data; (void)data;
if (g_egl_dpy) if (g_egl_dpy)
@ -90,7 +88,7 @@ static void gfx_ctx_get_video_size(void *data, unsigned *width, unsigned *height
} }
} }
static bool gfx_ctx_init(void *data) static bool gfx_ctx_qnx_init(void *data)
{ {
/* Create a screen context that will be used to /* Create a screen context that will be used to
* create an EGL surface to receive libscreen events */ * create an EGL surface to receive libscreen events */
@ -281,19 +279,19 @@ static bool gfx_ctx_init(void *data)
error: error:
RARCH_ERR("EGL error: %d.\n", eglGetError()); RARCH_ERR("EGL error: %d.\n", eglGetError());
gfx_ctx_destroy(data); gfx_ctx_qnx_destroy(data);
screen_error: screen_error:
screen_stop_events(screen_ctx); screen_stop_events(screen_ctx);
return false; return false;
} }
static void gfx_ctx_swap_buffers(void *data) static void gfx_ctx_qnx_swap_buffers(void *data)
{ {
(void)data; (void)data;
eglSwapBuffers(g_egl_dpy, g_egl_surf); eglSwapBuffers(g_egl_dpy, g_egl_surf);
} }
static void gfx_ctx_check_window(void *data, bool *quit, static void gfx_ctx_qnx_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count) bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{ {
(void)data; (void)data;
@ -302,7 +300,7 @@ static void gfx_ctx_check_window(void *data, bool *quit,
*quit = false; *quit = false;
unsigned new_width, new_height; unsigned new_width, new_height;
gfx_ctx_get_video_size(&new_width, &new_height); gfx_ctx_qnx_get_video_size(data, &new_width, &new_height);
if (new_width != *width || new_height != *height) if (new_width != *width || new_height != *height)
{ {
*width = new_width; *width = new_width;
@ -315,14 +313,14 @@ static void gfx_ctx_check_window(void *data, bool *quit,
*quit = true; *quit = true;
} }
static void gfx_ctx_set_resize(void *data, unsigned width, unsigned height) static void gfx_ctx_qnx_set_resize(void *data, unsigned width, unsigned height)
{ {
(void)data; (void)data;
(void)width; (void)width;
(void)height; (void)height;
} }
static void gfx_ctx_update_window_title(void *data) static void gfx_ctx_qnx_update_window_title(void *data)
{ {
(void)data; (void)data;
char buf[128], buf_fps[128]; char buf[128], buf_fps[128];
@ -333,7 +331,7 @@ static void gfx_ctx_update_window_title(void *data)
msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1); msg_queue_push(g_extern.msg_queue, buf_fps, 1, 1);
} }
static bool gfx_ctx_set_video_mode(void *data, static bool gfx_ctx_qnx_set_video_mode(void *data,
unsigned width, unsigned height, unsigned width, unsigned height,
bool fullscreen) bool fullscreen)
{ {
@ -345,14 +343,14 @@ static bool gfx_ctx_set_video_mode(void *data,
} }
static void gfx_ctx_input_driver(void *data, const input_driver_t **input, void **input_data) static void gfx_ctx_qnx_input_driver(void *data, const input_driver_t **input, void **input_data)
{ {
(void)data; (void)data;
*input = NULL; *input = NULL;
*input_data = NULL; *input_data = NULL;
} }
static gfx_ctx_proc_t gfx_ctx_get_proc_address(void *data, const char *symbol) static gfx_ctx_proc_t gfx_ctx_qnx_get_proc_address(const char *symbol)
{ {
rarch_assert(sizeof(void*) == sizeof(void (*)(void))); rarch_assert(sizeof(void*) == sizeof(void (*)(void)));
gfx_ctx_proc_t ret; gfx_ctx_proc_t ret;
@ -363,7 +361,7 @@ static gfx_ctx_proc_t gfx_ctx_get_proc_address(void *data, const char *symbol)
return ret; return ret;
} }
static bool gfx_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) static bool gfx_ctx_qnx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor)
{ {
(void)data; (void)data;
(void)major; (void)major;
@ -372,27 +370,31 @@ static bool gfx_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, u
return api == GFX_CTX_OPENGL_ES_API; return api == GFX_CTX_OPENGL_ES_API;
} }
static bool gfx_ctx_has_focus(void *data) static bool gfx_ctx_qnx_has_focus(void *data)
{ {
(void)data; (void)data;
return true; return true;
} }
const gfx_ctx_driver_t gfx_ctx_bbqnx = { const gfx_ctx_driver_t gfx_ctx_bbqnx = {
gfx_ctx_init, gfx_ctx_qnx_init,
gfx_ctx_destroy, gfx_ctx_qnx_destroy,
gfx_ctx_bind_api, gfx_ctx_qnx_bind_api,
gfx_ctx_set_swap_interval, gfx_ctx_qnx_set_swap_interval,
gfx_ctx_set_video_mode, gfx_ctx_qnx_set_video_mode,
gfx_ctx_get_video_size, gfx_ctx_qnx_get_video_size,
NULL, NULL,
gfx_ctx_update_window_title, gfx_ctx_qnx_update_window_title,
gfx_ctx_check_window, gfx_ctx_qnx_check_window,
gfx_ctx_set_resize, gfx_ctx_qnx_set_resize,
gfx_ctx_has_focus, gfx_ctx_qnx_has_focus,
gfx_ctx_swap_buffers, gfx_ctx_qnx_swap_buffers,
gfx_ctx_input_driver, gfx_ctx_qnx_input_driver,
gfx_ctx_get_proc_address, gfx_ctx_qnx_get_proc_address,
#ifdef HAVE_EGL
NULL,
NULL,
#endif
NULL, NULL,
"blackberry_qnx", "blackberry_qnx",
}; };

View File

@ -75,6 +75,11 @@ static bool nullinput_set_sensor_state(void *data, unsigned port, enum retro_sen
return false; return false;
} }
static unsigned nullinput_devices_size(void *data)
{
return 0;
}
const input_driver_t input_null = { const input_driver_t input_null = {
nullinput_input_init, nullinput_input_init,
nullinput_input_poll, nullinput_input_poll,
@ -85,5 +90,6 @@ const input_driver_t input_null = {
nullinput_set_sensor_state, nullinput_set_sensor_state,
NULL, NULL,
nullinput_get_capabilities, nullinput_get_capabilities,
nullinput_devices_size,
"null", "null",
}; };