From a796c167e432c7106d5d892dc4917a4a38240a7f Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 7 Jan 2018 17:01:08 -0800 Subject: [PATCH] GUI: Minor logging and directory fixes --- src/core/core.c | 4 ++-- src/feature/gui/gui-runner.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/core.c b/src/core/core.c index 319dae407..39dbec636 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -276,7 +276,7 @@ void mCoreInitConfig(struct mCore* core, const char* port) { } void mCoreLoadConfig(struct mCore* core) { -#ifndef MINIMAL_CORE +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 mCoreConfigLoad(&core->config); #endif mCoreLoadForeignConfig(core, &core->config); @@ -284,7 +284,7 @@ void mCoreLoadConfig(struct mCore* core) { void mCoreLoadForeignConfig(struct mCore* core, const struct mCoreConfig* config) { mCoreConfigMap(config, &core->opts); -#ifndef MINIMAL_CORE +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 mDirectorySetMapOptions(&core->dirs, &core->opts); #endif if (core->opts.audioBuffers) { diff --git a/src/feature/gui/gui-runner.c b/src/feature/gui/gui-runner.c index 1f9227a26..3ba09a415 100644 --- a/src/feature/gui/gui-runner.c +++ b/src/feature/gui/gui-runner.c @@ -165,6 +165,7 @@ void mGUIInit(struct mGUIRunner* runner, const char* port) { mCoreConfigSetDefaultIntValue(&runner->config, "volume", 0x100); mCoreConfigSetDefaultValue(&runner->config, "idleOptimization", "detect"); mCoreConfigLoad(&runner->config); + mCoreConfigGetIntValue(&runner->config, "logLevel", &logger.logLevel); char path[PATH_MAX]; mCoreConfigDirectory(path, PATH_MAX); @@ -283,7 +284,7 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) { if (runner->core) { mLOG(GUI_RUNNER, INFO, "Found core"); runner->core->init(runner->core); - mCoreConfigInit(&runner->core->config, runner->port); + mCoreInitConfig(runner->core, runner->port); mInputMapInit(&runner->core->inputMap, &GBAInputInfo); found = mCoreLoadFile(runner->core, path); if (!found) { @@ -302,7 +303,6 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) { } mLOG(GUI_RUNNER, DEBUG, "Loading config..."); mCoreLoadForeignConfig(runner->core, &runner->config); - logger.logLevel = runner->core->opts.logLevel; mLOG(GUI_RUNNER, DEBUG, "Loading save..."); mCoreAutoloadSave(runner->core);