all repos — mgba @ 5ba2d00504a70bb3dd4ba7bd196d0ee851cc53d3

mGBA Game Boy Advance Emulator

3DS, PSP2, Wii: Last directory loaded is saved
Jeffrey Pfau jeffrey@endrift.com
Tue, 20 Dec 2016 01:49:12 -0800
commit

5ba2d00504a70bb3dd4ba7bd196d0ee851cc53d3

parent

20f8cdc3e099958dc5fc5d8c6db18d4e0a9588aa

2 files changed, 9 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -54,6 +54,7 @@ - GBA Memory: Support for Mo Jie Qi Bing by Vast Fame (taizou)

- GBA Memory: Support reading/writing POSTFLG - Util: Add size counting to Table - Qt: Move last directory setting from qt.ini to config.ini + - 3DS, PSP2, Wii: Last directory loaded is saved 0.5.1: (2016-10-05) Bugfixes:
M src/feature/gui/gui-runner.csrc/feature/gui/gui-runner.c

@@ -171,6 +171,12 @@ mCoreConfigDirectory(path, PATH_MAX);

strncat(path, PATH_SEP "log", PATH_MAX - strlen(path)); logger.vf = VFileOpen(path, O_CREAT | O_WRONLY | O_APPEND); mLogSetDefaultLogger(&logger.d); + + const char* lastPath = mCoreConfigGetValue(&runner->config, "lastDirectory"); + if (lastPath) { + strncpy(runner->params.currentPath, lastPath, PATH_MAX - 1); + runner->params.currentPath[PATH_MAX - 1] = '\0'; + } } void mGUIDeinit(struct mGUIRunner* runner) {

@@ -499,6 +505,8 @@ char path[PATH_MAX];

if (!GUISelectFile(&runner->params, path, sizeof(path), 0)) { break; } + mCoreConfigSetValue(&runner->config, "lastDirectory", runner->params.currentPath); + mCoreConfigSave(&runner->config); mGUIRun(runner, path); } }