(RARCH_CONSOLE) Move logger function invocations into platform
files
This commit is contained in:
parent
bc4e010a96
commit
92ef192b2a
|
@ -150,12 +150,8 @@ begin_shutdown:
|
||||||
menu_free();
|
menu_free();
|
||||||
uninit_drivers_console();
|
uninit_drivers_console();
|
||||||
|
|
||||||
#ifdef HAVE_LOGGER
|
#ifdef PERF_TEST
|
||||||
logger_shutdown();
|
rarch_perf_log();
|
||||||
#elif defined(HAVE_FILE_LOGGER)
|
|
||||||
if (g_extern.log_file)
|
|
||||||
fclose(g_extern.log_file);
|
|
||||||
g_extern.log_file = NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
system_deinit();
|
system_deinit();
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include "../../general.h"
|
#include "../../general.h"
|
||||||
#include "../../libretro.h"
|
#include "../../libretro.h"
|
||||||
|
|
||||||
|
#include "platform_inl.h"
|
||||||
|
|
||||||
#include "../../console/rgui/rgui.h"
|
#include "../../console/rgui/rgui.h"
|
||||||
#include "../../gfx/fonts/bitmap.h"
|
#include "../../gfx/fonts/bitmap.h"
|
||||||
|
|
||||||
|
@ -467,14 +469,12 @@ static void system_init(void)
|
||||||
fatInitDefault();
|
fatInitDefault();
|
||||||
|
|
||||||
#ifdef HAVE_LOGGER
|
#ifdef HAVE_LOGGER
|
||||||
g_extern.verbose = true;
|
inl_logger_init();
|
||||||
logger_init();
|
|
||||||
devoptab_list[STD_OUT] = &dotab_stdout;
|
devoptab_list[STD_OUT] = &dotab_stdout;
|
||||||
devoptab_list[STD_ERR] = &dotab_stdout;
|
devoptab_list[STD_ERR] = &dotab_stdout;
|
||||||
dotab_stdout.write_r = gx_logger_net;
|
dotab_stdout.write_r = gx_logger_net;
|
||||||
#elif defined(HAVE_FILE_LOGGER)
|
#elif defined(HAVE_FILE_LOGGER)
|
||||||
g_extern.verbose = true;
|
inl_logger_init();
|
||||||
g_extern.log_file = fopen("/retroarch-log.txt", "w");
|
|
||||||
devoptab_list[STD_OUT] = &dotab_stdout;
|
devoptab_list[STD_OUT] = &dotab_stdout;
|
||||||
devoptab_list[STD_ERR] = &dotab_stdout;
|
devoptab_list[STD_ERR] = &dotab_stdout;
|
||||||
dotab_stdout.write_r = gx_logger_file;
|
dotab_stdout.write_r = gx_logger_file;
|
||||||
|
@ -533,6 +533,9 @@ static void system_deinit_save(void)
|
||||||
|
|
||||||
static void system_deinit(void)
|
static void system_deinit(void)
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
||||||
|
inl_logger_deinit()
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void system_exitspawn(void)
|
static void system_exitspawn(void)
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
/* RetroArch - A frontend for libretro.
|
||||||
|
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
|
||||||
|
* Copyright (C) 2011-2013 - Daniel De Matteis
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
||||||
|
|
||||||
|
static inline void inl_logger_init(void)
|
||||||
|
{
|
||||||
|
#if defined(HAVE_LOGGER)
|
||||||
|
g_extern.verbose = true;
|
||||||
|
logger_init();
|
||||||
|
#elif defined(HAVE_FILE_LOGGER)
|
||||||
|
g_extern.verbose = true;
|
||||||
|
g_extern.log_file = fopen("/retroarch-log.txt", "w");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void inl_logger_deinit(void)
|
||||||
|
{
|
||||||
|
#if defined(HAVE_LOGGER)
|
||||||
|
logger_shutdown();
|
||||||
|
#elif defined(HAVE_FILE_LOGGER)
|
||||||
|
if (g_extern.log_file)
|
||||||
|
fclose(g_extern.log_file);
|
||||||
|
g_extern.log_file = NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
#include <sys/process.h>
|
#include <sys/process.h>
|
||||||
|
|
||||||
|
#include "platform_inl.h"
|
||||||
|
|
||||||
#include "../../ps3/sdk_defines.h"
|
#include "../../ps3/sdk_defines.h"
|
||||||
#include "../../ps3/ps3_input.h"
|
#include "../../ps3/ps3_input.h"
|
||||||
|
|
||||||
|
@ -243,8 +245,8 @@ static void system_init(void)
|
||||||
sys_net_initialize_network();
|
sys_net_initialize_network();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LOGGER
|
#if defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
||||||
logger_init();
|
inl_logger_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __PSL1GHT__
|
#ifndef __PSL1GHT__
|
||||||
|
@ -309,8 +311,8 @@ static void system_deinit(void)
|
||||||
oskutil_unload(osk);
|
oskutil_unload(osk);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LOGGER
|
#if defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
||||||
logger_shutdown();
|
inl_logger_deinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_SYSMODULES)
|
#if defined(HAVE_SYSMODULES)
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "platform_inl.h"
|
||||||
|
|
||||||
#if defined(_XBOX360)
|
#if defined(_XBOX360)
|
||||||
#include <xfilecache.h>
|
#include <xfilecache.h>
|
||||||
#include "../../360/frontend-xdk/menu.h"
|
#include "../../360/frontend-xdk/menu.h"
|
||||||
|
@ -128,6 +130,10 @@ static void system_post_init(void)
|
||||||
|
|
||||||
static void system_init(void)
|
static void system_init(void)
|
||||||
{
|
{
|
||||||
|
#if defined (HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
||||||
|
inl_logger_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _XBOX1
|
#ifdef _XBOX1
|
||||||
// Mount drives
|
// Mount drives
|
||||||
xbox_io_mount("A:", "cdrom0");
|
xbox_io_mount("A:", "cdrom0");
|
||||||
|
@ -147,6 +153,9 @@ static void system_process_args(int argc, char *argv[])
|
||||||
|
|
||||||
static void system_deinit(void)
|
static void system_deinit(void)
|
||||||
{
|
{
|
||||||
|
#if defined (HAVE_LOGGER) || defined(HAVE_FILE_LOGGER)
|
||||||
|
logger_deinit();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void system_deinit_save(void)
|
static void system_deinit_save(void)
|
||||||
|
|
Loading…
Reference in New Issue