all repos — mgba @ a796c167e432c7106d5d892dc4917a4a38240a7f

mGBA Game Boy Advance Emulator

GUI: Minor logging and directory fixes
Vicki Pfau vi@endrift.com
Sun, 07 Jan 2018 17:01:08 -0800
commit

a796c167e432c7106d5d892dc4917a4a38240a7f

parent

07098984e4b3ae1a01361d43c93f7b1dcc90dc00

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/core/core.csrc/core/core.c

@@ -276,7 +276,7 @@ mCoreConfigInit(&core->config, 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 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) {
M src/feature/gui/gui-runner.csrc/feature/gui/gui-runner.c

@@ -165,6 +165,7 @@ // TODO: Do we need to load more defaults?

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 @@ runner->core = mCoreFind(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 @@ runner->core->setPeripheral(runner->core, mPERIPH_GBA_LUMINANCE, &runner->luminanceSource.d);

} 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);