move config-file seeking code to its own thing.

look also into the same directory as melonDS. make it the preferred place for storing melonDS.ini.
rewrite WinMain() wrapper.
This commit is contained in:
StapleButter
2018-12-11 21:34:05 +01:00
parent 9a0bf912d9
commit 40f3f91368
8 changed files with 256 additions and 143 deletions

View File

@ -30,6 +30,7 @@
#include "RTC.h"
#include "Wifi.h"
#include "Platform.h"
#include "melon_fopen.h"
namespace NDS
@ -386,7 +387,7 @@ void Reset()
dbg_CyclesTimer7 = 0;
#endif // DEBUG_CHECK_DESYNC
f = Config::GetConfigFile("bios9.bin", "rb");
f = melon_fopen_local("bios9.bin", "rb");
if (!f)
{
printf("ARM9 BIOS not found\n");
@ -403,7 +404,7 @@ void Reset()
fclose(f);
}
f = Config::GetConfigFile("bios7.bin", "rb");
f = melon_fopen_local("bios7.bin", "rb");
if (!f)
{
printf("ARM7 BIOS not found\n");