From 9a02b747d79db021fee9f49a8c15e3818589c5ec Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 26 Nov 2012 02:59:29 +0100 Subject: [PATCH] (PSP1) Now logs to file --- Makefile.psp1 | 7 +++++++ psp/frontend/main.c | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Makefile.psp1 b/Makefile.psp1 index 207eda896e..f78b25d04d 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -1,5 +1,7 @@ RARCH_VERSION = "0.9.8-beta3" +HAVE_FILE_LOGGER = 1 + TARGET = retroarchpsp INCDIR = @@ -7,6 +9,11 @@ CFLAGS = -O2 -G0 -Wall -g -std=gnu99 -ffast-math ASFLAGS = $(CFLAGS) RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_GETOPT_LONG -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_CONFIGFILE=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main + +ifeq ($(HAVE_FILE_LOGGER), 1) +CFLAGS += -DHAVE_FILE_LOGGER +endif + CFLAGS += $(RARCH_DEFINES) LIBDIR = diff --git a/psp/frontend/main.c b/psp/frontend/main.c index 2fc88c7589..4b0a954ffb 100644 --- a/psp/frontend/main.c +++ b/psp/frontend/main.c @@ -72,13 +72,27 @@ int main(int argc, char *argv[]) get_environment_settings(argc, argv); +#ifdef HAVE_FILE_LOGGER + log_fp = fopen("ms0:/retroarch-log.txt", "w"); +#endif + + g_extern.verbose = true; + + RARCH_LOG("TEST...\n"); + sceDisplayWaitVblankStart(); pspDebugScreenClear(); pspDebugScreenSetXY(0, 0); - printf("RetroArch PSP test.\n"); + RARCH_LOG("RetroArch PSP test.\n"); rarch_sleep(20); + g_extern.verbose = false; + +#ifdef HAVE_FILE_LOGGER + fclose(log_fp); +#endif + sceKernelExitGame(); return 1; }