2018-09-18 08:08:06 +02:00
/* RetroArch - A frontend for libretro.
2018-11-11 17:14:06 +01:00
* Copyright ( C ) 2010 - 2018 - Francisco Javier Trujillo Mata - fjtrujy
2018-09-18 08:08:06 +02: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/>.
*/
# include <stdint.h>
# include "../frontend_driver.h"
# include <io_common.h>
# include <loadfile.h>
# include <unistd.h>
# include <sbv_patches.h>
# include <sifrpc.h>
# include <iopcontrol.h>
# include <libpwroff.h>
2018-12-26 23:40:57 +01:00
# include <audsrv.h>
2019-01-08 00:28:14 +01:00
# include <libpad.h>
2018-09-18 08:08:06 +02:00
enum BootDeviceIDs {
BOOT_DEVICE_UNKNOWN = - 1 ,
BOOT_DEVICE_MC0 = 0 ,
BOOT_DEVICE_MC1 ,
BOOT_DEVICE_CDROM ,
BOOT_DEVICE_MASS ,
BOOT_DEVICE_HDD ,
BOOT_DEVICE_HOST ,
BOOT_DEVICE_COUNT ,
} ;
extern unsigned char poweroff_irx_start [ ] ;
extern unsigned int poweroff_irx_size ;
extern unsigned char ps2dev9_irx_start [ ] ;
extern unsigned int ps2dev9_irx_size ;
extern unsigned char ps2atad_irx_start [ ] ;
extern unsigned int ps2atad_irx_size ;
extern unsigned char ps2hdd_irx_start [ ] ;
extern unsigned int ps2hdd_irx_size ;
extern unsigned char ps2fs_irx_start [ ] ;
extern unsigned int ps2fs_irx_size ;
extern unsigned char iomanX_irx_start [ ] ;
extern unsigned int iomanX_irx_size ;
extern unsigned char fileXio_irx_start [ ] ;
extern unsigned int fileXio_irx_size ;
extern unsigned char freesd_irx_start [ ] ;
extern unsigned int freesd_irx_size ;
extern unsigned char audsrv_irx_start [ ] ;
extern unsigned int audsrv_irx_size ;
extern unsigned char usbd_irx_start [ ] ;
extern unsigned int usbd_irx_size ;
extern unsigned char usbhdfsd_irx_start [ ] ;
extern unsigned int usbhdfsd_irx_size ;
2019-01-03 12:41:29 +01:00
extern unsigned char mcman_irx_start [ ] ;
extern unsigned int mcman_irx_size ;
extern unsigned char mcserv_irx_start [ ] ;
extern unsigned int mcserv_irx_size ;
2018-09-18 08:08:06 +02:00
static unsigned char HDDModulesLoaded = 0 ;
char eboot_path [ 512 ] ;
char user_path [ 512 ] ;
static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE ;
2019-01-03 13:34:12 +01:00
/* Only paths residing on "basic" devices
* ( devices that don ' t require mounting )
* can be specified here , since this system
* doesn ' t perform mounting based on the path .
*/
2018-09-18 08:08:06 +02:00
# define DEFAULT_PATH "mass:"
2019-01-03 13:34:12 +01:00
static int getBootDeviceID ( char * path )
{
if ( ! strncmp ( path , " mc0: " , 4 ) )
return BOOT_DEVICE_MC0 ;
else if ( ! strncmp ( path , " mc1: " , 4 ) )
return BOOT_DEVICE_MC1 ;
else if ( ! strncmp ( path , " cdrom0: " , 7 ) )
return BOOT_DEVICE_CDROM ;
else if ( ! strncmp ( path , " mass: " , 5 ) | | ! strncmp ( path , " mass0: " , 6 ) )
return BOOT_DEVICE_MASS ;
else if ( ! strncmp ( path , " hdd: " , 4 ) | | ! strncmp ( path , " hdd0: " , 5 ) )
return BOOT_DEVICE_HDD ;
else if ( ! strncmp ( path , " host " , 4 ) & & ( ( path [ 4 ] > = ' 0 ' & & path [ 4 ] < = ' 9 ' ) | | path [ 4 ] = = ' : ' ) )
return BOOT_DEVICE_HOST ;
else
return BOOT_DEVICE_UNKNOWN ;
return BOOT_DEVICE_HOST ;
2018-09-18 08:08:06 +02:00
}
2019-01-03 13:34:12 +01:00
/* HACK! If booting from a USB device, keep trying to
* open this program again until it succeeds .
*
* This will ensure that the emulator will be able to load its files .
*/
static void waitUntilDeviceIsReady ( const char * path )
{
2018-09-18 08:08:06 +02:00
FILE * file ;
2019-01-03 13:34:12 +01:00
while ( ( file = fopen ( path , " rb " ) ) = = NULL )
{
/* Wait for a while first, or the IOP
* will get swamped by requests from the EE . */
2018-09-18 08:08:06 +02:00
nopdelay ( ) ;
nopdelay ( ) ;
nopdelay ( ) ;
nopdelay ( ) ;
nopdelay ( ) ;
nopdelay ( ) ;
nopdelay ( ) ;
nopdelay ( ) ;
} ;
fclose ( file ) ;
}
2019-01-03 13:34:12 +01:00
void setPWDOnPFS ( const char * FullCWD_path )
{
int i ;
char * path = NULL ;
for ( i = strlen ( FullCWD_path ) ; i > = 0 ; i - - )
{
/* Try to seperate the CWD from the path to this ELF. */
if ( FullCWD_path [ i ] = = ' : ' )
{
if ( ( path = malloc ( i + 6 + 2 ) ) ! = NULL )
{
strcpy ( path , " pfs0:/ " ) ;
strncat ( path , FullCWD_path , i + 1 ) ;
path [ i + 1 + 6 ] = ' \0 ' ;
}
break ;
}
else if ( ( FullCWD_path [ i ] = = ' \\ ' ) | | ( FullCWD_path [ i ] = = ' / ' ) )
{
if ( ( path = malloc ( i + 6 + 1 ) ) ! = NULL )
{
strcpy ( path , " pfs0:/ " ) ;
strncat ( path , FullCWD_path , i ) ;
path [ i + 6 ] = ' \0 ' ;
}
break ;
}
}
if ( path ! = NULL )
{
chdir ( path ) ;
free ( path ) ;
}
2018-09-18 08:08:06 +02:00
}
2019-01-03 13:34:12 +01:00
static const char * getMountParams ( const char * command , char * BlockDevice )
{
2018-09-18 08:08:06 +02:00
int BlockDeviceNameLen ;
2019-01-03 13:34:12 +01:00
const char * MountPath = NULL ;
2018-09-18 08:08:06 +02:00
2019-01-03 13:34:12 +01:00
if ( strlen ( command ) > 6 & & ( MountPath = strchr ( & command [ 5 ] , ' : ' ) ) ! = NULL )
{
2018-09-18 08:08:06 +02:00
BlockDeviceNameLen = ( unsigned int ) MountPath - ( unsigned int ) command ;
strncpy ( BlockDevice , command , BlockDeviceNameLen ) ;
BlockDevice [ BlockDeviceNameLen ] = ' \0 ' ;
2019-01-03 13:34:12 +01:00
MountPath + + ; /* This is the location of the mount path; */
2018-09-18 08:08:06 +02:00
}
return MountPath ;
}
static void create_path_names ( void )
{
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 ] ) ) ;
/* user data */
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 ] ) ) ;
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 ] ) ) ;
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 ] ) ) ;
/* cache dir */
fill_pathname_join ( g_defaults . dirs [ DEFAULT_DIR_CACHE ] , user_path ,
" TEMP " , sizeof ( g_defaults . dirs [ DEFAULT_DIR_CACHE ] ) ) ;
/* history and main config */
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_str ( FILE_PATH_MAIN_CONFIG ) , sizeof ( g_defaults . path . config ) ) ;
}
static void poweroffCallback ( void * arg )
{
2019-01-03 13:34:12 +01:00
#if 0
/* Close all files and unmount all partitions. */
close ( fd ) ;
2018-09-18 08:08:06 +02:00
2019-01-03 13:34:12 +01:00
/* If you use PFS, close all files and unmount all partitions. */
fileXioDevctl ( " pfs: " , PDIOC_CLOSEALL , NULL , 0 , NULL , 0 )
2018-09-18 08:08:06 +02:00
2019-01-03 13:34:12 +01:00
/* Shut down DEV9, if you used it. */
while ( fileXioDevctl ( " dev9x: " , DDIOC_OFF , NULL , 0 , NULL , 0 ) < 0 ) { } ;
# endif
2018-09-18 08:08:06 +02:00
printf ( " Shutdown! " ) ;
poweroffShutdown ( ) ;
}
static void frontend_ps2_get_environment_settings ( int * argc , char * argv [ ] ,
void * args , void * params_data )
{
char cwd [ FILENAME_MAX ] , blockDevice [ 16 ] ;
const char * mountPoint ;
int bootDeviceID ;
getcwd ( cwd , sizeof ( cwd ) ) ;
bootDeviceID = getBootDeviceID ( cwd ) ;
2019-01-03 13:34:12 +01:00
/* Mount the HDD partition, if required. */
if ( bootDeviceID = = BOOT_DEVICE_HDD )
{
/* Try not to adjust this unless you know what you are doing. The tricky part i keeping the NULL character in the middle of that argument list separated from the number 4. */
static const char PS2HDD_args [ ] = " -o \0 " " 2 " ;
static const char PS2FS_args [ ] = " -o \0 " " 8 " ;
if ( ! HDDModulesLoaded )
{
SifExecModuleBuffer ( poweroff_irx_start , poweroff_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( ps2dev9_irx_start , ps2dev9_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( ps2atad_irx_start , ps2atad_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( ps2hdd_irx_start , ps2hdd_irx_size , sizeof ( PS2HDD_args ) , PS2HDD_args , NULL ) ;
SifExecModuleBuffer ( ps2fs_irx_start , ps2fs_irx_size , sizeof ( PS2FS_args ) , PS2FS_args , NULL ) ;
HDDModulesLoaded = 1 ;
}
/* Attempt to mount the partition. */
if ( ( mountPoint = getMountParams ( cwd , blockDevice ) ) ! = NULL & & ! strncmp ( mountPoint , " pfs: " , 4 ) )
{
2018-09-18 08:08:06 +02:00
fileXioMount ( " pfs0: " , blockDevice , FIO_MT_RDWR ) ;
2019-01-03 13:34:12 +01:00
2018-09-18 08:08:06 +02:00
setPWDOnPFS ( & mountPoint [ 4 ] ) ;
}
2019-01-03 13:34:12 +01:00
}
else if ( bootDeviceID = = BOOT_DEVICE_CDROM )
2018-09-18 08:08:06 +02:00
chdir ( DEFAULT_PATH ) ;
2019-01-03 13:34:12 +01:00
else if ( bootDeviceID = = BOOT_DEVICE_MASS )
2018-09-18 08:08:06 +02:00
waitUntilDeviceIsReady ( argv [ 0 ] ) ;
2019-01-03 13:34:12 +01:00
else if ( bootDeviceID = = BOOT_DEVICE_UNKNOWN ) { }
2018-09-18 08:08:06 +02:00
create_path_names ( ) ;
# ifndef IS_SALAMANDER
if ( ! string_is_empty ( argv [ 1 ] ) )
{
static char path [ PATH_MAX_LENGTH ] = { 0 } ;
struct rarch_main_wrap * args =
( struct rarch_main_wrap * ) params_data ;
if ( args )
{
strlcpy ( path , argv [ 1 ] , sizeof ( path ) ) ;
args - > touched = true ;
args - > no_content = false ;
args - > verbose = false ;
args - > config_path = NULL ;
args - > sram_path = NULL ;
args - > state_path = NULL ;
args - > content_path = path ;
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 ] ) ;
}
}
# endif
int i ;
for ( i = 0 ; i < DEFAULT_DIR_LAST ; i + + )
{
const char * dir_path = g_defaults . dirs [ i ] ;
if ( ! string_is_empty ( dir_path ) )
path_mkdir ( dir_path ) ;
}
}
static void frontend_ps2_init ( void * data )
{
SifInitRpc ( 0 ) ;
2018-10-17 21:11:21 +02:00
# if !defined(DEBUG)
2019-01-03 13:34:12 +01:00
/* Comment this line if you don't wanna debug the output */
while ( ! SifIopReset ( NULL , 0 ) ) { } ;
2018-10-17 21:11:21 +02:00
# endif
2018-09-18 08:08:06 +02:00
while ( ! SifIopSync ( ) ) { } ;
SifInitRpc ( 0 ) ;
sbv_patch_enable_lmb ( ) ;
2019-01-03 13:34:12 +01:00
/* Controllers */
2019-01-03 12:41:29 +01:00
SifLoadModule ( " rom0:SIO2MAN " , 0 , NULL ) ;
SifLoadModule ( " rom0:PADMAN " , 0 , NULL ) ;
2019-01-03 13:34:12 +01:00
/* I/O Files */
2018-09-18 08:08:06 +02:00
SifExecModuleBuffer ( iomanX_irx_start , iomanX_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( fileXio_irx_start , fileXio_irx_size , 0 , NULL , NULL ) ;
2019-01-03 12:41:29 +01:00
2019-01-03 13:34:12 +01:00
/* Memory Card */
2019-01-03 12:41:29 +01:00
SifExecModuleBuffer ( mcman_irx_start , mcman_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( mcserv_irx_start , mcserv_irx_size , 0 , NULL , NULL ) ;
2018-09-18 08:08:06 +02:00
2019-01-03 13:34:12 +01:00
/* USB */
2018-09-18 08:08:06 +02:00
SifExecModuleBuffer ( usbd_irx_start , usbd_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( usbhdfsd_irx_start , usbhdfsd_irx_size , 0 , NULL , NULL ) ;
2018-12-26 23:40:57 +01:00
2019-01-03 13:34:12 +01:00
/* Audio */
2018-09-18 08:08:06 +02:00
SifExecModuleBuffer ( freesd_irx_start , freesd_irx_size , 0 , NULL , NULL ) ;
SifExecModuleBuffer ( audsrv_irx_start , audsrv_irx_size , 0 , NULL , NULL ) ;
2019-01-03 13:34:12 +01:00
/* Initializes audsrv library */
2019-01-08 00:28:14 +01:00
if ( audsrv_init ( ) ) {
2018-12-26 23:40:57 +01:00
RARCH_ERR ( " audsrv library not initalizated \n " ) ;
}
2018-11-12 18:34:50 +01:00
2019-01-08 00:28:14 +01:00
/* Initializes pad library
Must be init with 0 as parameter */
if ( padInit ( 0 ) ! = 1 ) {
RARCH_ERR ( " padInit library not initalizated \n " ) ;
}
2018-11-12 18:34:50 +01:00
# if defined(HAVE_FILE_LOGGER)
retro_main_log_file_init ( " retroarch.log " ) ;
verbosity_enable ( ) ;
# endif
2018-09-18 08:08:06 +02:00
}
static void frontend_ps2_deinit ( void * data )
{
( void ) data ;
# ifndef IS_SALAMANDER
verbosity_disable ( ) ;
# ifdef HAVE_FILE_LOGGER
command_event ( CMD_EVENT_LOG_FILE_DEINIT , NULL ) ;
# endif
# endif
2019-01-08 00:28:14 +01:00
padEnd ( ) ;
audsrv_quit ( ) ;
2018-09-18 08:08:06 +02:00
fileXioUmount ( " pfs0: " ) ;
fileXioExit ( ) ;
SifExitRpc ( ) ;
}
static void frontend_ps2_exec ( const char * path , bool should_load_game )
{
# if defined(IS_SALAMANDER)
char argp [ 512 ] = { 0 } ;
SceSize args = 0 ;
strlcpy ( argp , eboot_path , sizeof ( argp ) ) ;
args = strlen ( argp ) + 1 ;
# ifndef IS_SALAMANDER
if ( should_load_game & & ! path_is_empty ( RARCH_PATH_CONTENT ) )
{
argp [ args ] = ' \0 ' ;
strlcat ( argp + args , path_get ( RARCH_PATH_CONTENT ) , sizeof ( argp ) - args ) ;
args + = strlen ( argp + args ) + 1 ;
}
# endif
RARCH_LOG ( " Attempt to load executable: [%s]. \n " , path ) ;
2019-01-03 13:34:12 +01:00
#if 0
exitspawn_kernel ( path , args , argp ) ; /* I don't know what this is doing */
# endif
2018-09-18 08:08:06 +02:00
# endif
}
# ifndef IS_SALAMANDER
static bool frontend_ps2_set_fork ( enum frontend_fork fork_mode )
{
switch ( fork_mode )
{
case FRONTEND_FORK_CORE :
RARCH_LOG ( " FRONTEND_FORK_CORE \n " ) ;
ps2_fork_mode = fork_mode ;
break ;
case FRONTEND_FORK_CORE_WITH_ARGS :
RARCH_LOG ( " FRONTEND_FORK_CORE_WITH_ARGS \n " ) ;
ps2_fork_mode = fork_mode ;
break ;
case FRONTEND_FORK_RESTART :
RARCH_LOG ( " FRONTEND_FORK_RESTART \n " ) ;
/* NOTE: We don't implement Salamander, so just turn
* this into FRONTEND_FORK_CORE . */
ps2_fork_mode = FRONTEND_FORK_CORE ;
break ;
case FRONTEND_FORK_NONE :
default :
return false ;
}
return true ;
}
# endif
static void frontend_ps2_exitspawn ( char * core_path , size_t core_path_size )
{
bool should_load_game = false ;
# ifndef IS_SALAMANDER
if ( ps2_fork_mode = = FRONTEND_FORK_NONE )
return ;
switch ( ps2_fork_mode )
{
case FRONTEND_FORK_CORE_WITH_ARGS :
should_load_game = true ;
break ;
case FRONTEND_FORK_NONE :
default :
break ;
}
# endif
frontend_ps2_exec ( core_path , should_load_game ) ;
}
static void frontend_ps2_shutdown ( bool unused )
{
poweroffInit ( ) ;
2019-01-03 13:34:12 +01:00
/* Set callback function */
2018-09-18 08:08:06 +02:00
poweroffSetCallback ( & poweroffCallback , NULL ) ;
}
static int frontend_ps2_get_rating ( void )
{
return 10 ;
}
enum frontend_architecture frontend_ps2_get_architecture ( void )
{
return FRONTEND_ARCH_MIPS ;
}
static int frontend_ps2_parse_drive_list ( void * data , bool load_content )
{
# ifndef IS_SALAMANDER
file_list_t * list = ( file_list_t * ) data ;
enum msg_hash_enums enum_idx = load_content ?
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MSG_UNKNOWN ;
menu_entries_append_enum ( list ,
" mc0:/ " ,
msg_hash_to_str ( MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR ) ,
enum_idx ,
FILE_TYPE_DIRECTORY , 0 , 0 ) ;
menu_entries_append_enum ( list ,
" mc1:/ " ,
msg_hash_to_str ( MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR ) ,
enum_idx ,
FILE_TYPE_DIRECTORY , 0 , 0 ) ;
menu_entries_append_enum ( list ,
" mass:/ " ,
msg_hash_to_str ( MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR ) ,
enum_idx ,
FILE_TYPE_DIRECTORY , 0 , 0 ) ;
2019-01-26 14:16:40 +01:00
menu_entries_append_enum ( list ,
" cdfs:/ " ,
msg_hash_to_str ( MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR ) ,
enum_idx ,
FILE_TYPE_DIRECTORY , 0 , 0 ) ;
2018-09-18 08:08:06 +02:00
menu_entries_append_enum ( list ,
" hdd0:/ " ,
msg_hash_to_str ( MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR ) ,
enum_idx ,
FILE_TYPE_DIRECTORY , 0 , 0 ) ;
2018-10-19 21:32:18 +02:00
menu_entries_append_enum ( list ,
2018-11-12 18:34:50 +01:00
" host: " ,
2018-10-19 21:32:18 +02:00
msg_hash_to_str ( MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR ) ,
enum_idx ,
FILE_TYPE_DIRECTORY , 0 , 0 ) ;
2018-09-18 08:08:06 +02:00
# endif
return 0 ;
}
frontend_ctx_driver_t frontend_ctx_ps2 = {
frontend_ps2_get_environment_settings , /* environment_get */
frontend_ps2_init , /* init */
frontend_ps2_deinit , /* deinit */
frontend_ps2_exitspawn , /* exitspawn */
NULL , /* process_args */
frontend_ps2_exec , /* exec */
# ifdef IS_SALAMANDER
NULL , /* set_fork */
# else
frontend_ps2_set_fork , /* set_fork */
# endif
frontend_ps2_shutdown , /* shutdown */
NULL , /* get_name */
NULL , /* get_os */
frontend_ps2_get_rating , /* get_rating */
NULL , /* load_content */
frontend_ps2_get_architecture , /* get_architecture */
NULL , /* get_powerstate */
2018-10-19 21:32:18 +02:00
frontend_ps2_parse_drive_list , /* parse_drive_list */
2018-09-18 08:08:06 +02:00
NULL , /* get_mem_total */
NULL , /* get_mem_free */
NULL , /* install_signal_handler */
NULL , /* get_sighandler_state */
NULL , /* set_sighandler_state */
NULL , /* destroy_sighandler_state */
NULL , /* attach_console */
NULL , /* detach_console */
# ifdef HAVE_LAKKA
NULL , /* get_lakka_version */
# endif
NULL , /* watch_path_for_changes */
NULL , /* check_for_path_changes */
NULL , /* set_sustained_performance_mode */
" null " ,
} ;