2013-07-27 15:16:46 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2013 - Daniel De Matteis
|
|
|
|
*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <bps/bps.h>
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "../../boolean.h"
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <string.h>
|
2013-08-25 09:07:06 +00:00
|
|
|
#include "../../dynamic.h"
|
|
|
|
#include "../../libretro_private.h"
|
2013-07-27 15:16:46 +00:00
|
|
|
|
2013-08-10 19:31:11 +00:00
|
|
|
static void get_environment_settings(int argc, char *argv[], void *args)
|
2013-07-27 15:16:46 +00:00
|
|
|
{
|
|
|
|
(void)argc;
|
|
|
|
(void)argv;
|
|
|
|
|
|
|
|
/* FIXME - should this apply for both BB10 and PB? */
|
|
|
|
#if defined(__QNX__) && !defined(HAVE_BB10)
|
2013-08-25 09:07:06 +00:00
|
|
|
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, (void*)"app/native/lib");
|
2013-07-27 15:16:46 +00:00
|
|
|
#endif
|
2013-08-10 18:59:10 +00:00
|
|
|
|
|
|
|
config_load();
|
2013-07-27 15:16:46 +00:00
|
|
|
}
|
|
|
|
|
2013-11-03 15:38:56 +00:00
|
|
|
static void system_init(void *data)
|
2013-07-27 15:16:46 +00:00
|
|
|
{
|
2013-11-03 15:38:56 +00:00
|
|
|
(void)data;
|
2013-07-27 15:16:46 +00:00
|
|
|
/* FIXME - should this apply for both BB10 and PB? */
|
|
|
|
#if defined(__QNX__) && !defined(HAVE_BB10)
|
|
|
|
bps_initialize();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
static void system_shutdown(void)
|
|
|
|
{
|
|
|
|
bps_shutdown();
|
|
|
|
}
|
|
|
|
|
2013-07-27 15:32:15 +00:00
|
|
|
const frontend_ctx_driver_t frontend_ctx_qnx = {
|
2013-07-27 15:16:46 +00:00
|
|
|
get_environment_settings, /* get_environment_settings */
|
|
|
|
system_init, /* init */
|
|
|
|
NULL, /* deinit */
|
|
|
|
NULL, /* exitspawn */
|
|
|
|
NULL, /* process_args */
|
2013-07-27 15:42:09 +00:00
|
|
|
NULL, /* process_events */
|
2013-07-27 15:16:46 +00:00
|
|
|
NULL, /* exec */
|
|
|
|
system_shutdown, /* shutdown */
|
|
|
|
"qnx",
|
|
|
|
};
|