2012-11-24 03:23:20 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 12:40:32 +00:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2012-11-24 03:23:20 +00:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2015-09-01 10:10:26 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2016-09-12 14:39:50 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../../config.h"
|
|
|
|
#endif
|
|
|
|
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
2019-10-01 17:46:49 +00:00
|
|
|
#include <psp2/system_param.h>
|
2015-09-02 11:07:13 +00:00
|
|
|
#include <psp2/power.h>
|
2016-07-31 07:59:53 +00:00
|
|
|
#include <psp2/sysmodule.h>
|
2016-09-07 23:25:14 +00:00
|
|
|
#include <psp2/appmgr.h>
|
2019-10-01 17:46:49 +00:00
|
|
|
#include <psp2/apputil.h>
|
2016-09-25 23:06:01 +00:00
|
|
|
|
|
|
|
#include "../../bootstrap/vita/sbrk.c"
|
2017-04-05 17:35:45 +00:00
|
|
|
#include "../../bootstrap/vita/threading.c"
|
2016-09-25 23:06:01 +00:00
|
|
|
|
2015-09-02 11:07:13 +00:00
|
|
|
#else
|
2012-11-24 03:23:20 +00:00
|
|
|
#include <pspkernel.h>
|
|
|
|
#include <pspdebug.h>
|
2014-02-17 13:26:03 +00:00
|
|
|
#include <pspfpu.h>
|
2014-02-18 17:43:23 +00:00
|
|
|
#include <psppower.h>
|
2014-06-04 00:35:26 +00:00
|
|
|
#include <pspsdk.h>
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2012-11-24 03:23:20 +00:00
|
|
|
|
2017-12-26 08:45:45 +00:00
|
|
|
#include <pthread.h>
|
|
|
|
|
2017-01-17 17:12:23 +00:00
|
|
|
#include <string/stdstring.h>
|
2015-09-15 02:49:10 +00:00
|
|
|
#include <boolean.h>
|
2014-10-21 22:23:06 +00:00
|
|
|
#include <file/file_path.h>
|
2015-06-15 20:45:02 +00:00
|
|
|
#ifndef IS_SALAMANDER
|
2016-03-20 13:53:54 +00:00
|
|
|
#include <lists/file_list.h>
|
2015-06-15 20:45:02 +00:00
|
|
|
#endif
|
|
|
|
|
2017-01-17 17:55:59 +00:00
|
|
|
#ifdef HAVE_MENU
|
|
|
|
#include "../../menu/menu_driver.h"
|
|
|
|
#endif
|
|
|
|
|
2015-11-29 00:59:41 +00:00
|
|
|
#include "../frontend_driver.h"
|
|
|
|
#include "../../defaults.h"
|
2016-06-20 15:49:20 +00:00
|
|
|
#include "../../file_path_special.h"
|
2015-08-10 21:11:40 +00:00
|
|
|
#include "../../defines/psp_defines.h"
|
2017-01-17 17:55:59 +00:00
|
|
|
#include "../../retroarch.h"
|
|
|
|
#include "../../paths.h"
|
2015-11-23 11:03:38 +00:00
|
|
|
#include "../../verbosity.h"
|
2014-06-04 23:17:37 +00:00
|
|
|
|
2015-08-30 17:46:19 +00:00
|
|
|
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER)
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifndef VITA
|
2015-09-20 13:33:54 +00:00
|
|
|
#include "../../bootstrap/psp1/kernel_functions.h"
|
2014-06-04 23:17:37 +00:00
|
|
|
#endif
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2012-11-24 03:23:20 +00:00
|
|
|
|
2017-01-17 10:43:12 +00:00
|
|
|
#ifndef VITA
|
2015-08-12 10:33:27 +00:00
|
|
|
PSP_MODULE_INFO("RetroArch", 0, 1, 1);
|
2014-03-08 14:46:59 +00:00
|
|
|
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER|THREAD_ATTR_VFPU);
|
2014-06-29 04:45:36 +00:00
|
|
|
#ifdef BIG_STACK
|
|
|
|
PSP_MAIN_THREAD_STACK_SIZE_KB(4*1024);
|
|
|
|
#endif
|
2012-11-24 03:23:20 +00:00
|
|
|
PSP_HEAP_SIZE_MAX();
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2012-11-24 03:23:20 +00:00
|
|
|
|
2014-06-04 23:17:37 +00:00
|
|
|
char eboot_path[512];
|
2016-09-04 06:55:22 +00:00
|
|
|
char user_path[512];
|
2014-06-04 23:17:37 +00:00
|
|
|
|
2016-02-05 17:43:23 +00:00
|
|
|
static enum frontend_fork psp_fork_mode = FRONTEND_FORK_NONE;
|
2014-10-02 19:39:29 +00:00
|
|
|
|
2014-06-03 01:35:12 +00:00
|
|
|
static void frontend_psp_get_environment_settings(int *argc, char *argv[],
|
|
|
|
void *args, void *params_data)
|
2012-11-24 03:23:20 +00:00
|
|
|
{
|
2017-05-23 17:43:58 +00:00
|
|
|
unsigned i;
|
2015-09-02 11:07:13 +00:00
|
|
|
struct rarch_main_wrap *params = NULL;
|
|
|
|
|
2014-02-11 15:10:40 +00:00
|
|
|
(void)args;
|
2015-09-02 11:07:13 +00:00
|
|
|
|
|
|
|
#ifdef VITA
|
2016-10-10 09:43:05 +00:00
|
|
|
strlcpy(eboot_path, "app0:/", sizeof(eboot_path));
|
2017-05-23 17:43:58 +00:00
|
|
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
2016-10-10 09:43:05 +00:00
|
|
|
strlcpy(user_path, "ux0:/data/retroarch/", sizeof(user_path));
|
2015-09-02 11:07:13 +00:00
|
|
|
#else
|
2016-09-04 05:02:49 +00:00
|
|
|
strlcpy(eboot_path, argv[0], sizeof(eboot_path));
|
2016-09-04 17:18:27 +00:00
|
|
|
/* for PSP, use uppercase directories, and no trailing slashes
|
|
|
|
otherwise mkdir fails */
|
|
|
|
strlcpy(user_path, "ms0:/PSP/RETROARCH", sizeof(user_path));
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_basedir(g_defaults.dirs[DEFAULT_DIR_PORT], argv[0], sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2017-05-23 17:43:58 +00:00
|
|
|
RARCH_LOG("port dir: [%s]\n", g_defaults.dirs[DEFAULT_DIR_PORT]);
|
2016-09-04 07:19:16 +00:00
|
|
|
|
2016-09-04 06:55:22 +00:00
|
|
|
#ifdef VITA
|
2016-09-04 07:19:16 +00:00
|
|
|
/* bundle data*/
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT],
|
|
|
|
"", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
2017-11-14 18:49:50 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], g_defaults.dirs[DEFAULT_DIR_PORT],
|
2017-05-23 17:43:58 +00:00
|
|
|
"info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
2017-11-14 18:49:50 +00:00
|
|
|
/* user data*/
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], user_path,
|
|
|
|
"assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], user_path,
|
2017-05-23 17:43:58 +00:00
|
|
|
"database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
2017-11-14 18:49:50 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CURSOR], user_path,
|
2017-05-23 17:43:58 +00:00
|
|
|
"database/cursors", sizeof(g_defaults.dirs[DEFAULT_DIR_CURSOR]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], user_path,
|
|
|
|
"cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], user_path,
|
|
|
|
"config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], user_path,
|
|
|
|
"downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
2017-05-23 19:16:03 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], user_path,
|
|
|
|
"playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_PLAYLIST]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_REMAP], user_path,
|
|
|
|
"remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP]));
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM], user_path,
|
|
|
|
"savefiles", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], user_path,
|
|
|
|
"savestates", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], user_path,
|
|
|
|
"system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], user_path,
|
|
|
|
"temp", sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], user_path,
|
|
|
|
"overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
|
2019-04-16 16:41:06 +00:00
|
|
|
#ifdef HAVE_VIDEO_LAYOUT
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT], user_path,
|
|
|
|
"layouts", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT]));
|
|
|
|
#endif
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS], user_path,
|
|
|
|
"thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS]));
|
2019-03-25 17:22:59 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_LOGS], user_path,
|
|
|
|
"logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
2017-05-23 17:43:58 +00:00
|
|
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY],
|
|
|
|
user_path, sizeof(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]));
|
2016-10-10 09:43:05 +00:00
|
|
|
fill_pathname_join(g_defaults.path.config, user_path,
|
2016-09-04 17:18:27 +00:00
|
|
|
file_path_str(FILE_PATH_MAIN_CONFIG), sizeof(g_defaults.path.config));
|
2016-09-04 04:58:37 +00:00
|
|
|
#else
|
2016-09-09 05:06:13 +00:00
|
|
|
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT],
|
|
|
|
"CORES", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], g_defaults.dirs[DEFAULT_DIR_PORT],
|
|
|
|
"INFO", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
|
2016-09-09 05:06:13 +00:00
|
|
|
|
2016-09-04 07:19:16 +00:00
|
|
|
/* user data */
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], user_path,
|
|
|
|
"CHEATS", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], user_path,
|
|
|
|
"CONFIG", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], user_path,
|
|
|
|
"DOWNLOADS", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
2017-05-23 19:16:03 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], user_path,
|
|
|
|
"PLAYLISTS", sizeof(g_defaults.dirs[DEFAULT_DIR_PLAYLIST]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_REMAP], g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG],
|
|
|
|
"REMAPS", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP]));
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM], user_path,
|
|
|
|
"SAVEFILES", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], user_path,
|
|
|
|
"SAVESTATES", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT], user_path,
|
|
|
|
"SCREENSHOTS", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], user_path,
|
|
|
|
"SYSTEM", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
2019-03-25 17:22:59 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_LOGS], user_path,
|
|
|
|
"LOGS", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
2016-09-09 04:56:43 +00:00
|
|
|
|
|
|
|
/* cache dir */
|
2017-05-23 17:43:58 +00:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], user_path,
|
|
|
|
"TEMP", sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
|
2016-09-09 04:56:43 +00:00
|
|
|
|
|
|
|
/* history and main config */
|
2017-05-23 17:43:58 +00:00
|
|
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY],
|
|
|
|
user_path, sizeof(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]));
|
2016-09-04 17:18:27 +00:00
|
|
|
fill_pathname_join(g_defaults.path.config, user_path,
|
|
|
|
file_path_str(FILE_PATH_MAIN_CONFIG), sizeof(g_defaults.path.config));
|
|
|
|
#endif
|
2016-09-07 23:25:14 +00:00
|
|
|
|
|
|
|
#ifndef IS_SALAMANDER
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
2016-09-08 14:18:30 +00:00
|
|
|
params = (struct rarch_main_wrap*)params_data;
|
2015-09-02 11:07:13 +00:00
|
|
|
params->verbose = true;
|
|
|
|
#endif
|
2015-12-26 06:45:19 +00:00
|
|
|
if (!string_is_empty(argv[1]))
|
2014-06-03 15:34:25 +00:00
|
|
|
{
|
2016-09-08 14:18:30 +00:00
|
|
|
static char path[PATH_MAX_LENGTH] = {0};
|
2016-10-10 09:43:05 +00:00
|
|
|
struct rarch_main_wrap *args =
|
2016-09-08 14:18:30 +00:00
|
|
|
(struct rarch_main_wrap*)params_data;
|
2014-06-03 15:34:25 +00:00
|
|
|
|
|
|
|
if (args)
|
|
|
|
{
|
|
|
|
strlcpy(path, argv[1], sizeof(path));
|
|
|
|
|
|
|
|
args->touched = true;
|
2014-07-28 17:55:28 +00:00
|
|
|
args->no_content = false;
|
2014-06-03 15:34:25 +00:00
|
|
|
args->verbose = false;
|
|
|
|
args->config_path = NULL;
|
|
|
|
args->sram_path = NULL;
|
|
|
|
args->state_path = NULL;
|
2014-07-28 17:55:28 +00:00
|
|
|
args->content_path = path;
|
2014-06-03 15:34:25 +00:00
|
|
|
args->libretro_path = NULL;
|
|
|
|
|
|
|
|
RARCH_LOG("argv[0]: %s\n", argv[0]);
|
|
|
|
RARCH_LOG("argv[1]: %s\n", argv[1]);
|
|
|
|
RARCH_LOG("argv[2]: %s\n", argv[2]);
|
|
|
|
|
|
|
|
RARCH_LOG("Auto-start game %s.\n", argv[1]);
|
|
|
|
}
|
|
|
|
}
|
2015-01-12 05:51:57 +00:00
|
|
|
#endif
|
2017-05-23 17:43:58 +00:00
|
|
|
|
|
|
|
for (i = 0; i < DEFAULT_DIR_LAST; i++)
|
|
|
|
{
|
|
|
|
const char *dir_path = g_defaults.dirs[i];
|
|
|
|
if (!string_is_empty(dir_path))
|
2017-05-23 18:45:14 +00:00
|
|
|
path_mkdir(dir_path);
|
2017-05-23 17:43:58 +00:00
|
|
|
}
|
2012-11-24 03:23:20 +00:00
|
|
|
}
|
|
|
|
|
2014-06-04 23:17:37 +00:00
|
|
|
static void frontend_psp_deinit(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
#ifndef IS_SALAMANDER
|
2016-05-31 02:42:04 +00:00
|
|
|
verbosity_disable();
|
2019-11-21 18:13:06 +00:00
|
|
|
pthread_terminate();
|
2019-11-23 11:54:45 +00:00
|
|
|
#endif
|
2014-06-04 23:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void frontend_psp_shutdown(bool unused)
|
|
|
|
{
|
|
|
|
(void)unused;
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
2016-09-07 23:25:14 +00:00
|
|
|
//sceKernelExitProcess(0);
|
|
|
|
return;
|
2015-09-02 11:07:13 +00:00
|
|
|
#else
|
2014-06-04 23:17:37 +00:00
|
|
|
sceKernelExitGame();
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2014-06-04 23:17:37 +00:00
|
|
|
}
|
|
|
|
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifndef VITA
|
2014-06-04 23:17:37 +00:00
|
|
|
static int exit_callback(int arg1, int arg2, void *common)
|
|
|
|
{
|
|
|
|
frontend_psp_deinit(NULL);
|
|
|
|
frontend_psp_shutdown(false);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-04-09 03:53:58 +00:00
|
|
|
static int callback_thread(SceSize args, void *argp)
|
2012-11-24 03:23:20 +00:00
|
|
|
{
|
|
|
|
int cbid = sceKernelCreateCallback("Exit callback", exit_callback, NULL);
|
|
|
|
sceKernelRegisterExitCallback(cbid);
|
|
|
|
sceKernelSleepThreadCB();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int setup_callback(void)
|
|
|
|
{
|
2014-09-02 15:42:44 +00:00
|
|
|
int thread_id = sceKernelCreateThread("update_thread",
|
|
|
|
callback_thread, 0x11, 0xFA0, 0, 0);
|
2012-11-24 03:23:20 +00:00
|
|
|
|
|
|
|
if (thread_id >= 0)
|
|
|
|
sceKernelStartThread(thread_id, 0, 0);
|
|
|
|
|
|
|
|
return thread_id;
|
|
|
|
}
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2012-11-24 03:23:20 +00:00
|
|
|
|
2014-05-17 12:56:12 +00:00
|
|
|
static void frontend_psp_init(void *data)
|
2012-11-24 03:23:20 +00:00
|
|
|
{
|
2014-06-04 23:17:37 +00:00
|
|
|
#ifndef IS_SALAMANDER
|
2015-08-12 17:30:30 +00:00
|
|
|
|
2016-08-03 23:26:53 +00:00
|
|
|
#ifdef VITA
|
|
|
|
scePowerSetArmClockFrequency(444);
|
2018-08-02 17:19:16 +00:00
|
|
|
scePowerSetBusClockFrequency(222);
|
|
|
|
scePowerSetGpuClockFrequency(222);
|
|
|
|
scePowerSetGpuXbarClockFrequency(166);
|
2016-08-03 23:26:53 +00:00
|
|
|
sceSysmoduleLoadModule(SCE_SYSMODULE_NET);
|
2020-05-02 06:29:17 +00:00
|
|
|
|
2019-10-01 17:46:49 +00:00
|
|
|
SceAppUtilInitParam appUtilParam;
|
|
|
|
SceAppUtilBootParam appUtilBootParam;
|
|
|
|
memset(&appUtilParam, 0, sizeof(SceAppUtilInitParam));
|
|
|
|
memset(&appUtilBootParam, 0, sizeof(SceAppUtilBootParam));
|
|
|
|
sceAppUtilInit(&appUtilParam, &appUtilBootParam);
|
2016-08-03 23:26:53 +00:00
|
|
|
#else
|
|
|
|
(void)data;
|
2015-08-10 21:29:50 +00:00
|
|
|
/* initialize debug screen */
|
2015-08-30 17:46:19 +00:00
|
|
|
pspDebugScreenInit();
|
2012-11-24 03:23:20 +00:00
|
|
|
pspDebugScreenClear();
|
2015-08-30 17:46:19 +00:00
|
|
|
|
2012-11-24 03:23:20 +00:00
|
|
|
setup_callback();
|
2015-08-30 17:46:19 +00:00
|
|
|
|
2015-08-10 21:29:50 +00:00
|
|
|
pspFpuSetEnable(0); /* disable FPU exceptions */
|
2014-02-18 17:43:23 +00:00
|
|
|
scePowerSetClockFrequency(333,333,166);
|
2014-06-04 23:17:37 +00:00
|
|
|
#endif
|
2017-12-26 08:45:45 +00:00
|
|
|
pthread_init();
|
2016-08-03 23:26:53 +00:00
|
|
|
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2014-06-04 00:35:26 +00:00
|
|
|
|
2014-06-04 23:17:37 +00:00
|
|
|
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER)
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifndef VITA
|
2014-06-04 23:17:37 +00:00
|
|
|
pspSdkLoadStartModule("kernel_functions.prx", PSP_MEMORY_PARTITION_KERNEL);
|
2014-06-04 00:52:29 +00:00
|
|
|
#endif
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2013-01-08 07:38:25 +00:00
|
|
|
}
|
2012-11-24 03:23:20 +00:00
|
|
|
|
2014-06-04 23:17:37 +00:00
|
|
|
static void frontend_psp_exec(const char *path, bool should_load_game)
|
2013-01-08 07:38:25 +00:00
|
|
|
{
|
2016-09-07 23:25:14 +00:00
|
|
|
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) || defined(VITA)
|
2015-06-12 21:38:46 +00:00
|
|
|
char argp[512] = {0};
|
2020-06-08 19:28:39 +00:00
|
|
|
char boot_params[1024];
|
|
|
|
char core_name[256];
|
2015-06-12 21:38:46 +00:00
|
|
|
SceSize args = 0;
|
2014-06-04 23:17:37 +00:00
|
|
|
|
2016-10-07 06:24:27 +00:00
|
|
|
#if !defined(VITA)
|
2014-06-04 23:17:37 +00:00
|
|
|
strlcpy(argp, eboot_path, sizeof(argp));
|
|
|
|
args = strlen(argp) + 1;
|
2016-10-07 06:24:27 +00:00
|
|
|
#endif
|
2014-06-04 23:17:37 +00:00
|
|
|
|
|
|
|
#ifndef IS_SALAMANDER
|
2016-10-03 13:43:03 +00:00
|
|
|
if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT))
|
2014-06-04 23:17:37 +00:00
|
|
|
{
|
|
|
|
argp[args] = '\0';
|
2016-10-03 13:43:03 +00:00
|
|
|
strlcat(argp + args, path_get(RARCH_PATH_CONTENT), sizeof(argp) - args);
|
2014-06-04 23:17:37 +00:00
|
|
|
args += strlen(argp + args) + 1;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
2016-09-07 23:25:14 +00:00
|
|
|
#if defined(VITA)
|
2016-10-07 06:24:27 +00:00
|
|
|
RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp);
|
2020-06-08 19:28:39 +00:00
|
|
|
#ifdef IS_SALAMANDER
|
|
|
|
sceAppMgrGetAppParam(boot_params);
|
|
|
|
if (strstr(boot_params,"psgm:play")) {
|
|
|
|
char *param1 = strstr(boot_params, "¶m=")+7;
|
|
|
|
char *param2 = strstr(boot_params, "¶m2=");
|
|
|
|
memcpy(core_name, param1, param2 - param1);
|
|
|
|
core_name[param2-param1] = 0;
|
|
|
|
sprintf(argp, param2 + 8);
|
|
|
|
int ret = sceAppMgrLoadExec(core_name, (char * const*)((const char*[]){argp, 0}), NULL);
|
|
|
|
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
int ret = sceAppMgrLoadExec(path, args == 0 ? NULL : (char * const*)((const char*[]){argp, 0}), NULL);
|
|
|
|
RARCH_LOG("Attempt to load executable: [%d].\n", ret);
|
|
|
|
}
|
2016-09-07 23:25:14 +00:00
|
|
|
#else
|
2014-06-04 23:17:37 +00:00
|
|
|
exitspawn_kernel(path, args, argp);
|
2016-09-07 23:25:14 +00:00
|
|
|
#endif
|
2014-06-04 23:17:37 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2016-02-05 17:43:23 +00:00
|
|
|
#ifndef IS_SALAMANDER
|
2016-02-04 16:46:50 +00:00
|
|
|
static bool frontend_psp_set_fork(enum frontend_fork fork_mode)
|
2014-10-02 19:39:29 +00:00
|
|
|
{
|
2016-02-04 16:46:50 +00:00
|
|
|
switch (fork_mode)
|
|
|
|
{
|
|
|
|
case FRONTEND_FORK_CORE:
|
2016-02-05 17:43:23 +00:00
|
|
|
RARCH_LOG("FRONTEND_FORK_CORE\n");
|
|
|
|
psp_fork_mode = fork_mode;
|
2016-02-04 16:46:50 +00:00
|
|
|
break;
|
|
|
|
case FRONTEND_FORK_CORE_WITH_ARGS:
|
2016-02-05 17:43:23 +00:00
|
|
|
RARCH_LOG("FRONTEND_FORK_CORE_WITH_ARGS\n");
|
|
|
|
psp_fork_mode = fork_mode;
|
2016-02-04 16:46:50 +00:00
|
|
|
break;
|
2016-02-05 17:57:44 +00:00
|
|
|
case FRONTEND_FORK_RESTART:
|
|
|
|
RARCH_LOG("FRONTEND_FORK_RESTART\n");
|
2016-02-05 17:43:23 +00:00
|
|
|
/* NOTE: We don't implement Salamander, so just turn
|
|
|
|
* this into FRONTEND_FORK_CORE. */
|
|
|
|
psp_fork_mode = FRONTEND_FORK_CORE;
|
|
|
|
break;
|
2016-02-04 16:46:50 +00:00
|
|
|
case FRONTEND_FORK_NONE:
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
2016-02-04 16:08:09 +00:00
|
|
|
|
|
|
|
return true;
|
2014-10-02 19:39:29 +00:00
|
|
|
}
|
2016-02-05 17:43:23 +00:00
|
|
|
#endif
|
2014-06-04 23:17:37 +00:00
|
|
|
|
2020-02-01 16:42:18 +00:00
|
|
|
static void frontend_psp_exitspawn(char *s, size_t len, char *args)
|
2014-06-04 23:17:37 +00:00
|
|
|
{
|
2020-02-01 16:42:18 +00:00
|
|
|
bool should_load_content = false;
|
2014-06-05 04:36:30 +00:00
|
|
|
#ifndef IS_SALAMANDER
|
2016-02-05 17:43:23 +00:00
|
|
|
if (psp_fork_mode == FRONTEND_FORK_NONE)
|
2014-10-02 19:39:29 +00:00
|
|
|
return;
|
2016-02-05 17:43:23 +00:00
|
|
|
|
|
|
|
switch (psp_fork_mode)
|
|
|
|
{
|
|
|
|
case FRONTEND_FORK_CORE_WITH_ARGS:
|
2020-02-01 16:42:18 +00:00
|
|
|
should_load_content = true;
|
2016-02-05 17:43:23 +00:00
|
|
|
break;
|
|
|
|
case FRONTEND_FORK_NONE:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2014-06-04 23:17:37 +00:00
|
|
|
#endif
|
2020-02-01 16:42:18 +00:00
|
|
|
frontend_psp_exec(s, should_load_content);
|
2013-01-08 07:38:25 +00:00
|
|
|
}
|
|
|
|
|
2014-05-16 20:20:33 +00:00
|
|
|
static int frontend_psp_get_rating(void)
|
|
|
|
{
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
|
|
|
return 6; /* Go with a conservative figure for now. */
|
|
|
|
#else
|
2014-05-16 20:20:33 +00:00
|
|
|
return 4;
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2014-05-16 20:20:33 +00:00
|
|
|
}
|
|
|
|
|
2015-04-18 13:28:06 +00:00
|
|
|
static enum frontend_powerstate frontend_psp_get_powerstate(int *seconds, int *percent)
|
|
|
|
{
|
|
|
|
enum frontend_powerstate ret = FRONTEND_POWERSTATE_NONE;
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifndef VITA
|
|
|
|
int battery = scePowerIsBatteryExist();
|
|
|
|
#endif
|
2015-04-18 13:28:06 +00:00
|
|
|
int plugged = scePowerIsPowerOnline();
|
|
|
|
int charging = scePowerIsBatteryCharging();
|
|
|
|
|
|
|
|
*percent = scePowerGetBatteryLifePercent();
|
|
|
|
*seconds = scePowerGetBatteryLifeTime() * 60;
|
|
|
|
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifndef VITA
|
2015-04-18 13:28:06 +00:00
|
|
|
if (!battery)
|
|
|
|
{
|
|
|
|
ret = FRONTEND_POWERSTATE_NO_SOURCE;
|
|
|
|
*seconds = -1;
|
|
|
|
*percent = -1;
|
|
|
|
}
|
2015-08-12 10:33:27 +00:00
|
|
|
else
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2015-08-12 10:33:27 +00:00
|
|
|
if (charging)
|
2015-04-18 13:28:06 +00:00
|
|
|
ret = FRONTEND_POWERSTATE_CHARGING;
|
|
|
|
else if (plugged)
|
|
|
|
ret = FRONTEND_POWERSTATE_CHARGED;
|
|
|
|
else
|
|
|
|
ret = FRONTEND_POWERSTATE_ON_POWER_SOURCE;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2015-04-18 18:03:59 +00:00
|
|
|
enum frontend_architecture frontend_psp_get_architecture(void)
|
|
|
|
{
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
2016-05-18 20:09:01 +00:00
|
|
|
return FRONTEND_ARCH_ARMV7;
|
2015-09-02 11:07:13 +00:00
|
|
|
#else
|
2015-04-18 18:03:59 +00:00
|
|
|
return FRONTEND_ARCH_MIPS;
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2015-04-18 18:03:59 +00:00
|
|
|
}
|
|
|
|
|
2017-05-26 13:52:38 +00:00
|
|
|
static int frontend_psp_parse_drive_list(void *data, bool load_content)
|
2015-06-15 20:45:02 +00:00
|
|
|
{
|
|
|
|
#ifndef IS_SALAMANDER
|
|
|
|
file_list_t *list = (file_list_t*)data;
|
2017-05-26 13:52:38 +00:00
|
|
|
enum msg_hash_enums enum_idx = load_content ?
|
|
|
|
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
|
2019-12-31 12:32:32 +00:00
|
|
|
MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY;
|
2015-06-15 20:45:02 +00:00
|
|
|
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
2016-10-15 10:54:31 +00:00
|
|
|
menu_entries_append_enum(list,
|
2016-12-13 00:43:18 +00:00
|
|
|
"app0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 13:52:38 +00:00
|
|
|
enum_idx,
|
2017-05-26 14:45:28 +00:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2016-08-02 23:15:06 +00:00
|
|
|
menu_entries_append_enum(list,
|
2016-12-13 00:43:18 +00:00
|
|
|
"ur0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 13:52:38 +00:00
|
|
|
enum_idx,
|
2017-05-26 14:45:28 +00:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2016-07-12 23:17:09 +00:00
|
|
|
menu_entries_append_enum(list,
|
2016-12-13 00:43:18 +00:00
|
|
|
"ux0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 13:52:38 +00:00
|
|
|
enum_idx,
|
2017-05-26 14:45:28 +00:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2017-06-05 06:52:20 +00:00
|
|
|
menu_entries_append_enum(list,
|
|
|
|
"uma0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
|
|
|
enum_idx,
|
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2018-07-23 14:11:54 +00:00
|
|
|
menu_entries_append_enum(list,
|
|
|
|
"imc0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
|
|
|
enum_idx,
|
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2015-09-02 11:07:13 +00:00
|
|
|
#else
|
2016-07-12 23:17:09 +00:00
|
|
|
menu_entries_append_enum(list,
|
2016-12-13 00:43:18 +00:00
|
|
|
"ms0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 13:52:38 +00:00
|
|
|
enum_idx,
|
2017-05-26 14:45:28 +00:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2016-07-12 23:17:09 +00:00
|
|
|
menu_entries_append_enum(list,
|
2016-12-13 00:43:18 +00:00
|
|
|
"ef0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 13:52:38 +00:00
|
|
|
enum_idx,
|
2017-05-26 14:45:28 +00:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2016-07-12 23:17:09 +00:00
|
|
|
menu_entries_append_enum(list,
|
2016-12-13 00:43:18 +00:00
|
|
|
"host0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 13:52:38 +00:00
|
|
|
enum_idx,
|
2017-05-26 14:45:28 +00:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0);
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2015-06-15 20:45:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-01 17:46:49 +00:00
|
|
|
#ifdef VITA
|
|
|
|
enum retro_language psp_get_retro_lang_from_langid(int langid)
|
|
|
|
{
|
|
|
|
switch (langid)
|
|
|
|
{
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_JAPANESE:
|
|
|
|
return RETRO_LANGUAGE_JAPANESE;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_FRENCH:
|
|
|
|
return RETRO_LANGUAGE_FRENCH;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_SPANISH:
|
|
|
|
return RETRO_LANGUAGE_SPANISH;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_GERMAN:
|
|
|
|
return RETRO_LANGUAGE_GERMAN;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_ITALIAN:
|
|
|
|
return RETRO_LANGUAGE_ITALIAN;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_DUTCH:
|
|
|
|
return RETRO_LANGUAGE_DUTCH;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_PORTUGUESE_PT:
|
|
|
|
return RETRO_LANGUAGE_PORTUGUESE_PORTUGAL;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_RUSSIAN:
|
|
|
|
return RETRO_LANGUAGE_RUSSIAN;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_KOREAN:
|
|
|
|
return RETRO_LANGUAGE_KOREAN;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_CHINESE_T:
|
|
|
|
return RETRO_LANGUAGE_CHINESE_TRADITIONAL;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_CHINESE_S:
|
|
|
|
return RETRO_LANGUAGE_CHINESE_SIMPLIFIED;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_POLISH:
|
|
|
|
return RETRO_LANGUAGE_POLISH;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_PORTUGUESE_BR:
|
|
|
|
return RETRO_LANGUAGE_PORTUGUESE_BRAZIL;
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_TURKISH:
|
|
|
|
return RETRO_LANGUAGE_TURKISH;
|
2020-05-24 04:47:04 +00:00
|
|
|
#if 0
|
|
|
|
/* TODO/FIXME - this doesn't seem to actually exist */
|
2020-05-02 06:29:17 +00:00
|
|
|
case SCE_SYSTEM_PARAM_LANG_SLOVAK:
|
|
|
|
return RETRO_LANGUAGE_SLOVAK;
|
2020-05-24 04:47:04 +00:00
|
|
|
#endif
|
2019-10-01 17:46:49 +00:00
|
|
|
case SCE_SYSTEM_PARAM_LANG_ENGLISH_US:
|
|
|
|
case SCE_SYSTEM_PARAM_LANG_ENGLISH_GB:
|
|
|
|
default:
|
|
|
|
return RETRO_LANGUAGE_ENGLISH;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
enum retro_language frontend_psp_get_user_language(void)
|
2020-05-02 06:29:17 +00:00
|
|
|
{
|
2019-10-01 17:46:49 +00:00
|
|
|
int langid;
|
|
|
|
sceAppUtilSystemParamGetInt(SCE_SYSTEM_PARAM_ID_LANG, &langid);
|
|
|
|
return psp_get_retro_lang_from_langid(langid);
|
|
|
|
}
|
2019-10-04 10:12:14 +00:00
|
|
|
|
|
|
|
static uint64_t frontend_psp_get_mem_total(void)
|
|
|
|
{
|
|
|
|
return _newlib_heap_end - _newlib_heap_base;
|
|
|
|
}
|
|
|
|
|
|
|
|
static uint64_t frontend_psp_get_mem_used(void)
|
|
|
|
{
|
|
|
|
return _newlib_heap_end - _newlib_heap_cur;
|
|
|
|
}
|
2019-10-01 17:46:49 +00:00
|
|
|
#endif
|
|
|
|
|
2015-07-27 01:44:28 +00:00
|
|
|
frontend_ctx_driver_t frontend_ctx_psp = {
|
2015-04-18 13:28:06 +00:00
|
|
|
frontend_psp_get_environment_settings,
|
|
|
|
frontend_psp_init,
|
|
|
|
frontend_psp_deinit,
|
|
|
|
frontend_psp_exitspawn,
|
2014-06-03 17:21:49 +00:00
|
|
|
NULL, /* process_args */
|
2015-04-18 13:28:06 +00:00
|
|
|
frontend_psp_exec,
|
2016-02-05 17:43:23 +00:00
|
|
|
#ifdef IS_SALAMANDER
|
|
|
|
NULL,
|
|
|
|
#else
|
2015-04-18 13:28:06 +00:00
|
|
|
frontend_psp_set_fork,
|
2016-02-05 17:43:23 +00:00
|
|
|
#endif
|
2015-04-18 13:28:06 +00:00
|
|
|
frontend_psp_shutdown,
|
2014-06-12 14:26:33 +00:00
|
|
|
NULL, /* get_name */
|
2015-04-07 20:48:46 +00:00
|
|
|
NULL, /* get_os */
|
2015-04-18 13:28:06 +00:00
|
|
|
frontend_psp_get_rating,
|
2014-10-17 01:55:16 +00:00
|
|
|
NULL, /* load_content */
|
2015-04-18 18:03:59 +00:00
|
|
|
frontend_psp_get_architecture,
|
2015-04-18 13:28:06 +00:00
|
|
|
frontend_psp_get_powerstate,
|
2015-06-15 20:45:02 +00:00
|
|
|
frontend_psp_parse_drive_list,
|
2019-10-04 10:12:14 +00:00
|
|
|
#ifdef VITA
|
|
|
|
frontend_psp_get_mem_total,
|
|
|
|
frontend_psp_get_mem_used,
|
|
|
|
#else
|
2016-06-12 00:33:07 +00:00
|
|
|
NULL, /* get_mem_total */
|
2016-06-12 10:44:28 +00:00
|
|
|
NULL, /* get_mem_free */
|
2019-10-04 10:12:14 +00:00
|
|
|
#endif
|
2016-07-08 00:10:40 +00:00
|
|
|
NULL, /* install_signal_handler */
|
2016-07-08 00:20:42 +00:00
|
|
|
NULL, /* get_sighandler_state */
|
2016-07-08 10:48:01 +00:00
|
|
|
NULL, /* set_sighandler_state */
|
2016-07-08 00:24:56 +00:00
|
|
|
NULL, /* destroy_sighandler_state */
|
2016-10-09 15:15:50 +00:00
|
|
|
NULL, /* attach_console */
|
|
|
|
NULL, /* detach_console */
|
2018-01-25 20:50:57 +00:00
|
|
|
NULL, /* watch_path_for_changes */
|
|
|
|
NULL, /* check_for_path_changes */
|
2018-06-19 06:50:33 +00:00
|
|
|
NULL, /* set_sustained_performance_mode */
|
2019-02-23 21:50:36 +00:00
|
|
|
NULL, /* get_cpu_model_name */
|
2015-09-02 11:07:13 +00:00
|
|
|
#ifdef VITA
|
2019-10-01 17:46:49 +00:00
|
|
|
frontend_psp_get_user_language,
|
2020-02-13 23:17:55 +00:00
|
|
|
NULL, /* is_narrator_running */
|
|
|
|
NULL, /* accessibility_speak */
|
2015-09-02 11:07:13 +00:00
|
|
|
"vita",
|
|
|
|
#else
|
2019-10-01 17:46:49 +00:00
|
|
|
NULL, /* get_user_language */
|
2020-02-13 23:17:55 +00:00
|
|
|
NULL, /* is_narrator_running */
|
|
|
|
NULL, /* accessibility_speak */
|
2013-07-27 01:59:01 +00:00
|
|
|
"psp",
|
2015-09-02 11:07:13 +00:00
|
|
|
#endif
|
2013-07-27 01:59:01 +00:00
|
|
|
};
|