(RARCH_CONSOLE) Verbose logging is no longer enforced

This commit is contained in:
twinaphex 2014-05-31 18:34:06 +02:00
parent a584c05117
commit ef7e3c91de
4 changed files with 89 additions and 12 deletions

View File

@ -221,8 +221,6 @@ extern char gx_rom_path[PATH_MAX];
static void frontend_gx_get_environment_settings(int argc, char *argv[], void *args)
{
#ifndef IS_SALAMANDER
g_extern.verbose = true;
#if defined(HAVE_LOGGER)
logger_init();
#elif defined(HAVE_FILE_LOGGER)

View File

@ -163,10 +163,13 @@ static void callback_sysutil_exit(uint64_t status, uint64_t param, void *userdat
static void frontend_ps3_get_environment_settings(int argc, char *argv[], void *args)
{
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
(void)args;
#ifndef IS_SALAMANDER
g_extern.verbose = true;
#if defined(HAVE_LOGGER)
logger_init();
#elif defined(HAVE_FILE_LOGGER)
@ -256,6 +259,10 @@ static void frontend_ps3_get_environment_settings(int argc, char *argv[], void *
#endif
#endif
}
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
}
static void frontend_ps3_init(void *data)
@ -319,12 +326,17 @@ static void frontend_ps3_init(void *data)
static int frontend_ps3_process_args(int argc, char *argv[], void *args)
{
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
if (argc > 1)
{
RARCH_LOG("Auto-start game %s.\n", argv[1]);
strlcpy(g_extern.fullpath, argv[1], sizeof(g_extern.fullpath));
return 1;
}
g_extern.verbose = original_verbose;
#endif
return 0;
@ -367,7 +379,10 @@ static void frontend_ps3_exec(const char *path, bool should_load_game);
static void frontend_ps3_exitspawn(void)
{
#ifdef HAVE_RARCH_EXEC
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
#ifdef IS_SALAMANDER
frontend_ps3_exec(libretro_path, false);
@ -392,6 +407,9 @@ static void frontend_ps3_exitspawn(void)
frontend_ps3_exec(core_launch, should_load_game);
#endif
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
#endif
}
@ -410,14 +428,17 @@ static void frontend_ps3_exitspawn(void)
static void frontend_ps3_exec(const char *path, bool should_load_game)
{
(void)should_load_game;
RARCH_LOG("Attempt to load executable: [%s].\n", path);
char spawn_data[256];
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
char game_path[256];
game_path[0] = '\0';
#endif
RARCH_LOG("Attempt to load executable: [%s].\n", path);
for(unsigned int i = 0; i < sizeof(spawn_data); ++i)
spawn_data[i] = i & 0xff;
@ -446,6 +467,10 @@ static void frontend_ps3_exec(const char *path, bool should_load_game)
sys_net_finalize_network();
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_NP);
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
}
static int frontend_ps3_get_rating(void)

View File

@ -103,6 +103,11 @@ static void dol_copy_argv_path(const char *dolpath, const char *argpath)
// heap memory and are restricted to the stack only
void system_exec_wii(const char *path, bool should_load_game)
{
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
char game_path[PATH_MAX];
RARCH_LOG("Attempt to load executable: [%s] %d.\n", path, sizeof(game_path));
@ -121,7 +126,7 @@ void system_exec_wii(const char *path, bool should_load_game)
if (fp == NULL)
{
RARCH_ERR("Could not open DOL file %s.\n", path);
return;
goto exit;
}
fseek(fp, 0, SEEK_END);
@ -134,7 +139,7 @@ void system_exec_wii(const char *path, bool should_load_game)
{
RARCH_ERR("Could not execute DOL file %s.\n", path);
fclose(fp);
return;
goto exit;
}
fread(dol, 1, size, fp);
@ -161,4 +166,10 @@ void system_exec_wii(const char *path, bool should_load_game)
RARCH_LOG("jumping to %08x\n", (unsigned) BOOTER_ADDR);
SYS_ResetSystem(SYS_SHUTDOWN,0,0);
__lwp_thread_stopmultitasking((void (*)(void)) BOOTER_ADDR);
exit:
(void)0;
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
}

View File

@ -33,6 +33,11 @@ char libretro_path[512];
static void find_and_set_first_file(void)
{
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
//Last fallback - we'll need to start the first executable file
// we can find in the RetroArch cores directory
@ -56,6 +61,10 @@ static void find_and_set_first_file(void)
}
else
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
}
static void frontend_xdk_salamander_init(void)
@ -132,6 +141,10 @@ static void frontend_xdk_salamander_init(void)
#ifdef _XBOX1
static HRESULT xbox_io_mount(char *szDrive, char *szDevice)
{
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
char szSourceDevice[48];
char szDestinationDrive[16];
@ -156,6 +169,9 @@ static HRESULT xbox_io_mount(char *szDrive, char *szDevice)
IoCreateSymbolicLink(&LinkName, &DeviceName);
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
return S_OK;
}
@ -183,8 +199,11 @@ static void frontend_xdk_get_environment_settings(int argc, char *argv[], void *
(void)ret;
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
#ifndef IS_SALAMANDER
#if defined(HAVE_LOGGER)
logger_init();
#elif defined(HAVE_FILE_LOGGER)
@ -241,6 +260,10 @@ static void frontend_xdk_get_environment_settings(int argc, char *argv[], void *
strlcpy(default_paths.sram_dir, "game:\\savefiles", sizeof(default_paths.sram_dir));
strlcpy(default_paths.system_dir, "game:\\system", sizeof(default_paths.system_dir));
#endif
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
}
static void frontend_xdk_init(void *data)
@ -259,6 +282,13 @@ static void frontend_xdk_init(void *data)
static int frontend_xdk_process_args(int argc, char *argv[], void *args)
{
int ret;
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
ret = 0;
(void)argc;
(void)argv;
@ -275,7 +305,8 @@ static int frontend_xdk_process_args(int argc, char *argv[], void *args)
{
snprintf(g_extern.fullpath, sizeof(g_extern.fullpath), (char*)ptr.Data);
RARCH_LOG("Auto-start game %s.\n", g_extern.fullpath);
return 1;
ret = 1;
goto exit;
}
}
#elif defined(_XBOX360)
@ -289,11 +320,16 @@ static int frontend_xdk_process_args(int argc, char *argv[], void *args)
RARCH_LOG("Auto-start game %s.\n", g_extern.fullpath);
delete []pLaunchData;
return 1;
ret = 1;
goto exit;
}
#endif
#endif
return 0;
exit:
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
return ret;
}
static void frontend_xdk_exec(const char *path, bool should_load_game);
@ -319,6 +355,10 @@ static void frontend_xdk_exitspawn(void)
static void frontend_xdk_exec(const char *path, bool should_load_game)
{
#ifndef IS_SALAMANDER
bool original_verbose = g_extern.verbose;
g_extern.verbose = true;
#endif
(void)should_load_game;
RARCH_LOG("Attempt to load executable: [%s].\n", path);
@ -345,6 +385,9 @@ static void frontend_xdk_exec(const char *path, bool should_load_game)
XLaunchNewImage(path, NULL);
#endif
#endif
#ifndef IS_SALAMANDER
g_extern.verbose = original_verbose;
#endif
}
static int frontend_xdk_get_rating(void)