mirror of
https://github.com/libretro/RetroArch
synced 2025-03-05 19:13:45 +00:00
Added logging features - set HAVE_LOGGING to enable
This commit is contained in:
parent
b50ddfc87a
commit
f01663550c
14
Makefile.ps3
14
Makefile.ps3
@ -11,6 +11,7 @@ DEBUG = 0
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
HAVE_SSNES_GL = 0
|
||||
HAVE_LOGGER = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
@ -25,7 +26,7 @@ EBOOT_PATH = ps3/pkg/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = ps3/pkg/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. -Icommon
|
||||
INCDIRS = -I. -Ips3 -Icommon
|
||||
|
||||
MAKE_SELF = make_self_npdrm
|
||||
|
||||
@ -71,7 +72,7 @@ else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lpthread
|
||||
PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
DEFINES += -DSSNES_CONSOLE -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"$(SSNES_VERSION)\" -DHAVE_SCREENSHOTS_BUILTIN=1 -Dmain=ssnes_main
|
||||
|
||||
@ -81,8 +82,13 @@ else
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
endif
|
||||
|
||||
PPU_CFLAGS = $(PPU_OPTIMIZE_LV) $(DEFINES)
|
||||
PPU_CXXFLAGS = $(PPU_OPTIMIZE_LV) $(DEFINES)
|
||||
PPU_CFLAGS = $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS = $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
PPU_CFLAGS += -DHAVE_LOGGER
|
||||
PPU_SRCS += ps3/cellframework2/fileio/logger.c
|
||||
endif
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
@ -439,7 +439,7 @@ extern struct console_settings g_console;
|
||||
/////////
|
||||
|
||||
#if defined(SSNES_CONSOLE) && defined(HAVE_LOGGER)
|
||||
#include <logger_override.h>
|
||||
#include "logger_override.h"
|
||||
#else
|
||||
#define SSNES_LOG(...) do { \
|
||||
if (g_extern.verbose) \
|
||||
|
32
logger_override.h
Normal file
32
logger_override.h
Normal file
@ -0,0 +1,32 @@
|
||||
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* Some code herein may be based on code found in BSNES.
|
||||
*
|
||||
* SSNES 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.
|
||||
*
|
||||
* SSNES 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 SSNES.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __SSNES_LOGGER_OVERRIDE_H
|
||||
#define __SSNES_LOGGER_OVERRIDE_H
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
|
||||
#include "ps3/cellframework2/fileio/logger.h"
|
||||
|
||||
#define SSNES_LOG(...) do{ if (g_extern.verbose) net_send("SSNES: " __VA_ARGS__); }while(0)
|
||||
#define SSNES_ERR(...) do{ net_send("SSNES [ERROR] :: " __VA_ARGS__); }while(0)
|
||||
#define SSNES_WARN(...) do{ net_send("SSNES [WARN] :: " __VA_ARGS__); }while(0)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -521,6 +521,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
sys_net_initialize_network();
|
||||
|
||||
#ifdef HAVE_LOGGER
|
||||
logger_init();
|
||||
#endif
|
||||
|
||||
sceNpInit(NP_POOL_SIZE, np_pool);
|
||||
|
||||
get_environment_settings(argc);
|
||||
@ -590,6 +594,10 @@ begin_shutdown:
|
||||
cell_pad_input_deinit();
|
||||
ps3_video_deinit();
|
||||
|
||||
#ifdef HAVE_LOGGER
|
||||
logger_shutdown();
|
||||
#endif
|
||||
|
||||
if(g_console.screenshots_enable)
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT);
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_JPGDEC);
|
||||
|
Loading…
x
Reference in New Issue
Block a user