2012-11-24 04:23:20 +01:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 01:50:59 +01:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 13:40:32 +01:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2012-11-24 04:23:20 +01: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 12:10:26 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2016-09-12 16:39:50 +02:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../../config.h"
|
|
|
|
#endif
|
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
2019-10-01 19:46:49 +02:00
|
|
|
#include <psp2/system_param.h>
|
2015-09-02 13:07:13 +02:00
|
|
|
#include <psp2/power.h>
|
2016-07-31 09:59:53 +02:00
|
|
|
#include <psp2/sysmodule.h>
|
2016-09-08 01:25:14 +02:00
|
|
|
#include <psp2/appmgr.h>
|
2019-10-01 19:46:49 +02:00
|
|
|
#include <psp2/apputil.h>
|
2016-09-26 01:06:01 +02:00
|
|
|
|
|
|
|
#include "../../bootstrap/vita/sbrk.c"
|
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#else
|
2012-11-24 04:23:20 +01:00
|
|
|
#include <pspkernel.h>
|
|
|
|
#include <pspdebug.h>
|
2014-02-17 14:26:03 +01:00
|
|
|
#include <pspfpu.h>
|
2014-02-18 18:43:23 +01:00
|
|
|
#include <psppower.h>
|
2014-06-04 01:35:26 +01:00
|
|
|
#include <pspsdk.h>
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2012-11-24 04:23:20 +01:00
|
|
|
|
2017-12-26 09:45:45 +01:00
|
|
|
#include <pthread.h>
|
|
|
|
|
2017-01-17 18:12:23 +01:00
|
|
|
#include <string/stdstring.h>
|
2015-09-15 04:49:10 +02:00
|
|
|
#include <boolean.h>
|
2014-10-22 00:23:06 +02:00
|
|
|
#include <file/file_path.h>
|
2015-06-15 22:45:02 +02:00
|
|
|
#ifndef IS_SALAMANDER
|
2016-03-20 14:53:54 +01:00
|
|
|
#include <lists/file_list.h>
|
2015-06-15 22:45:02 +02:00
|
|
|
#endif
|
|
|
|
|
2017-01-17 18:55:59 +01:00
|
|
|
#ifdef HAVE_MENU
|
|
|
|
#include "../../menu/menu_driver.h"
|
|
|
|
#endif
|
|
|
|
|
2015-11-29 01:59:41 +01:00
|
|
|
#include "../frontend_driver.h"
|
|
|
|
#include "../../defaults.h"
|
2016-06-20 17:49:20 +02:00
|
|
|
#include "../../file_path_special.h"
|
2021-05-18 22:15:04 +02:00
|
|
|
#include <defines/psp_defines.h>
|
2017-01-17 18:55:59 +01:00
|
|
|
#include "../../retroarch.h"
|
|
|
|
#include "../../paths.h"
|
2015-11-23 12:03:38 +01:00
|
|
|
#include "../../verbosity.h"
|
2014-06-05 00:17:37 +01:00
|
|
|
|
2022-07-25 02:07:22 -03:00
|
|
|
#if !defined(IS_SALAMANDER) && defined(HAVE_NETWORKING)
|
|
|
|
#include "../../network/netplay/netplay.h"
|
|
|
|
#endif
|
|
|
|
|
2022-01-25 03:50:18 +01:00
|
|
|
#if defined(PSP) && defined(HAVE_KERNEL_PRX)
|
2015-09-20 15:33:54 +02:00
|
|
|
#include "../../bootstrap/psp1/kernel_functions.h"
|
2014-06-05 00:17:37 +01:00
|
|
|
#endif
|
2012-11-24 04:23:20 +01:00
|
|
|
|
2021-01-06 19:14:30 +01:00
|
|
|
#if defined(HAVE_VITAGLES)
|
|
|
|
#include "../../deps/Pigs-In-A-Blanket/include/pib.h"
|
|
|
|
#endif
|
|
|
|
|
2017-01-17 11:43:12 +01:00
|
|
|
#ifndef VITA
|
2015-08-12 12:33:27 +02:00
|
|
|
PSP_MODULE_INFO("RetroArch", 0, 1, 1);
|
2014-03-08 15:46:59 +01:00
|
|
|
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER|THREAD_ATTR_VFPU);
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2012-11-24 04:23:20 +01:00
|
|
|
|
2021-01-06 19:14:30 +01:00
|
|
|
#ifdef SCE_LIBC_SIZE
|
|
|
|
unsigned int sceLibcHeapSize = SCE_LIBC_SIZE;
|
|
|
|
#endif
|
|
|
|
|
2014-06-05 00:17:37 +01:00
|
|
|
char eboot_path[512];
|
2016-09-04 01:55:22 -05:00
|
|
|
char user_path[512];
|
2014-06-05 00:17:37 +01:00
|
|
|
|
2016-02-05 18:43:23 +01:00
|
|
|
static enum frontend_fork psp_fork_mode = FRONTEND_FORK_NONE;
|
2014-10-02 21:39:29 +02:00
|
|
|
|
2021-01-16 16:14:03 +01:00
|
|
|
static void frontend_psp_get_env_settings(int *argc, char *argv[],
|
2014-06-03 03:35:12 +02:00
|
|
|
void *args, void *params_data)
|
2012-11-24 04:23:20 +01:00
|
|
|
{
|
2022-07-29 17:49:10 -03:00
|
|
|
#ifndef IS_SALAMANDER
|
2022-07-25 02:07:22 -03:00
|
|
|
struct rarch_main_wrap *params = (struct rarch_main_wrap*)params_data;
|
2022-07-29 17:49:10 -03:00
|
|
|
#endif
|
2022-07-25 02:07:22 -03:00
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
2022-08-23 15:04:47 +02:00
|
|
|
strlcpy(eboot_path, "app0:/", sizeof(eboot_path));
|
|
|
|
strlcpy(user_path, "ux0:/data/retroarch/", sizeof(user_path));
|
2016-09-04 02:19:16 -05:00
|
|
|
|
2022-07-25 02:07:22 -03:00
|
|
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path,
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
2016-09-04 02:19:16 -05:00
|
|
|
/* bundle data*/
|
2022-07-25 02:07:22 -03:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE],
|
|
|
|
g_defaults.dirs[DEFAULT_DIR_PORT], "",
|
|
|
|
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]));
|
2017-11-14 19:49:50 +01:00
|
|
|
/* user data*/
|
2022-07-25 02:07:22 -03:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], user_path, "assets",
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
2017-11-14 19:49:50 +01:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], user_path, "cheats",
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
2017-05-23 21:16:03 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_PLAYLIST]));
|
2022-10-29 17:34:08 +03:00
|
|
|
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 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"savefiles", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"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]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
|
2019-04-16 17:41:06 +01:00
|
|
|
#ifdef HAVE_VIDEO_LAYOUT
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"layouts", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT]));
|
2019-04-16 17:41:06 +01:00
|
|
|
#endif
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_LOGS], user_path, "logs",
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
|
|
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY], user_path,
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]));
|
|
|
|
fill_pathname_join(g_defaults.path_config, user_path, FILE_PATH_MAIN_CONFIG,
|
|
|
|
sizeof(g_defaults.path_config));
|
2016-09-03 23:58:37 -05:00
|
|
|
#else
|
2022-07-25 02:07:22 -03:00
|
|
|
strlcpy(eboot_path, argv[0], sizeof(eboot_path));
|
|
|
|
/* for PSP, use uppercase directories, and no trailing slashes
|
|
|
|
otherwise mkdir fails */
|
2022-08-23 15:04:47 +02:00
|
|
|
strlcpy(user_path, "ms0:/PSP/RETROARCH", sizeof(user_path));
|
2016-09-09 00:06:13 -05:00
|
|
|
|
2022-07-25 02:07:22 -03:00
|
|
|
fill_pathname_basedir(g_defaults.dirs[DEFAULT_DIR_PORT], argv[0],
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
|
|
|
|
/* bundle data*/
|
|
|
|
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-04 02:19:16 -05:00
|
|
|
/* user data */
|
2022-07-25 02:07:22 -03:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], user_path, "CHEATS",
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"CONFIG", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"DOWNLOADS", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
2017-05-23 21:16:03 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"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 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"SAVEFILES", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"SAVESTATES", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
2017-05-23 19:43:58 +02:00
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT], user_path,
|
2022-07-25 02:07:22 -03:00
|
|
|
"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]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_LOGS], user_path, "LOGS",
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
|
|
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], user_path, "TEMP",
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
|
|
|
|
strlcpy(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY], user_path,
|
|
|
|
sizeof(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]));
|
|
|
|
fill_pathname_join(g_defaults.path_config, user_path, FILE_PATH_MAIN_CONFIG,
|
|
|
|
sizeof(g_defaults.path_config));
|
2016-09-04 12:18:27 -05:00
|
|
|
#endif
|
2016-09-08 01:25:14 +02:00
|
|
|
|
|
|
|
#ifndef IS_SALAMANDER
|
2022-07-25 02:07:22 -03:00
|
|
|
if (params && *argc > 1 && !string_is_empty(argv[1]))
|
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
/* If the process was forked for netplay purposes,
|
|
|
|
DO NOT touch the arguments. */
|
|
|
|
if (!string_is_equal(argv[1], "-H") && !string_is_equal(argv[1], "-C"))
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2014-06-03 17:34:25 +02:00
|
|
|
{
|
2022-07-25 02:07:22 -03:00
|
|
|
params->content_path = argv[1];
|
|
|
|
params->sram_path = NULL;
|
|
|
|
params->state_path = NULL;
|
|
|
|
params->config_path = NULL;
|
|
|
|
params->libretro_path = NULL;
|
2022-10-08 10:39:15 +02:00
|
|
|
params->flags &= ~(RARCH_MAIN_WRAP_FLAG_VERBOSE
|
|
|
|
| RARCH_MAIN_WRAP_FLAG_NO_CONTENT);
|
|
|
|
params->flags |= RARCH_MAIN_WRAP_FLAG_TOUCHED;
|
2014-06-03 17:34:25 +02:00
|
|
|
}
|
2020-11-20 03:55:55 +01:00
|
|
|
|
|
|
|
dir_check_defaults("custom.ini");
|
2015-01-12 06:51:57 +01:00
|
|
|
#endif
|
2012-11-24 04:23:20 +01:00
|
|
|
}
|
|
|
|
|
2014-06-05 00:17:37 +01:00
|
|
|
static void frontend_psp_deinit(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
#ifndef IS_SALAMANDER
|
2019-11-21 19:13:06 +01:00
|
|
|
pthread_terminate();
|
2019-11-23 12:54:45 +01:00
|
|
|
#endif
|
2014-06-05 00:17:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void frontend_psp_shutdown(bool unused)
|
|
|
|
{
|
|
|
|
(void)unused;
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
2016-09-08 01:25:14 +02:00
|
|
|
//sceKernelExitProcess(0);
|
|
|
|
return;
|
2015-09-02 13:07:13 +02:00
|
|
|
#else
|
2022-01-25 03:50:18 +01:00
|
|
|
exit(0);
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2014-06-05 00:17:37 +01:00
|
|
|
}
|
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifndef VITA
|
2014-06-05 00:17:37 +01:00
|
|
|
static int exit_callback(int arg1, int arg2, void *common)
|
|
|
|
{
|
|
|
|
frontend_psp_deinit(NULL);
|
|
|
|
frontend_psp_shutdown(false);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-04-09 05:53:58 +02:00
|
|
|
static int callback_thread(SceSize args, void *argp)
|
2012-11-24 04:23:20 +01:00
|
|
|
{
|
|
|
|
int cbid = sceKernelCreateCallback("Exit callback", exit_callback, NULL);
|
|
|
|
sceKernelRegisterExitCallback(cbid);
|
|
|
|
sceKernelSleepThreadCB();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int setup_callback(void)
|
|
|
|
{
|
2014-09-02 17:42:44 +02:00
|
|
|
int thread_id = sceKernelCreateThread("update_thread",
|
|
|
|
callback_thread, 0x11, 0xFA0, 0, 0);
|
2012-11-24 04:23:20 +01:00
|
|
|
|
|
|
|
if (thread_id >= 0)
|
|
|
|
sceKernelStartThread(thread_id, 0, 0);
|
|
|
|
|
|
|
|
return thread_id;
|
|
|
|
}
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2012-11-24 04:23:20 +01:00
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_psp_init(void *data)
|
2012-11-24 04:23:20 +01:00
|
|
|
{
|
2014-06-05 00:17:37 +01:00
|
|
|
#ifndef IS_SALAMANDER
|
2015-08-12 19:30:30 +02:00
|
|
|
|
2016-08-04 01:26:53 +02:00
|
|
|
#ifdef VITA
|
|
|
|
scePowerSetArmClockFrequency(444);
|
2018-08-02 12:19:16 -05:00
|
|
|
scePowerSetBusClockFrequency(222);
|
|
|
|
scePowerSetGpuClockFrequency(222);
|
|
|
|
scePowerSetGpuXbarClockFrequency(166);
|
2016-08-04 01:26:53 +02:00
|
|
|
sceSysmoduleLoadModule(SCE_SYSMODULE_NET);
|
2020-05-02 13:29:17 +07:00
|
|
|
|
2019-10-01 19:46:49 +02:00
|
|
|
SceAppUtilInitParam appUtilParam;
|
|
|
|
SceAppUtilBootParam appUtilBootParam;
|
|
|
|
memset(&appUtilParam, 0, sizeof(SceAppUtilInitParam));
|
|
|
|
memset(&appUtilBootParam, 0, sizeof(SceAppUtilBootParam));
|
|
|
|
sceAppUtilInit(&appUtilParam, &appUtilBootParam);
|
2021-01-06 19:14:30 +01:00
|
|
|
#if defined(HAVE_VITAGLES)
|
|
|
|
if(pibInit(PIB_SHACCCG|PIB_ENABLE_MSAA|PIB_GET_PROC_ADDR_CORE))
|
|
|
|
return;
|
|
|
|
#endif
|
2016-08-04 01:26:53 +02:00
|
|
|
#else
|
|
|
|
(void)data;
|
2015-08-10 23:29:50 +02:00
|
|
|
/* initialize debug screen */
|
2015-08-30 19:46:19 +02:00
|
|
|
pspDebugScreenInit();
|
2012-11-24 04:23:20 +01:00
|
|
|
pspDebugScreenClear();
|
2015-08-30 19:46:19 +02:00
|
|
|
|
2012-11-24 04:23:20 +01:00
|
|
|
setup_callback();
|
2015-08-30 19:46:19 +02:00
|
|
|
|
2015-08-10 23:29:50 +02:00
|
|
|
pspFpuSetEnable(0); /* disable FPU exceptions */
|
2014-02-18 18:43:23 +01:00
|
|
|
scePowerSetClockFrequency(333,333,166);
|
2014-06-05 00:17:37 +01:00
|
|
|
#endif
|
2017-12-26 09:45:45 +01:00
|
|
|
pthread_init();
|
2016-08-04 01:26:53 +02:00
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2014-06-04 01:35:26 +01:00
|
|
|
|
2022-10-29 17:34:08 +03:00
|
|
|
#if defined(PSP) && defined(HAVE_KERNEL_PRX)
|
2014-06-05 00:17:37 +01:00
|
|
|
pspSdkLoadStartModule("kernel_functions.prx", PSP_MEMORY_PARTITION_KERNEL);
|
2014-06-04 02:52:29 +02:00
|
|
|
#endif
|
2013-01-08 08:38:25 +01:00
|
|
|
}
|
2012-11-24 04:23:20 +01:00
|
|
|
|
2014-06-05 00:17:37 +01:00
|
|
|
static void frontend_psp_exec(const char *path, bool should_load_game)
|
2013-01-08 08:38:25 +01:00
|
|
|
{
|
2022-01-25 03:50:18 +01:00
|
|
|
#if defined(PSP)
|
2022-07-25 02:07:22 -03:00
|
|
|
#ifdef HAVE_KERNEL_PRX
|
|
|
|
char argp[PATH_MAX_LENGTH];
|
|
|
|
SceSize args = strlcpy(argp, eboot_path, sizeof(argp)) + 1;
|
2014-06-05 00:17:37 +01:00
|
|
|
|
|
|
|
#ifndef IS_SALAMANDER
|
2022-07-25 02:07:22 -03:00
|
|
|
if (args < sizeof(argp) && should_load_game)
|
2014-06-05 00:17:37 +01:00
|
|
|
{
|
2022-07-25 02:07:22 -03:00
|
|
|
const char *content = path_get(RARCH_PATH_CONTENT);
|
|
|
|
|
|
|
|
if (!string_is_empty(content))
|
|
|
|
args += strlcpy(argp + args, content, sizeof(argp) - args) + 1;
|
2014-06-05 00:17:37 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-07-25 02:07:22 -03:00
|
|
|
if (args > sizeof(argp))
|
|
|
|
args = sizeof(argp);
|
|
|
|
|
|
|
|
exitspawn_kernel(path, args, argp);
|
|
|
|
#endif
|
|
|
|
#elif defined(VITA)
|
|
|
|
#ifndef IS_SALAMANDER
|
|
|
|
#ifdef HAVE_NETWORKING
|
2022-07-25 05:43:48 -03:00
|
|
|
char *arg_data[NETPLAY_FORK_MAX_ARGS];
|
2022-07-25 02:07:22 -03:00
|
|
|
#else
|
2022-07-25 05:43:48 -03:00
|
|
|
char *arg_data[2];
|
2022-07-25 02:07:22 -03:00
|
|
|
#endif
|
|
|
|
char game_path[PATH_MAX_LENGTH];
|
|
|
|
#else
|
2022-07-25 05:43:48 -03:00
|
|
|
char *arg_data[2];
|
2022-07-25 02:07:22 -03:00
|
|
|
char boot_params[PATH_MAX_LENGTH];
|
|
|
|
#endif
|
|
|
|
|
|
|
|
arg_data[0] = NULL;
|
|
|
|
|
|
|
|
#ifndef IS_SALAMANDER
|
|
|
|
if (should_load_game)
|
|
|
|
{
|
|
|
|
const char *content = path_get(RARCH_PATH_CONTENT);
|
|
|
|
|
|
|
|
#ifdef HAVE_NETWORKING
|
|
|
|
if (!netplay_driver_ctl(RARCH_NETPLAY_CTL_GET_FORK_ARGS,
|
|
|
|
(void*)arg_data))
|
|
|
|
#endif
|
|
|
|
if (!string_is_empty(content))
|
|
|
|
{
|
|
|
|
strlcpy(game_path, content, sizeof(game_path));
|
|
|
|
arg_data[0] = game_path;
|
|
|
|
arg_data[1] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
2020-06-08 21:28:39 +02:00
|
|
|
sceAppMgrGetAppParam(boot_params);
|
2022-07-25 02:07:22 -03:00
|
|
|
if (strstr(boot_params, "psgm:play"))
|
2020-07-23 07:39:08 +02:00
|
|
|
{
|
2020-11-07 14:03:12 -08:00
|
|
|
char *param1 = strstr(boot_params, "¶m=");
|
2020-06-08 21:28:39 +02:00
|
|
|
char *param2 = strstr(boot_params, "¶m2=");
|
2020-11-11 18:13:20 -08:00
|
|
|
|
2022-07-25 02:07:22 -03:00
|
|
|
if (param1 && param2)
|
2020-11-07 14:03:12 -08:00
|
|
|
{
|
2022-07-25 02:07:22 -03:00
|
|
|
char *delim;
|
|
|
|
|
|
|
|
param1 += STRLEN_CONST("¶m=");
|
|
|
|
param2 += STRLEN_CONST("¶m2=");
|
|
|
|
|
|
|
|
delim = strchr(param1, '&');
|
|
|
|
if (delim)
|
|
|
|
*delim = '\0';
|
|
|
|
delim = strchr(param2, '&');
|
|
|
|
if (delim)
|
|
|
|
*delim = '\0';
|
|
|
|
|
|
|
|
if (!string_is_empty(param1))
|
2020-11-11 18:13:20 -08:00
|
|
|
{
|
2022-07-25 02:07:22 -03:00
|
|
|
path = param1;
|
|
|
|
|
|
|
|
if (!string_is_empty(param2))
|
|
|
|
{
|
|
|
|
arg_data[0] = param2;
|
|
|
|
arg_data[1] = NULL;
|
|
|
|
}
|
2020-11-11 18:13:20 -08:00
|
|
|
}
|
2020-11-07 14:03:12 -08:00
|
|
|
}
|
2020-06-08 21:28:39 +02:00
|
|
|
}
|
|
|
|
#endif
|
2022-07-25 02:07:22 -03:00
|
|
|
sceAppMgrLoadExec(path, arg_data[0] ? arg_data : NULL, NULL);
|
2016-09-08 01:25:14 +02:00
|
|
|
#endif
|
2014-06-05 00:17:37 +01:00
|
|
|
}
|
|
|
|
|
2016-02-05 18:43:23 +01:00
|
|
|
#ifndef IS_SALAMANDER
|
2016-02-04 17:46:50 +01:00
|
|
|
static bool frontend_psp_set_fork(enum frontend_fork fork_mode)
|
2014-10-02 21:39:29 +02:00
|
|
|
{
|
2016-02-04 17:46:50 +01:00
|
|
|
switch (fork_mode)
|
|
|
|
{
|
|
|
|
case FRONTEND_FORK_CORE:
|
2016-02-05 18:43:23 +01:00
|
|
|
psp_fork_mode = fork_mode;
|
2016-02-04 17:46:50 +01:00
|
|
|
break;
|
|
|
|
case FRONTEND_FORK_CORE_WITH_ARGS:
|
2016-02-05 18:43:23 +01:00
|
|
|
psp_fork_mode = fork_mode;
|
2016-02-04 17:46:50 +01:00
|
|
|
break;
|
2016-02-05 18:57:44 +01:00
|
|
|
case FRONTEND_FORK_RESTART:
|
2016-02-05 18:43:23 +01: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 17:46:50 +01:00
|
|
|
case FRONTEND_FORK_NONE:
|
|
|
|
default:
|
|
|
|
return false;
|
|
|
|
}
|
2016-02-04 17:08:09 +01:00
|
|
|
|
|
|
|
return true;
|
2014-10-02 21:39:29 +02:00
|
|
|
}
|
2016-02-05 18:43:23 +01:00
|
|
|
#endif
|
2014-06-05 00:17:37 +01:00
|
|
|
|
2020-02-01 17:42:18 +01:00
|
|
|
static void frontend_psp_exitspawn(char *s, size_t len, char *args)
|
2014-06-05 00:17:37 +01:00
|
|
|
{
|
2020-02-01 17:42:18 +01:00
|
|
|
bool should_load_content = false;
|
2014-06-05 06:36:30 +02:00
|
|
|
#ifndef IS_SALAMANDER
|
2016-02-05 18:43:23 +01:00
|
|
|
if (psp_fork_mode == FRONTEND_FORK_NONE)
|
2014-10-02 21:39:29 +02:00
|
|
|
return;
|
2016-02-05 18:43:23 +01:00
|
|
|
|
|
|
|
switch (psp_fork_mode)
|
|
|
|
{
|
|
|
|
case FRONTEND_FORK_CORE_WITH_ARGS:
|
2020-02-01 17:42:18 +01:00
|
|
|
should_load_content = true;
|
2016-02-05 18:43:23 +01:00
|
|
|
break;
|
|
|
|
case FRONTEND_FORK_NONE:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2014-06-05 00:17:37 +01:00
|
|
|
#endif
|
2020-02-01 17:42:18 +01:00
|
|
|
frontend_psp_exec(s, should_load_content);
|
2013-01-08 08:38:25 +01:00
|
|
|
}
|
|
|
|
|
2014-05-16 22:20:33 +02:00
|
|
|
static int frontend_psp_get_rating(void)
|
|
|
|
{
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
|
|
|
return 6; /* Go with a conservative figure for now. */
|
|
|
|
#else
|
2014-05-16 22:20:33 +02:00
|
|
|
return 4;
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2014-05-16 22:20:33 +02:00
|
|
|
}
|
|
|
|
|
2015-04-18 15:28:06 +02:00
|
|
|
static enum frontend_powerstate frontend_psp_get_powerstate(int *seconds, int *percent)
|
|
|
|
{
|
|
|
|
enum frontend_powerstate ret = FRONTEND_POWERSTATE_NONE;
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifndef VITA
|
|
|
|
int battery = scePowerIsBatteryExist();
|
|
|
|
#endif
|
2015-04-18 15:28:06 +02:00
|
|
|
int plugged = scePowerIsPowerOnline();
|
|
|
|
int charging = scePowerIsBatteryCharging();
|
|
|
|
|
|
|
|
*percent = scePowerGetBatteryLifePercent();
|
|
|
|
*seconds = scePowerGetBatteryLifeTime() * 60;
|
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifndef VITA
|
2015-04-18 15:28:06 +02:00
|
|
|
if (!battery)
|
|
|
|
{
|
|
|
|
ret = FRONTEND_POWERSTATE_NO_SOURCE;
|
|
|
|
*seconds = -1;
|
|
|
|
*percent = -1;
|
|
|
|
}
|
2015-08-12 12:33:27 +02:00
|
|
|
else
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2015-08-12 12:33:27 +02:00
|
|
|
if (charging)
|
2015-04-18 15:28:06 +02:00
|
|
|
ret = FRONTEND_POWERSTATE_CHARGING;
|
|
|
|
else if (plugged)
|
|
|
|
ret = FRONTEND_POWERSTATE_CHARGED;
|
|
|
|
else
|
|
|
|
ret = FRONTEND_POWERSTATE_ON_POWER_SOURCE;
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-01-16 16:14:03 +01:00
|
|
|
enum frontend_architecture frontend_psp_get_arch(void)
|
2015-04-18 20:03:59 +02:00
|
|
|
{
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
2016-05-18 22:09:01 +02:00
|
|
|
return FRONTEND_ARCH_ARMV7;
|
2015-09-02 13:07:13 +02:00
|
|
|
#else
|
2015-04-18 20:03:59 +02:00
|
|
|
return FRONTEND_ARCH_MIPS;
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2015-04-18 20:03:59 +02:00
|
|
|
}
|
|
|
|
|
2017-05-26 15:52:38 +02:00
|
|
|
static int frontend_psp_parse_drive_list(void *data, bool load_content)
|
2015-06-15 22:45:02 +02:00
|
|
|
{
|
|
|
|
#ifndef IS_SALAMANDER
|
|
|
|
file_list_t *list = (file_list_t*)data;
|
2017-05-26 15:52:38 +02: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 22:45:02 +02:00
|
|
|
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
2022-08-27 17:40:52 +02:00
|
|
|
menu_entries_append(list,
|
2016-12-13 01:43:18 +01:00
|
|
|
"app0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 15:52:38 +02:00
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
|
|
|
menu_entries_append(list,
|
2016-12-13 01:43:18 +01:00
|
|
|
"ur0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 15:52:38 +02:00
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
|
|
|
menu_entries_append(list,
|
2016-12-13 01:43:18 +01:00
|
|
|
"ux0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 15:52:38 +02:00
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
|
|
|
menu_entries_append(list,
|
2017-06-05 08:52:20 +02:00
|
|
|
"uma0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
|
|
|
menu_entries_append(list,
|
2018-07-23 23:11:54 +09:00
|
|
|
"imc0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
2015-09-02 13:07:13 +02:00
|
|
|
#else
|
2022-08-27 17:40:52 +02:00
|
|
|
menu_entries_append(list,
|
2016-12-13 01:43:18 +01:00
|
|
|
"ms0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 15:52:38 +02:00
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
|
|
|
menu_entries_append(list,
|
2016-12-13 01:43:18 +01:00
|
|
|
"ef0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 15:52:38 +02:00
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
|
|
|
menu_entries_append(list,
|
2016-12-13 01:43:18 +01:00
|
|
|
"host0:/",
|
|
|
|
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
|
2017-05-26 15:52:38 +02:00
|
|
|
enum_idx,
|
2022-08-27 17:40:52 +02:00
|
|
|
FILE_TYPE_DIRECTORY, 0, 0, NULL);
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2015-06-15 22:45:02 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-10-01 19:46:49 +02: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 06:47:04 +02:00
|
|
|
#if 0
|
|
|
|
/* TODO/FIXME - this doesn't seem to actually exist */
|
2020-05-02 13:29:17 +07:00
|
|
|
case SCE_SYSTEM_PARAM_LANG_SLOVAK:
|
|
|
|
return RETRO_LANGUAGE_SLOVAK;
|
2020-05-24 06:47:04 +02:00
|
|
|
#endif
|
2019-10-01 19:46:49 +02: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 13:29:17 +07:00
|
|
|
{
|
2019-10-01 19:46:49 +02:00
|
|
|
int langid;
|
|
|
|
sceAppUtilSystemParamGetInt(SCE_SYSTEM_PARAM_ID_LANG, &langid);
|
|
|
|
return psp_get_retro_lang_from_langid(langid);
|
|
|
|
}
|
2019-10-04 12:12:14 +02:00
|
|
|
|
2021-01-16 16:14:03 +01:00
|
|
|
static uint64_t frontend_psp_get_total_mem(void)
|
2019-10-04 12:12:14 +02:00
|
|
|
{
|
|
|
|
return _newlib_heap_end - _newlib_heap_base;
|
|
|
|
}
|
|
|
|
|
2021-01-16 16:14:03 +01:00
|
|
|
static uint64_t frontend_psp_get_free_mem(void)
|
2019-10-04 12:12:14 +02:00
|
|
|
{
|
|
|
|
return _newlib_heap_end - _newlib_heap_cur;
|
|
|
|
}
|
2019-10-01 19:46:49 +02:00
|
|
|
#endif
|
|
|
|
|
2015-07-27 03:44:28 +02:00
|
|
|
frontend_ctx_driver_t frontend_ctx_psp = {
|
2021-01-16 16:14:03 +01:00
|
|
|
frontend_psp_get_env_settings,/* get_env_settings */
|
|
|
|
frontend_psp_init, /* init */
|
|
|
|
frontend_psp_deinit, /* deinit */
|
|
|
|
frontend_psp_exitspawn, /* exitspawn */
|
|
|
|
NULL, /* process_args */
|
|
|
|
frontend_psp_exec, /* exec */
|
2016-02-05 18:43:23 +01:00
|
|
|
#ifdef IS_SALAMANDER
|
2021-01-16 16:14:03 +01:00
|
|
|
NULL, /* set_fork */
|
2016-02-05 18:43:23 +01:00
|
|
|
#else
|
2021-01-16 16:14:03 +01:00
|
|
|
frontend_psp_set_fork, /* set_fork */
|
|
|
|
#endif
|
|
|
|
frontend_psp_shutdown, /* shutdown */
|
|
|
|
NULL, /* get_name */
|
|
|
|
NULL, /* get_os */
|
|
|
|
frontend_psp_get_rating, /* get_rating */
|
|
|
|
NULL, /* content_loaded */
|
|
|
|
frontend_psp_get_arch, /* get_architecture */
|
2015-04-18 15:28:06 +02:00
|
|
|
frontend_psp_get_powerstate,
|
2015-06-15 22:45:02 +02:00
|
|
|
frontend_psp_parse_drive_list,
|
2019-10-04 12:12:14 +02:00
|
|
|
#ifdef VITA
|
2021-01-16 16:14:03 +01:00
|
|
|
frontend_psp_get_total_mem,
|
|
|
|
frontend_psp_get_free_mem,
|
2019-10-04 12:12:14 +02:00
|
|
|
#else
|
2021-01-16 16:14:03 +01:00
|
|
|
NULL, /* get_total_mem */
|
|
|
|
NULL, /* get_free_mem */
|
2019-10-04 12:12:14 +02:00
|
|
|
#endif
|
2016-07-08 02:10:40 +02:00
|
|
|
NULL, /* install_signal_handler */
|
2016-07-08 02:20:42 +02:00
|
|
|
NULL, /* get_sighandler_state */
|
2016-07-08 12:48:01 +02:00
|
|
|
NULL, /* set_sighandler_state */
|
2016-07-08 02:24:56 +02:00
|
|
|
NULL, /* destroy_sighandler_state */
|
2016-10-09 17:15:50 +02:00
|
|
|
NULL, /* attach_console */
|
|
|
|
NULL, /* detach_console */
|
2020-11-23 18:44:24 +01:00
|
|
|
NULL, /* get_lakka_version */
|
2020-11-23 21:29:26 +01:00
|
|
|
NULL, /* set_screen_brightness */
|
2018-01-25 15:50:57 -05:00
|
|
|
NULL, /* watch_path_for_changes */
|
|
|
|
NULL, /* check_for_path_changes */
|
2018-06-19 02:50:33 -04:00
|
|
|
NULL, /* set_sustained_performance_mode */
|
2019-02-23 16:50:36 -05:00
|
|
|
NULL, /* get_cpu_model_name */
|
2015-09-02 13:07:13 +02:00
|
|
|
#ifdef VITA
|
2021-01-16 16:14:03 +01:00
|
|
|
frontend_psp_get_user_language, /* get_user_language */
|
2020-02-14 00:17:55 +01:00
|
|
|
NULL, /* is_narrator_running */
|
|
|
|
NULL, /* accessibility_speak */
|
2022-01-17 20:38:04 +01:00
|
|
|
NULL, /* set_gamemode */
|
2021-01-16 16:14:03 +01:00
|
|
|
"vita", /* ident */
|
2015-09-02 13:07:13 +02:00
|
|
|
#else
|
2019-10-01 19:46:49 +02:00
|
|
|
NULL, /* get_user_language */
|
2020-02-14 00:17:55 +01:00
|
|
|
NULL, /* is_narrator_running */
|
|
|
|
NULL, /* accessibility_speak */
|
2021-12-14 15:07:42 +02:00
|
|
|
NULL, /* set_gamemode */
|
2021-01-16 16:14:03 +01:00
|
|
|
"psp", /* ident */
|
2015-09-02 13:07:13 +02:00
|
|
|
#endif
|
2021-01-16 16:14:03 +01:00
|
|
|
NULL /* get_video_driver */
|
2013-07-27 03:59:01 +02:00
|
|
|
};
|