2012-04-21 23:13:50 +02:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 01:50:59 +01:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2014 - Daniel De Matteis
|
|
|
|
* Copyright (C) 2012-2014 - Michael Lelli
|
2011-12-14 12:49:13 +01:00
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2011-12-14 12:49:13 +01:00
|
|
|
* 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.
|
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2011-12-14 12:49:13 +01:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 23:31:57 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2011-12-14 12:49:13 +01:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2014-02-11 07:48:53 +01:00
|
|
|
#include "../../boolean.h"
|
2013-01-08 07:44:57 +01:00
|
|
|
#include "../../driver.h"
|
|
|
|
#include "../../general.h"
|
2013-08-25 11:07:06 +02:00
|
|
|
#include "../../libretro_private.h"
|
2012-07-28 15:54:35 +02:00
|
|
|
|
2013-01-09 00:10:19 +01:00
|
|
|
#include "../../console/rarch_console.h"
|
|
|
|
#include "../../file.h"
|
2012-01-08 00:57:44 +01:00
|
|
|
|
2013-01-09 00:10:19 +01:00
|
|
|
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
2013-01-08 07:44:57 +01:00
|
|
|
#include "../../wii/mem2_manager.h"
|
2012-09-01 04:20:30 +02:00
|
|
|
#endif
|
2012-08-27 20:36:05 -04:00
|
|
|
|
2011-12-14 16:01:16 +01:00
|
|
|
#include <stdlib.h>
|
2011-12-14 12:49:13 +01:00
|
|
|
#include <stddef.h>
|
2012-01-08 00:57:44 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2012-08-24 02:23:50 -04:00
|
|
|
#include <dirent.h>
|
|
|
|
#ifndef _DIRENT_HAVE_D_TYPE
|
2012-01-08 00:57:44 +01:00
|
|
|
#include <sys/stat.h>
|
2012-08-24 02:23:50 -04:00
|
|
|
#endif
|
2012-01-08 00:57:44 +01:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
|
2012-08-07 05:27:27 +02:00
|
|
|
#ifdef HW_RVL
|
2012-08-22 15:56:20 -04:00
|
|
|
#include <ogc/ios.h>
|
2012-08-27 22:50:46 -04:00
|
|
|
#include <ogc/usbstorage.h>
|
|
|
|
#include <sdcard/wiisd_io.h>
|
2013-11-03 17:39:12 +01:00
|
|
|
extern void system_exec_wii(const char *path, bool should_load_game);
|
2012-08-07 05:27:27 +02:00
|
|
|
#endif
|
2011-12-14 14:52:58 +01:00
|
|
|
#include <sdcard/gcsd.h>
|
|
|
|
#include <fat.h>
|
2012-01-08 00:57:44 +01:00
|
|
|
|
2013-01-09 00:10:19 +01:00
|
|
|
#ifdef IS_SALAMANDER
|
2013-11-11 10:37:39 +01:00
|
|
|
char libretro_path[512];
|
2013-01-09 00:10:19 +01:00
|
|
|
|
|
|
|
static void find_and_set_first_file(void)
|
|
|
|
{
|
|
|
|
//Last fallback - we'll need to start the first executable file
|
|
|
|
// we can find in the RetroArch cores directory
|
|
|
|
|
|
|
|
char first_file[512] = {0};
|
2013-01-09 07:59:24 +01:00
|
|
|
find_first_libretro_core(first_file, sizeof(first_file),
|
2013-01-09 00:10:19 +01:00
|
|
|
default_paths.core_dir, "dol");
|
|
|
|
|
|
|
|
if(first_file[0])
|
2013-11-11 10:37:39 +01:00
|
|
|
strlcpy(libretro_path, first_file, sizeof(libretro_path));
|
2013-01-09 00:10:19 +01:00
|
|
|
else
|
|
|
|
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
|
|
|
|
}
|
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_gx_salamander_init(void)
|
2013-01-09 00:10:19 +01:00
|
|
|
{
|
|
|
|
char tmp_str[512] = {0};
|
|
|
|
bool config_file_exists;
|
|
|
|
|
2014-05-31 08:15:57 +02:00
|
|
|
if (path_file_exists(default_paths.config_path))
|
2013-01-09 00:10:19 +01:00
|
|
|
config_file_exists = true;
|
|
|
|
|
|
|
|
//try to find CORE executable
|
|
|
|
char core_executable[1024];
|
2013-11-03 17:39:12 +01:00
|
|
|
fill_pathname_join(core_executable, default_paths.core_dir, "CORE.dol", sizeof(core_executable));
|
2013-01-09 00:10:19 +01:00
|
|
|
|
|
|
|
if(path_file_exists(core_executable))
|
|
|
|
{
|
|
|
|
//Start CORE executable
|
2013-11-11 10:37:39 +01:00
|
|
|
strlcpy(libretro_path, core_executable, sizeof(libretro_path));
|
|
|
|
RARCH_LOG("Start [%s].\n", libretro_path);
|
2013-01-09 00:10:19 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(config_file_exists)
|
|
|
|
{
|
2014-05-31 08:15:57 +02:00
|
|
|
config_file_t * conf = config_file_new(default_paths.config_path);
|
2013-05-05 23:06:43 -04:00
|
|
|
if (!conf) // stupid libfat bug or something; somtimes it says the file is there when it doesn't
|
|
|
|
config_file_exists = false;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
config_get_array(conf, "libretro_path", tmp_str, sizeof(tmp_str));
|
|
|
|
config_file_free(conf);
|
2013-11-11 10:37:39 +01:00
|
|
|
strlcpy(libretro_path, tmp_str, sizeof(libretro_path));
|
2013-05-05 23:06:43 -04:00
|
|
|
}
|
2013-01-09 00:10:19 +01:00
|
|
|
}
|
|
|
|
|
2013-11-11 10:37:39 +01:00
|
|
|
if(!config_file_exists || !strcmp(libretro_path, ""))
|
2013-01-09 00:10:19 +01:00
|
|
|
find_and_set_first_file();
|
|
|
|
else
|
|
|
|
{
|
2013-11-11 10:37:39 +01:00
|
|
|
RARCH_LOG("Start [%s] found in retroarch.cfg.\n", libretro_path);
|
2013-01-09 00:10:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!config_file_exists)
|
|
|
|
{
|
|
|
|
config_file_t *new_conf = config_file_new(NULL);
|
2013-11-11 10:37:39 +01:00
|
|
|
config_set_string(new_conf, "libretro_path", libretro_path);
|
2014-05-31 08:15:57 +02:00
|
|
|
config_file_write(new_conf, default_paths.config_path);
|
2013-01-09 00:10:19 +01:00
|
|
|
config_file_free(new_conf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2012-08-27 22:50:46 -04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
GX_DEVICE_SD = 0,
|
|
|
|
GX_DEVICE_USB,
|
|
|
|
GX_DEVICE_END
|
|
|
|
};
|
|
|
|
|
2012-08-10 23:42:24 -04:00
|
|
|
#if defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
2012-08-10 22:49:12 -04:00
|
|
|
static devoptab_t dotab_stdout = {
|
|
|
|
"stdout", // device name
|
|
|
|
0, // size of file structure
|
|
|
|
NULL, // device open
|
|
|
|
NULL, // device close
|
|
|
|
NULL, // device write
|
|
|
|
NULL, // device read
|
|
|
|
NULL, // device seek
|
|
|
|
NULL, // device fstat
|
|
|
|
NULL, // device stat
|
|
|
|
NULL, // device link
|
|
|
|
NULL, // device unlink
|
|
|
|
NULL, // device chdir
|
|
|
|
NULL, // device rename
|
|
|
|
NULL, // device mkdir
|
|
|
|
0, // dirStateSize
|
|
|
|
NULL, // device diropen_r
|
|
|
|
NULL, // device dirreset_r
|
|
|
|
NULL, // device dirnext_r
|
|
|
|
NULL, // device dirclose_r
|
|
|
|
NULL, // device statvfs_r
|
|
|
|
NULL, // device ftrunctate_r
|
|
|
|
NULL, // device fsync_r
|
|
|
|
NULL, // deviceData;
|
|
|
|
};
|
2012-08-10 23:42:24 -04:00
|
|
|
#endif
|
2012-08-10 22:49:12 -04:00
|
|
|
|
2012-08-29 15:15:24 -04:00
|
|
|
#ifdef HW_RVL
|
|
|
|
static struct {
|
|
|
|
bool mounted;
|
|
|
|
const DISC_INTERFACE *interface;
|
|
|
|
const char *name;
|
|
|
|
} gx_devices[GX_DEVICE_END];
|
|
|
|
static mutex_t gx_device_mutex;
|
2012-08-10 22:49:12 -04:00
|
|
|
|
2012-08-27 22:50:46 -04:00
|
|
|
static void *gx_devthread(void *a)
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
LWP_MutexLock(gx_device_mutex);
|
|
|
|
unsigned i;
|
|
|
|
for (i = 0; i < GX_DEVICE_END; i++)
|
|
|
|
{
|
|
|
|
if (gx_devices[i].mounted && !gx_devices[i].interface->isInserted())
|
|
|
|
{
|
|
|
|
gx_devices[i].mounted = false;
|
|
|
|
char n[8];
|
|
|
|
snprintf(n, sizeof(n), "%s:", gx_devices[i].name);
|
|
|
|
fatUnmount(n);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LWP_MutexUnlock(gx_device_mutex);
|
|
|
|
usleep(100000);
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2012-08-29 15:15:24 -04:00
|
|
|
static int gx_get_device_from_path(const char *path)
|
|
|
|
{
|
|
|
|
if (strstr(path, "sd:") == path)
|
|
|
|
return GX_DEVICE_SD;
|
|
|
|
if (strstr(path, "usb:") == path)
|
|
|
|
return GX_DEVICE_USB;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_LOGGER
|
|
|
|
int gx_logger_net(struct _reent *r, int fd, const char *ptr, size_t len)
|
|
|
|
{
|
|
|
|
static char temp[4000];
|
|
|
|
size_t l = len >= 4000 ? 3999 : len;
|
|
|
|
memcpy(temp, ptr, l);
|
|
|
|
temp[l] = 0;
|
|
|
|
logger_send("%s", temp);
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
#elif defined(HAVE_FILE_LOGGER)
|
|
|
|
int gx_logger_file(struct _reent *r, int fd, const char *ptr, size_t len)
|
|
|
|
{
|
2012-11-26 16:59:00 +01:00
|
|
|
fwrite(ptr, 1, len, g_extern.log_file);
|
2012-08-29 15:15:24 -04:00
|
|
|
return len;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-08-24 02:23:50 -04:00
|
|
|
#endif
|
2012-01-08 00:57:44 +01:00
|
|
|
|
2013-05-08 19:11:52 -04:00
|
|
|
#ifdef IS_SALAMANDER
|
|
|
|
extern char gx_rom_path[PATH_MAX];
|
|
|
|
#endif
|
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_gx_get_environment_settings(int argc, char *argv[], void *args)
|
2012-08-21 00:28:38 -04:00
|
|
|
{
|
2013-08-10 20:59:10 +02:00
|
|
|
#ifndef IS_SALAMANDER
|
|
|
|
g_extern.verbose = true;
|
|
|
|
|
|
|
|
#if defined(HAVE_LOGGER)
|
|
|
|
logger_init();
|
|
|
|
#elif defined(HAVE_FILE_LOGGER)
|
|
|
|
g_extern.log_file = fopen("/retroarch-log.txt", "w");
|
|
|
|
#endif
|
|
|
|
#endif
|
2013-01-07 23:48:21 -05:00
|
|
|
|
|
|
|
#ifdef HW_DOL
|
|
|
|
chdir("carda:/retroarch");
|
|
|
|
#endif
|
|
|
|
getcwd(default_paths.core_dir, MAXPATHLEN);
|
|
|
|
char *last_slash = strrchr(default_paths.core_dir, '/');
|
|
|
|
if (last_slash)
|
|
|
|
*last_slash = 0;
|
|
|
|
char *device_end = strchr(default_paths.core_dir, '/');
|
|
|
|
if (device_end)
|
|
|
|
snprintf(default_paths.port_dir, sizeof(default_paths.port_dir), "%.*s/retroarch", device_end - default_paths.core_dir, default_paths.core_dir);
|
|
|
|
else
|
2013-11-12 14:58:43 +01:00
|
|
|
fill_pathname_join(default_paths.port_dir, default_paths.port_dir, "retroarch", sizeof(default_paths.port_dir));
|
2014-05-31 16:17:59 +02:00
|
|
|
fill_pathname_join(default_paths.overlay_dir, default_paths.core_dir, "overlays", sizeof(default_paths.overlay_dir));
|
2014-05-31 08:15:57 +02:00
|
|
|
fill_pathname_join(default_paths.config_path, default_paths.port_dir, "retroarch.cfg", sizeof(default_paths.config_path));
|
2013-11-12 14:58:43 +01:00
|
|
|
fill_pathname_join(default_paths.system_dir, default_paths.port_dir, "system", sizeof(default_paths.system_dir));
|
|
|
|
fill_pathname_join(default_paths.sram_dir, default_paths.port_dir, "savefiles", sizeof(default_paths.sram_dir));
|
|
|
|
fill_pathname_join(default_paths.savestate_dir, default_paths.port_dir, "savefiles", sizeof(default_paths.savestate_dir));
|
2013-05-08 19:11:52 -04:00
|
|
|
|
|
|
|
#ifdef IS_SALAMANDER
|
|
|
|
if (argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
2013-11-12 14:58:43 +01:00
|
|
|
fill_pathname_join(gx_rom_path, argv[1], argv[2], sizeof(gx_rom_path));
|
2013-05-08 19:11:52 -04:00
|
|
|
else
|
|
|
|
gx_rom_path[0] = '\0';
|
|
|
|
#endif
|
2012-07-27 19:15:42 +02:00
|
|
|
}
|
|
|
|
|
2012-11-22 02:08:50 -05:00
|
|
|
extern void __exception_setreload(int t);
|
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_gx_init(void *data)
|
2011-12-14 12:49:13 +01:00
|
|
|
{
|
2013-11-03 16:38:56 +01:00
|
|
|
(void)data;
|
2012-06-29 19:10:41 -04:00
|
|
|
#ifdef HW_RVL
|
2013-05-28 22:20:36 -04:00
|
|
|
IOS_ReloadIOS(IOS_GetVersion());
|
2012-06-29 18:42:42 -04:00
|
|
|
L2Enhance();
|
2013-01-09 00:10:19 +01:00
|
|
|
#ifndef IS_SALAMANDER
|
2012-08-27 20:36:05 -04:00
|
|
|
gx_init_mem2();
|
2012-06-29 19:10:41 -04:00
|
|
|
#endif
|
2013-01-09 00:10:19 +01:00
|
|
|
#endif
|
2012-06-29 19:10:41 -04:00
|
|
|
|
2012-11-22 02:08:50 -05:00
|
|
|
#ifndef DEBUG
|
|
|
|
__exception_setreload(8);
|
|
|
|
#endif
|
|
|
|
|
2011-12-14 19:11:46 +01:00
|
|
|
fatInitDefault();
|
2012-07-27 19:15:42 +02:00
|
|
|
|
2012-07-27 17:51:36 -04:00
|
|
|
#ifdef HAVE_LOGGER
|
2012-08-10 22:49:12 -04:00
|
|
|
devoptab_list[STD_OUT] = &dotab_stdout;
|
|
|
|
devoptab_list[STD_ERR] = &dotab_stdout;
|
|
|
|
dotab_stdout.write_r = gx_logger_net;
|
2013-04-23 03:17:45 +02:00
|
|
|
#elif defined(HAVE_FILE_LOGGER) && !defined(IS_SALAMANDER)
|
2012-08-10 22:49:12 -04:00
|
|
|
devoptab_list[STD_OUT] = &dotab_stdout;
|
|
|
|
devoptab_list[STD_ERR] = &dotab_stdout;
|
|
|
|
dotab_stdout.write_r = gx_logger_file;
|
2012-04-13 22:54:30 +02:00
|
|
|
#endif
|
|
|
|
|
2013-01-09 00:10:19 +01:00
|
|
|
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
2012-08-27 22:50:46 -04:00
|
|
|
lwp_t gx_device_thread;
|
|
|
|
gx_devices[GX_DEVICE_SD].interface = &__io_wiisd;
|
|
|
|
gx_devices[GX_DEVICE_SD].name = "sd";
|
|
|
|
gx_devices[GX_DEVICE_SD].mounted = fatMountSimple(gx_devices[GX_DEVICE_SD].name, gx_devices[GX_DEVICE_SD].interface);
|
|
|
|
gx_devices[GX_DEVICE_USB].interface = &__io_usbstorage;
|
|
|
|
gx_devices[GX_DEVICE_USB].name = "usb";
|
|
|
|
gx_devices[GX_DEVICE_USB].mounted = fatMountSimple(gx_devices[GX_DEVICE_USB].name, gx_devices[GX_DEVICE_USB].interface);
|
|
|
|
LWP_MutexInit(&gx_device_mutex, false);
|
|
|
|
LWP_CreateThread(&gx_device_thread, gx_devthread, NULL, NULL, 0, 66);
|
|
|
|
#endif
|
2013-01-07 23:48:21 -05:00
|
|
|
}
|
2012-08-27 22:50:46 -04:00
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_gx_exec(const char *path, bool should_load_game);
|
2013-07-27 21:38:38 +02:00
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_gx_exitspawn(void)
|
2013-01-09 00:10:19 +01:00
|
|
|
{
|
2014-05-17 14:56:12 +02:00
|
|
|
char boot_dol[PATH_MAX];
|
|
|
|
|
|
|
|
(void)boot_dol;
|
|
|
|
|
2013-02-14 15:47:52 +01:00
|
|
|
#if defined(IS_SALAMANDER)
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_exec(libretro_path, gx_rom_path[0] != '\0' ? true : false);
|
2013-02-14 15:47:52 +01:00
|
|
|
#elif defined(HW_RVL)
|
2013-04-29 03:05:46 +02:00
|
|
|
bool should_load_game = false;
|
2013-11-07 21:44:44 +01:00
|
|
|
if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
|
2013-04-29 03:05:46 +02:00
|
|
|
should_load_game = true;
|
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_exec(g_settings.libretro, should_load_game);
|
2013-05-08 19:11:52 -04:00
|
|
|
// direct loading failed (out of memory), try to jump to salamander then load the correct core
|
2013-11-03 17:39:12 +01:00
|
|
|
fill_pathname_join(boot_dol, default_paths.core_dir, "boot.dol", sizeof(boot_dol));
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_exec(boot_dol, should_load_game);
|
2013-01-09 00:10:19 +01:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static int frontend_gx_process_args(int argc, char *argv[], void *args)
|
2013-01-07 23:48:21 -05:00
|
|
|
{
|
2013-04-28 05:18:56 +02:00
|
|
|
int ret = 0;
|
|
|
|
|
2013-07-26 20:58:47 +02:00
|
|
|
#ifndef IS_SALAMANDER
|
2013-05-19 20:40:48 -04:00
|
|
|
// a big hack: sometimes salamander doesn't save the new core it loads on first boot,
|
|
|
|
// so we make sure g_settings.libretro is set here
|
2013-05-20 22:19:10 -04:00
|
|
|
if (!g_settings.libretro[0] && argc >= 1 && strrchr(argv[0], '/'))
|
2013-08-24 23:08:40 +02:00
|
|
|
{
|
2013-08-25 11:07:06 +02:00
|
|
|
char path[PATH_MAX];
|
|
|
|
strlcpy(path, strrchr(argv[0], '/') + 1, sizeof(path));
|
|
|
|
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, path);
|
2013-08-24 23:08:40 +02:00
|
|
|
}
|
2013-05-19 20:40:48 -04:00
|
|
|
|
2012-08-28 23:00:35 -04:00
|
|
|
if (argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
|
|
|
{
|
2013-11-03 17:39:12 +01:00
|
|
|
fill_pathname_join(g_extern.fullpath, argv[1], argv[2], sizeof(g_extern.fullpath));
|
2013-04-28 05:18:56 +02:00
|
|
|
ret = 1;
|
2012-08-28 23:00:35 -04:00
|
|
|
}
|
2013-07-26 20:58:47 +02:00
|
|
|
#endif
|
2013-04-28 05:18:56 +02:00
|
|
|
|
|
|
|
return ret;
|
2013-01-07 23:48:21 -05:00
|
|
|
}
|
2012-08-28 23:00:35 -04:00
|
|
|
|
2014-05-17 14:56:12 +02:00
|
|
|
static void frontend_gx_exec(const char *path, bool should_load_game)
|
2013-07-27 03:59:01 +02:00
|
|
|
{
|
2013-07-27 16:36:55 +02:00
|
|
|
#ifdef HW_RVL
|
2013-11-03 17:39:12 +01:00
|
|
|
system_exec_wii(path, should_load_game);
|
2013-07-27 03:59:01 +02:00
|
|
|
#endif
|
2013-07-27 16:36:55 +02:00
|
|
|
}
|
2013-07-27 03:59:01 +02:00
|
|
|
|
2014-05-16 22:20:33 +02:00
|
|
|
static int frontend_gx_get_rating(void)
|
|
|
|
{
|
|
|
|
#ifdef HW_RVL
|
|
|
|
return 8;
|
|
|
|
#else
|
|
|
|
return 6;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2013-07-26 20:58:47 +02:00
|
|
|
const frontend_ctx_driver_t frontend_ctx_gx = {
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_get_environment_settings, /* get_environment_settings */
|
|
|
|
frontend_gx_init, /* init */
|
2014-05-29 05:55:21 +02:00
|
|
|
NULL, /* deinit */
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_exitspawn, /* exitspawn */
|
|
|
|
frontend_gx_process_args, /* process_args */
|
2013-07-27 17:42:09 +02:00
|
|
|
NULL, /* process_events */
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_exec, /* exec */
|
2013-07-27 16:36:55 +02:00
|
|
|
NULL, /* shutdown */
|
2014-05-16 22:20:33 +02:00
|
|
|
frontend_gx_get_rating, /* get_rating */
|
2013-07-26 20:58:47 +02:00
|
|
|
"gx",
|
2014-02-24 18:23:12 +01:00
|
|
|
#ifdef IS_SALAMANDER
|
2014-05-17 14:56:12 +02:00
|
|
|
frontend_gx_salamander_init,
|
2014-02-24 18:23:12 +01:00
|
|
|
#endif
|
2013-07-26 20:58:47 +02:00
|
|
|
};
|