Add (currently undocumented) command line flag for setting logging level
Jeffrey Pfau jeffrey@endrift.com
Fri, 04 Jul 2014 18:43:07 -0700
4 files changed,
8 insertions(+),
1 deletions(-)
M
src/gba/gba-thread.c
→
src/gba/gba-thread.c
@@ -75,6 +75,7 @@ ARMInit(&cpu);
ARMReset(&cpu); threadContext->gba = &gba; gba.sync = &threadContext->sync; + gba.logLevel = threadContext->logLevel; #ifdef USE_PTHREADS pthread_setspecific(_contextKey, threadContext); #else@@ -169,6 +170,7 @@ threadContext->fd = opts->fd;
threadContext->fname = opts->fname; threadContext->biosFd = opts->biosFd; threadContext->frameskip = opts->frameskip; + threadContext->logLevel = opts->logLevel; threadContext->rewindBufferCapacity = opts->rewindBufferCapacity; threadContext->rewindBufferInterval = opts->rewindBufferInterval; }
M
src/gba/gba-thread.h
→
src/gba/gba-thread.h
@@ -58,6 +58,7 @@ Condition stateCond;
enum ThreadState savedState; GBALogHandler logHandler; + int logLevel; ThreadCallback startCallback; ThreadCallback cleanCallback; ThreadCallback frameCallback;
M
src/platform/commandline.c
→
src/platform/commandline.c
@@ -44,7 +44,7 @@ opts->biosFd = -1;
int ch; char options[64] = - "b:s:" + "b:l:s:" #ifdef USE_CLI_DEBUGGER "d" #endif@@ -77,6 +77,9 @@ }
opts->debuggerType = DEBUGGER_GDB; break; #endif + case 'l': + opts->logLevel = atoi(optarg); + break; case 's': opts->frameskip = atoi(optarg); break;
M
src/platform/commandline.h
→
src/platform/commandline.h
@@ -18,6 +18,7 @@ struct StartupOptions {
int fd; const char* fname; int biosFd; + int logLevel; int frameskip; int rewindBufferCapacity; int rewindBufferInterval;