mirror of https://github.com/mgba-emu/mgba.git
GUI: Minor logging and directory fixes
This commit is contained in:
parent
e0ee881e5f
commit
f174e80af3
|
@ -252,7 +252,7 @@ void mCoreInitConfig(struct mCore* core, const char* port) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mCoreLoadConfig(struct mCore* core) {
|
void mCoreLoadConfig(struct mCore* core) {
|
||||||
#ifndef MINIMAL_CORE
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
mCoreConfigLoad(&core->config);
|
mCoreConfigLoad(&core->config);
|
||||||
#endif
|
#endif
|
||||||
mCoreLoadForeignConfig(core, &core->config);
|
mCoreLoadForeignConfig(core, &core->config);
|
||||||
|
@ -260,7 +260,7 @@ void mCoreLoadConfig(struct mCore* core) {
|
||||||
|
|
||||||
void mCoreLoadForeignConfig(struct mCore* core, const struct mCoreConfig* config) {
|
void mCoreLoadForeignConfig(struct mCore* core, const struct mCoreConfig* config) {
|
||||||
mCoreConfigMap(config, &core->opts);
|
mCoreConfigMap(config, &core->opts);
|
||||||
#ifndef MINIMAL_CORE
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
mDirectorySetMapOptions(&core->dirs, &core->opts);
|
mDirectorySetMapOptions(&core->dirs, &core->opts);
|
||||||
#endif
|
#endif
|
||||||
if (core->opts.audioBuffers) {
|
if (core->opts.audioBuffers) {
|
||||||
|
|
|
@ -165,6 +165,7 @@ void mGUIInit(struct mGUIRunner* runner, const char* port) {
|
||||||
mCoreConfigSetDefaultIntValue(&runner->config, "volume", 0x100);
|
mCoreConfigSetDefaultIntValue(&runner->config, "volume", 0x100);
|
||||||
mCoreConfigSetDefaultValue(&runner->config, "idleOptimization", "detect");
|
mCoreConfigSetDefaultValue(&runner->config, "idleOptimization", "detect");
|
||||||
mCoreConfigLoad(&runner->config);
|
mCoreConfigLoad(&runner->config);
|
||||||
|
mCoreConfigGetIntValue(&runner->config, "logLevel", &logger.logLevel);
|
||||||
|
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
mCoreConfigDirectory(path, PATH_MAX);
|
mCoreConfigDirectory(path, PATH_MAX);
|
||||||
|
@ -283,7 +284,7 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
|
||||||
if (runner->core) {
|
if (runner->core) {
|
||||||
mLOG(GUI_RUNNER, INFO, "Found core");
|
mLOG(GUI_RUNNER, INFO, "Found core");
|
||||||
runner->core->init(runner->core);
|
runner->core->init(runner->core);
|
||||||
mCoreConfigInit(&runner->core->config, runner->port);
|
mCoreInitConfig(runner->core, runner->port);
|
||||||
mInputMapInit(&runner->core->inputMap, &GBAInputInfo);
|
mInputMapInit(&runner->core->inputMap, &GBAInputInfo);
|
||||||
found = mCoreLoadFile(runner->core, path);
|
found = mCoreLoadFile(runner->core, path);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
@ -302,7 +303,6 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
|
||||||
}
|
}
|
||||||
mLOG(GUI_RUNNER, DEBUG, "Loading config...");
|
mLOG(GUI_RUNNER, DEBUG, "Loading config...");
|
||||||
mCoreLoadForeignConfig(runner->core, &runner->config);
|
mCoreLoadForeignConfig(runner->core, &runner->config);
|
||||||
logger.logLevel = runner->core->opts.logLevel;
|
|
||||||
|
|
||||||
mLOG(GUI_RUNNER, DEBUG, "Loading save...");
|
mLOG(GUI_RUNNER, DEBUG, "Loading save...");
|
||||||
mCoreAutoloadSave(runner->core);
|
mCoreAutoloadSave(runner->core);
|
||||||
|
|
Loading…
Reference in New Issue