add --gbaslot-rom=self special value which mounts the current nds rom as a gba game, and fix the win32 cflash configuration dialog
This commit is contained in:
parent
f72ce94f8d
commit
b804c2e2b1
|
@ -22,6 +22,7 @@
|
||||||
#include "../mem.h"
|
#include "../mem.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../MMU.h"
|
#include "../MMU.h"
|
||||||
|
#include "path.h"
|
||||||
|
|
||||||
//SRAM is going to be stored just above the rom.
|
//SRAM is going to be stored just above the rom.
|
||||||
//that is convenient for us, since it mirrors the nds memory map
|
//that is convenient for us, since it mirrors the nds memory map
|
||||||
|
@ -292,6 +293,12 @@ static void GBAgame_reset(void)
|
||||||
if (!strlen(GBAgameName)) return;
|
if (!strlen(GBAgameName)) return;
|
||||||
FILE *fgame = 0;
|
FILE *fgame = 0;
|
||||||
|
|
||||||
|
//perk: if the gbagame name is "self" this is a special indicator that we should mount the main rom that we're running as the gba game
|
||||||
|
if(!stricmp(GBAgameName,"self"))
|
||||||
|
{
|
||||||
|
strcpy(GBAgameName,path.path.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
fgame = fopen(GBAgameName,"rb");
|
fgame = fopen(GBAgameName,"rb");
|
||||||
if (!fgame) return;
|
if (!fgame) return;
|
||||||
fseek(fgame, 0, SEEK_END);
|
fseek(fgame, 0, SEEK_END);
|
||||||
|
|
|
@ -554,11 +554,10 @@ void GBAslotDialog(HWND hwnd)
|
||||||
break;
|
break;
|
||||||
case NDS_ADDON_CFLASH:
|
case NDS_ADDON_CFLASH:
|
||||||
//save current values for win32 configuration
|
//save current values for win32 configuration
|
||||||
//(no tmp for mode, a little weird but thats just how it evolved)
|
win32_CFlash_cfgMode = tmp_CFlashMode;
|
||||||
win32_CFlash_cfgMode = CFlash_Mode;
|
|
||||||
win32_CFlash_cfgDirectory = tmp_cflash_path;
|
win32_CFlash_cfgDirectory = tmp_cflash_path;
|
||||||
win32_CFlash_cfgFileName = tmp_cflash_filename;
|
win32_CFlash_cfgFileName = tmp_cflash_filename;
|
||||||
WritePrivateProfileInt("GBAslot.CFlash","fileMode",CFlash_Mode,IniName);
|
WritePrivateProfileInt("GBAslot.CFlash","fileMode",tmp_CFlashMode,IniName);
|
||||||
WritePrivateProfileString("GBAslot.CFlash","path",tmp_cflash_path,IniName);
|
WritePrivateProfileString("GBAslot.CFlash","path",tmp_cflash_path,IniName);
|
||||||
WritePrivateProfileString("GBAslot.CFlash","filename",tmp_cflash_filename,IniName);
|
WritePrivateProfileString("GBAslot.CFlash","filename",tmp_cflash_filename,IniName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue