(BB10) Build fixes

(General) Fix some unused variable warnings
This commit is contained in:
twinaphex 2014-05-17 22:16:25 +02:00
parent a52cfa2e10
commit d62164c4ae
15 changed files with 85 additions and 28 deletions

View File

@ -381,6 +381,7 @@ static void iir_dsp_free(void *data)
static void iir_dsp_config(void* data)
{
(void)data;
}
const struct dspfilter_implementation generic_iir_dsp = {
@ -407,6 +408,7 @@ const struct dspfilter_implementation sse2_iir_dsp = {
const struct dspfilter_implementation *rarch_dsp_plugin_init(dspfilter_simd_mask_t simd)
{
(void)simd;
#ifdef __SSE2__
if (simd & DSPFILTER_SIMD_SSE2)
return &sse2_iir_dsp;

View File

@ -163,6 +163,7 @@ static void wah_dsp_free(void *data)
static void wah_dsp_config(void *data)
{
(void)data;
}
const struct dspfilter_implementation generic_wah_dsp = {

View File

@ -92,5 +92,6 @@
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>com.rim.tad.tools.qml.core.qmlNature</nature>
<nature>org.eclipse.cdt.qt.core.qtNature</nature>
</natures>
</projectDescription>

View File

@ -6,10 +6,10 @@ LIBS += -lscreen -lbps -lOpenAL -lpng -lEGL -lGLESv2
LIBS += -lbbcascadespickers -lbbdata -lbbdevice
DEFINES += HAVE_RGUI HAVE_MENU HAVE_NEON RARCH_MOBILE \
SINC_LOWER_QUALITY \
SINC_LOWER_QUALITY RARCH_INTERNAL \
HAVE_FBO HAVE_GRIFFIN __LIBRETRO__ \
HAVE_DYNAMIC HAVE_ZLIB __BLACKBERRY_QNX__ HAVE_OPENGLES \
HAVE_OPENGLES2 HAVE_NULLINPUT \
HAVE_OPENGLES2 HAVE_NULLINPUT HAVE_BUILTIN_FILTERS \
HAVE_AL HAVE_THREADS WANT_MINIZ HAVE_OVERLAY HAVE_GLSL \
USING_GL20 HAVE_OPENGL __STDC_CONSTANT_MACROS HAVE_BB10

View File

@ -48,6 +48,7 @@ RetroArch::RetroArch()
res = connect(
OrientationSupport::instance(), SIGNAL(rotationCompleted()),
this, SLOT(onRotationCompleted()));
(void)res;
rarch_main_clear_state();
strlcpy(g_extern.config_path, "app/native/retroarch.cfg", sizeof(g_extern.config_path));
@ -143,6 +144,7 @@ void RetroArch::run()
{
case RETROARCH_START_REQUESTED:
{
char win_id[64];
MsgReply(rcvid,0,NULL,0);
if (screen_create_window_type(&screen_win, screen_ctx, SCREEN_CHILD_WINDOW) != BPS_SUCCESS)
@ -154,7 +156,7 @@ void RetroArch::run()
RARCH_ERR("Screen join window group failed.\n");
}
char *win_id = "RetroArch_Window";
strlcpy(win_id, "RetroArch_Window", sizeof(win_id));
screen_set_window_property_cv(screen_win, SCREEN_PROPERTY_ID_STRING, strlen(win_id), win_id);
int z = 10;
@ -264,7 +266,7 @@ void RetroArch::start()
void RetroArch::populateCores(core_info_list_t * info)
{
int i;
unsigned i;
Option *tmp;
//Populate DropDown
@ -281,13 +283,14 @@ void RetroArch::populateCores(core_info_list_t * info)
void RetroArch::findDevices()
{
//Find all connected devices.
unsigned i;
Option *tmp;
deviceSelection->removeAll();
//Find all connected devices
//Populate DropDown
for (int i = 0; i < pads_connected; ++i)
for (i = 0; i < pads_connected; ++i)
{
tmp = Option::create().text(devices[i].device_name)
.value(i);

View File

@ -57,6 +57,19 @@ const struct platform_bind platform_keys[] = {
};
#endif
enum input_devices
{
DEVICE_NONE,
#ifdef HAVE_BB10
DEVICE_WIIMOTE,
DEVICE_KEYPAD,
DEVICE_UNKNOWN,
#endif
DEVICE_KEYBOARD,
DEVICE_IPEGA,
DEVICE_LAST
};
extern input_device_t devices[MAX_PADS];
#endif

View File

@ -30,17 +30,6 @@
#define MAX_TOUCH 4
#endif
enum input_devices
{
DEVICE_NONE,
DEVICE_WIIMOTE,
DEVICE_KEYBOARD,
DEVICE_IPEGA,
DEVICE_KEYPAD,
DEVICE_UNKNOWN,
DEVICE_LAST
};
struct touches
{
int16_t x, y;
@ -77,6 +66,9 @@ static void process_gamepad_event(void *data, screen_event_t screen_event, int t
screen_device_t device;
input_device_t* controller = NULL;
(void)data;
(void)type;
screen_get_event_property_pv(screen_event, SCREEN_PROPERTY_DEVICE, (void**)&device);
for (i = 0; i < MAX_PADS; ++i)
@ -110,6 +102,8 @@ static void loadController(input_device_t* controller)
{
int device;
(void)device;
// Query libscreen for information about this device.
screen_get_device_property_iv(controller->handle, SCREEN_PROPERTY_TYPE, &controller->type);
screen_get_device_property_cv(controller->handle, SCREEN_PROPERTY_ID_STRING, sizeof(controller->id), controller->id);
@ -149,9 +143,12 @@ extern screen_context_t screen_ctx;
void discoverControllers(void)
{
// Get an array of all available devices.
int deviceCount, i;
int deviceCount;
unsigned i;
screen_event_t *event;
(void)event;
screen_get_context_property_iv(screen_ctx, SCREEN_PROPERTY_DEVICE_COUNT, &deviceCount);
screen_device_t* devices_found = (screen_device_t*)calloc(deviceCount, sizeof(screen_device_t));
screen_get_context_property_pv(screen_ctx, SCREEN_PROPERTY_DEVICES, (void**)devices_found);
@ -258,6 +255,9 @@ static void process_keyboard_event(void *data, screen_event_t event, int type)
input_device_t* controller = NULL;
int i, b, sym, modifiers, flags, scan, cap;
(void)data;
(void)type;
i = 0;
sym = 0;
modifiers = 0;
@ -316,7 +316,8 @@ static void process_keyboard_event(void *data, screen_event_t event, int type)
static void process_touch_event(void *data, screen_event_t event, int type)
{
int contact_id, i, j, pos[2];
int contact_id, pos[2];
unsigned i, j;
qnx_input_t *qnx = (qnx_input_t*)data;
screen_get_event_property_iv(event, SCREEN_PROPERTY_TOUCH_ID, (int*)&contact_id);
@ -471,6 +472,9 @@ static void handle_navigator_event(void *data, bps_event_t *event)
bps_event_t *event_pause = NULL;
int rc;
(void)data;
(void)rc;
switch (bps_event_get_code(event))
{
case NAVIGATOR_SWIPE_DOWN:
@ -641,6 +645,7 @@ static int16_t qnx_input_state(void *data, const struct retro_keybind **retro_ke
static bool qnx_input_key_pressed(void *data, int key)
{
(void)data;
return ((g_extern.lifecycle_state | driver.overlay_state.buttons ) & (1ULL << key));
}
@ -664,6 +669,8 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
size_t arr_size = sizeof(platform_keys) / sizeof(platform_keys[0]);
(void)device;
(void)joykey;
(void)data;
if (keybind_action & (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND))
*key = g_settings.input.binds[port][id].def_joykey;
@ -676,7 +683,7 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
case DEVICE_WIIMOTE:
//TODO:Have enum lookup for string
strlcpy(g_settings.input.device_names[port], "Wiimote",
sizeof(g_settings.input.device_names[port]));
sizeof(g_settings.input.device_names[port]));
g_settings.input.device[port] = device;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = SCREEN_X_GAME_BUTTON;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = SCREEN_B_GAME_BUTTON;
@ -700,7 +707,7 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
break;
case DEVICE_KEYPAD:
strlcpy(g_settings.input.device_names[port], "BlackBerry Q10 Keypad",
sizeof(g_settings.input.device_names[port]));
sizeof(g_settings.input.device_names[port]));
g_settings.input.device[port] = device;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = KEYCODE_M & 0xFF;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = KEYCODE_J & 0xFF;
@ -725,7 +732,7 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
#endif
case DEVICE_KEYBOARD:
strlcpy(g_settings.input.device_names[port], "BlackBerry BT Keyboard",
sizeof(g_settings.input.device_names[port]));
sizeof(g_settings.input.device_names[port]));
g_settings.input.device[port] = device;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = KEYCODE_Z & 0xFF;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = KEYCODE_A & 0xFF;
@ -749,7 +756,7 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
break;
case DEVICE_IPEGA:
strlcpy(g_settings.input.device_names[port], "iPega PG-9017",
sizeof(g_settings.input.device_names[port]));
sizeof(g_settings.input.device_names[port]));
g_settings.input.device[port] = device;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = KEYCODE_J & 0xFF;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = KEYCODE_M & 0xFF;
@ -774,7 +781,7 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
#ifdef HAVE_BB10
case DEVICE_UNKNOWN:
strlcpy(g_settings.input.device_names[port], "Unknown",
sizeof(g_settings.input.device_names[port]));
sizeof(g_settings.input.device_names[port]));
g_settings.input.device[port] = device;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = SCREEN_B_GAME_BUTTON;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = SCREEN_Y_GAME_BUTTON;
@ -796,10 +803,11 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
controller->port = port;
port_device[port] = controller;
break;
#endif
case DEVICE_NONE:
default:
strlcpy(g_settings.input.device_names[port], "None",
sizeof(g_settings.input.device_names[port]));
sizeof(g_settings.input.device_names[port]));
g_settings.input.device[port] = device;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_B].def_joykey = NO_BTN;
g_settings.input.binds[port][RETRO_DEVICE_ID_JOYPAD_Y].def_joykey = NO_BTN;
@ -821,7 +829,6 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port,
controller->port = -1;
port_device[port] = 0;
break;
#endif
}
for (i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++)
@ -862,6 +869,8 @@ static uint64_t qnx_input_get_capabilities(void *data)
{
uint64_t caps = 0;
(void)data;
caps |= (1 << RETRO_DEVICE_JOYPAD);
caps |= (1 << RETRO_DEVICE_POINTER);
#ifdef HAVE_BB10
@ -873,6 +882,7 @@ static uint64_t qnx_input_get_capabilities(void *data)
unsigned qnx_input_devices_size(void *data)
{
(void)data;
return DEVICE_LAST;
}
@ -888,4 +898,7 @@ const input_driver_t input_qnx = {
qnx_input_get_capabilities,
qnx_input_devices_size,
"qnx_input",
NULL,
NULL,
NULL,
};

2
deps/rzlib/gzguts.h vendored
View File

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

View File

@ -116,6 +116,8 @@ static retro_keyboard_event_t key_event;
#ifdef HAVE_MENU
static int main_entry_iterate_clear_input(args_type() args)
{
(void)args;
rarch_input_poll();
if (!menu_input(driver.menu))
{
@ -130,6 +132,8 @@ static int main_entry_iterate_clear_input(args_type() args)
static int main_entry_iterate_shutdown(args_type() args)
{
(void)args;
#ifdef HAVE_MENU
// Load dummy core instead of exiting RetroArch completely.
if (g_settings.load_dummy_on_core_shutdown)

View File

@ -2016,6 +2016,8 @@ static int menu_common_shader_manager_setting_toggle(void *data, unsigned settin
static int menu_common_setting_toggle(void *data, unsigned setting, unsigned action, unsigned menu_type)
{
(void)menu_type;
rgui_handle_t *rgui = (rgui_handle_t*)data;
#ifdef HAVE_SHADER_MANAGER
if ((setting >= RGUI_SETTINGS_SHADER_FILTER) && (setting <= RGUI_SETTINGS_SHADER_LAST))

View File

@ -599,6 +599,8 @@ static int rgui_input_postprocess(void *data, uint64_t old_state)
{
int ret;
rgui_handle_t *rgui;
(void)old_state;
rgui = (rgui_handle_t*)data;
ret = 0;

View File

@ -27,6 +27,7 @@ static void frontend_qnx_get_environment_settings(int argc, char *argv[], void *
{
(void)argc;
(void)argv;
(void)args;
/* FIXME - should this apply for both BB10 and PB? */
#if defined(__QNX__) && !defined(HAVE_BB10)

View File

@ -151,7 +151,9 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_path,
softfilter_get_implementation_t cb;
i = 0;
(void)i;
(void)filter_path;
rarch_softfilter_t *filt = (rarch_softfilter_t*)calloc(1, sizeof(*filt));
if (!filt)

View File

@ -209,6 +209,8 @@ static void lq2x_work_cb_xrgb8888(void *data, void *thread_data)
unsigned width = thr->width;
unsigned height = thr->height;
(void)data;
lq2x_generic_xrgb8888(width, height,
thr->first, thr->last, input, thr->in_pitch / SOFTFILTER_BPP_XRGB8888, output, thr->out_pitch / SOFTFILTER_BPP_XRGB8888);
}

View File

@ -220,10 +220,14 @@ static void *phosphor2x_generic_create(unsigned in_fmt, unsigned out_fmt,
unsigned max_width, unsigned max_height,
unsigned threads, softfilter_simd_mask_t simd)
{
(void)simd;
unsigned i;
struct filter_data *filt = (struct filter_data*)calloc(1, sizeof(*filt));
(void)simd;
(void)out_fmt;
(void)max_width;
(void)max_height;
if (!filt)
return NULL;
filt->workers = (struct softfilter_thread_data*)calloc(threads, sizeof(struct softfilter_thread_data));
@ -261,6 +265,7 @@ static void *phosphor2x_generic_create(unsigned in_fmt, unsigned out_fmt,
static void phosphor2x_generic_output(void *data, unsigned *out_width, unsigned *out_height,
unsigned width, unsigned height)
{
(void)data;
*out_width = width * PHOSPHOR2X_SCALE;
*out_height = height * PHOSPHOR2X_SCALE;
}
@ -279,6 +284,9 @@ static void phosphor2x_generic_xrgb8888(void *data, unsigned width, unsigned hei
unsigned y;
struct filter_data *filt = (struct filter_data*)data;
(void)first;
(void)last;
memset(dst, 0, height * dst_stride);
for (y = 0; y < height; y++)
@ -313,6 +321,9 @@ static void phosphor2x_generic_rgb565(void *data, unsigned width, unsigned heigh
unsigned y;
struct filter_data *filt = (struct filter_data*)data;
(void)first;
(void)last;
memset(dst, 0, height * dst_stride);
for (y = 0; y < height; y++)