- some fixes in gbaslot;
This commit is contained in:
parent
7500bd0611
commit
9445a175fc
|
@ -273,7 +273,7 @@ static void list_files(const char *filepath)
|
||||||
{
|
{
|
||||||
fname = (strlen(entry.cAlternateFileName)>0) ? entry.cAlternateFileName : entry.cFileName;
|
fname = (strlen(entry.cAlternateFileName)>0) ? entry.cAlternateFileName : entry.cFileName;
|
||||||
add_file(fname, &entry, fileLevel);
|
add_file(fname, &entry, fileLevel);
|
||||||
printf("cflash added %s\n",fname);
|
CFLASHLOG("cflash added %s\n",fname);
|
||||||
|
|
||||||
if (numFiles==MAXFILES-1) break;
|
if (numFiles==MAXFILES-1) break;
|
||||||
|
|
||||||
|
@ -506,17 +506,17 @@ static BOOL cflash_init()
|
||||||
if (inited) return FALSE;
|
if (inited) return FALSE;
|
||||||
BOOL init_good = FALSE;
|
BOOL init_good = FALSE;
|
||||||
|
|
||||||
printf("CFlash_Mode: %d\n",CFlash_Mode);
|
CFLASHLOG("CFlash_Mode: %d\n",CFlash_Mode);
|
||||||
|
|
||||||
if (CFlash_Mode == ADDON_CFLASH_MODE_RomPath)
|
if (CFlash_Mode == ADDON_CFLASH_MODE_RomPath)
|
||||||
{
|
{
|
||||||
sFlashPath = pathToROM;
|
sFlashPath = pathToROM;
|
||||||
printf("Using CFlash directory of rom: %s\n", sFlashPath.c_str());
|
INFO("Using CFlash directory of rom: %s\n", sFlashPath.c_str());
|
||||||
}
|
}
|
||||||
else if(CFlash_Mode == ADDON_CFLASH_MODE_Path)
|
else if(CFlash_Mode == ADDON_CFLASH_MODE_Path)
|
||||||
{
|
{
|
||||||
sFlashPath = CFlash_Path;
|
sFlashPath = CFlash_Path;
|
||||||
printf("Using CFlash directory: %s\n", sFlashPath.c_str());
|
INFO("Using CFlash directory: %s\n", sFlashPath.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CFlash_IsUsingPath())
|
if(CFlash_IsUsingPath())
|
||||||
|
@ -529,7 +529,7 @@ static BOOL cflash_init()
|
||||||
activeDirEnt = -1;
|
activeDirEnt = -1;
|
||||||
fileStartLBA = fileEndLBA = 0xFFFFFFFF;
|
fileStartLBA = fileEndLBA = 0xFFFFFFFF;
|
||||||
if (!cflash_build_fat()) {
|
if (!cflash_build_fat()) {
|
||||||
printf("FAILED cflash_build_fat\n");
|
CFLASHLOG("FAILED cflash_build_fat\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
cf_reg_sts = 0x58; // READY
|
cf_reg_sts = 0x58; // READY
|
||||||
|
@ -540,7 +540,7 @@ static BOOL cflash_init()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sFlashPath = CFlash_Path;
|
sFlashPath = CFlash_Path;
|
||||||
printf("Using CFlash disk image file %s\n", sFlashPath.c_str());
|
INFO("Using CFlash disk image file %s\n", sFlashPath.c_str());
|
||||||
disk_image = OPEN_FN( sFlashPath.c_str(), OPEN_MODE);
|
disk_image = OPEN_FN( sFlashPath.c_str(), OPEN_MODE);
|
||||||
|
|
||||||
if ( disk_image != -1)
|
if ( disk_image != -1)
|
||||||
|
@ -659,7 +659,7 @@ static u16 fread_buffered(int dirent,u32 cluster,u32 offset)
|
||||||
fatstring_to_asciiz(dirent,fname,NULL);
|
fatstring_to_asciiz(dirent,fname,NULL);
|
||||||
strncat(fpath,fname,ARRAY_SIZE(fpath)-strlen(fpath));
|
strncat(fpath,fname,ARRAY_SIZE(fpath)-strlen(fpath));
|
||||||
|
|
||||||
printf("CFLASH Opening %s\n",fpath);
|
CFLASHLOG("CFLASH Opening %s\n",fpath);
|
||||||
hFile = fopen(fpath, "rb");
|
hFile = fopen(fpath, "rb");
|
||||||
if (!hFile) return 0;
|
if (!hFile) return 0;
|
||||||
bufferStart = offset;
|
bufferStart = offset;
|
||||||
|
@ -954,8 +954,6 @@ static void cflash_close( void)
|
||||||
|
|
||||||
static BOOL CFlash_init(void)
|
static BOOL CFlash_init(void)
|
||||||
{
|
{
|
||||||
printf("CFlash_init\n");
|
|
||||||
cflash_init();
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ LRESULT Ioreg_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM9]);
|
sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM9]);
|
||||||
SetWindowText(GetDlgItem(hwnd, IDC_IF9), text);
|
SetWindowText(GetDlgItem(hwnd, IDC_IF9), text);
|
||||||
|
|
||||||
sprintf(text, "0x%08X", (int)MMU.reg_IME[ARMCPU_ARM9]);
|
sprintf(text, "%s", ((int)(MMU.reg_IME[ARMCPU_ARM9]) & 0x01)?"enabled":"disabled");
|
||||||
SetWindowText(GetDlgItem(hwnd, IDC_IME9), text);
|
SetWindowText(GetDlgItem(hwnd, IDC_IME9), text);
|
||||||
|
|
||||||
sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x0000>>1]);
|
sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x0000>>1]);
|
||||||
|
@ -83,7 +83,7 @@ LRESULT Ioreg_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM7]);
|
sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM7]);
|
||||||
SetWindowText(GetDlgItem(hwnd, IDC_IF7), text);
|
SetWindowText(GetDlgItem(hwnd, IDC_IF7), text);
|
||||||
|
|
||||||
sprintf(text, "0x%08X", (int)MMU.reg_IME[ARMCPU_ARM7]);
|
sprintf(text, "%s", ((int)(MMU.reg_IME[ARMCPU_ARM7]) & 0x01)?"enabled":"disabled");
|
||||||
SetWindowText(GetDlgItem(hwnd, IDC_IME7), text);
|
SetWindowText(GetDlgItem(hwnd, IDC_IME7), text);
|
||||||
|
|
||||||
sprintf(text, "0x%08X", (int)((u32 *)MMU.ARM7_REG)[0x180>>2]);
|
sprintf(text, "0x%08X", (int)((u32 *)MMU.ARM7_REG)[0x180>>2]);
|
||||||
|
|
|
@ -30,14 +30,13 @@
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
|
||||||
WNDCLASSEX wc;
|
WNDCLASSEX wc;
|
||||||
HWND wndConfig;
|
HWND wndConfig = NULL;
|
||||||
u8 temp_type = 0;
|
u8 temp_type = 0;
|
||||||
u8 last_type;
|
u8 last_type = 0;
|
||||||
char tmp_cflash_filename[MAX_PATH];
|
char tmp_cflash_filename[MAX_PATH] = { 0 };
|
||||||
char tmp_cflash_path[MAX_PATH];
|
char tmp_cflash_path[MAX_PATH] = { 0 };
|
||||||
char tmp_gbagame_filename[MAX_PATH];
|
char tmp_gbagame_filename[MAX_PATH] = { 0 };
|
||||||
u8 tmp_CFlashUsePath;
|
ADDON_CFLASH_MODE tmp_CFlashMode = ADDON_CFLASH_MODE_RomPath;
|
||||||
u8 tmp_CFlashUseRomPath;
|
|
||||||
HWND OKbutton = NULL;
|
HWND OKbutton = NULL;
|
||||||
bool _OKbutton = false;
|
bool _OKbutton = false;
|
||||||
|
|
||||||
|
@ -64,32 +63,37 @@ BOOL CALLBACK GbaSlotCFlash(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
{
|
{
|
||||||
SetWindowText(GetDlgItem(dialog, IDC_PATHIMG), tmp_cflash_filename);
|
SetWindowText(GetDlgItem(dialog, IDC_PATHIMG), tmp_cflash_filename);
|
||||||
SetWindowText(GetDlgItem(dialog, IDC_PATH), tmp_cflash_path);
|
SetWindowText(GetDlgItem(dialog, IDC_PATH), tmp_cflash_path);
|
||||||
if (tmp_CFlashUsePath)
|
switch (tmp_CFlashMode)
|
||||||
{
|
{
|
||||||
if (tmp_CFlashUseRomPath)
|
case ADDON_CFLASH_MODE_Path:
|
||||||
{
|
CheckDlgButton(dialog, IDC_RFOLDER, BST_CHECKED);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_PATH), TRUE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), TRUE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
|
||||||
|
if (strlen(tmp_cflash_path)) _OKbutton = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ADDON_CFLASH_MODE_File:
|
||||||
|
CheckDlgButton(dialog, IDC_RFILE, BST_CHECKED);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), TRUE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), TRUE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
||||||
|
if (strlen(tmp_cflash_filename)) _OKbutton = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ADDON_CFLASH_MODE_RomPath:
|
||||||
CheckDlgButton(dialog, IDC_PATHDESMUME, BST_CHECKED);
|
CheckDlgButton(dialog, IDC_PATHDESMUME, BST_CHECKED);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
|
||||||
_OKbutton = TRUE;
|
_OKbutton = TRUE;
|
||||||
}
|
break;
|
||||||
else
|
default:
|
||||||
{
|
return FALSE;
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), TRUE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), TRUE);
|
|
||||||
if (strlen(tmp_cflash_path)) _OKbutton = TRUE;
|
|
||||||
}
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
|
|
||||||
CheckDlgButton(dialog, IDC_RFOLDER, BST_CHECKED);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATHDESMUME), FALSE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
|
||||||
if (strlen(tmp_cflash_filename)) _OKbutton = TRUE;
|
|
||||||
CheckDlgButton(dialog, IDC_RFILE, BST_CHECKED);
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -164,12 +168,11 @@ BOOL CALLBACK GbaSlotCFlash(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
{
|
{
|
||||||
if (HIWORD(wparam) == BN_CLICKED)
|
if (HIWORD(wparam) == BN_CLICKED)
|
||||||
{
|
{
|
||||||
tmp_CFlashUsePath = FALSE;
|
tmp_CFlashMode = ADDON_CFLASH_MODE_File;
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), TRUE);
|
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), TRUE);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), TRUE);
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), TRUE);
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATHDESMUME), FALSE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
||||||
|
|
||||||
if (!strlen(tmp_cflash_filename))
|
if (!strlen(tmp_cflash_filename))
|
||||||
|
@ -182,48 +185,30 @@ BOOL CALLBACK GbaSlotCFlash(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
{
|
{
|
||||||
if (HIWORD(wparam) == BN_CLICKED)
|
if (HIWORD(wparam) == BN_CLICKED)
|
||||||
{
|
{
|
||||||
tmp_CFlashUsePath = TRUE;
|
tmp_CFlashMode = ADDON_CFLASH_MODE_Path;
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
|
||||||
|
|
||||||
if (IsDlgButtonChecked(dialog, IDC_PATHDESMUME))
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), TRUE);
|
||||||
{
|
EnableWindow(GetDlgItem(dialog, IDC_PATH), TRUE);
|
||||||
tmp_CFlashUseRomPath = TRUE;
|
if (!strlen(tmp_cflash_path))
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
EnableWindow(OKbutton, FALSE);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
|
||||||
EnableWindow(OKbutton, TRUE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tmp_CFlashUseRomPath = FALSE;
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), TRUE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATHDESMUME), TRUE);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case IDC_PATHDESMUME:
|
case IDC_PATHDESMUME:
|
||||||
{
|
{
|
||||||
if (IsDlgButtonChecked(dialog, IDC_PATHDESMUME))
|
if (HIWORD(wparam) == BN_CLICKED)
|
||||||
{
|
{
|
||||||
tmp_CFlashUseRomPath = TRUE;
|
tmp_CFlashMode = ADDON_CFLASH_MODE_RomPath;
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_PATHIMG), FALSE);
|
||||||
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE), FALSE);
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), FALSE);
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
EnableWindow(GetDlgItem(dialog, IDC_PATH), FALSE);
|
||||||
EnableWindow(OKbutton, TRUE);
|
EnableWindow(OKbutton, TRUE);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
tmp_CFlashUseRomPath = FALSE;
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_BBROWSE2), TRUE);
|
|
||||||
EnableWindow(GetDlgItem(dialog, IDC_PATH), TRUE);
|
|
||||||
if (strlen(tmp_cflash_path))
|
|
||||||
EnableWindow(OKbutton, TRUE);
|
|
||||||
else
|
|
||||||
EnableWindow(OKbutton, FALSE);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,8 +388,7 @@ void GBAslotDialog(HWND hwnd)
|
||||||
strcpy(tmp_cflash_filename, CFlashName.c_str());
|
strcpy(tmp_cflash_filename, CFlashName.c_str());
|
||||||
strcpy(tmp_cflash_path, CFlashPath.c_str());
|
strcpy(tmp_cflash_path, CFlashPath.c_str());
|
||||||
strcpy(tmp_gbagame_filename, GBAgameName);
|
strcpy(tmp_gbagame_filename, GBAgameName);
|
||||||
tmp_CFlashUseRomPath = (CFlash_Mode==ADDON_CFLASH_MODE_RomPath);
|
tmp_CFlashMode = CFlash_Mode;
|
||||||
tmp_CFlashUsePath = (CFlash_Mode==ADDON_CFLASH_MODE_Path);
|
|
||||||
_OKbutton = false;
|
_OKbutton = false;
|
||||||
u32 res=DialogBox(hAppInst, MAKEINTRESOURCE(IDD_GBASLOT), hwnd, (DLGPROC) GbaSlotBox_Proc);
|
u32 res=DialogBox(hAppInst, MAKEINTRESOURCE(IDD_GBASLOT), hwnd, (DLGPROC) GbaSlotBox_Proc);
|
||||||
if (res)
|
if (res)
|
||||||
|
@ -414,22 +398,17 @@ void GBAslotDialog(HWND hwnd)
|
||||||
case NDS_ADDON_NONE:
|
case NDS_ADDON_NONE:
|
||||||
break;
|
break;
|
||||||
case NDS_ADDON_CFLASH:
|
case NDS_ADDON_CFLASH:
|
||||||
if(tmp_CFlashUsePath) CFlash_Mode=ADDON_CFLASH_MODE_Path;
|
CFlash_Mode = tmp_CFlashMode;
|
||||||
WritePrivateProfileInt("GBAslot.CFlash","usePath",tmp_CFlashUsePath,IniName);
|
WritePrivateProfileInt("GBAslot.CFlash","fileMode",CFlash_Mode,IniName);
|
||||||
if (tmp_CFlashUsePath)
|
WritePrivateProfileString("GBAslot.CFlash","path",tmp_cflash_path,IniName);
|
||||||
{
|
|
||||||
if (tmp_CFlashUseRomPath)
|
|
||||||
{
|
|
||||||
CFlash_Mode=ADDON_CFLASH_MODE_RomPath;
|
|
||||||
WritePrivateProfileInt("GBAslot.CFlash","useRomPath",tmp_CFlashUseRomPath,IniName);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
CFlashPath = tmp_cflash_path;
|
|
||||||
WritePrivateProfileString("GBAslot.CFlash","path",tmp_cflash_path,IniName);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
CFlashName = tmp_cflash_filename;
|
|
||||||
WritePrivateProfileString("GBAslot.CFlash","filename",tmp_cflash_filename,IniName);
|
WritePrivateProfileString("GBAslot.CFlash","filename",tmp_cflash_filename,IniName);
|
||||||
|
if(CFlash_Mode == ADDON_CFLASH_MODE_Path)
|
||||||
|
CFlash_Path = tmp_cflash_path;
|
||||||
|
else if(CFlash_Mode == ADDON_CFLASH_MODE_RomPath)
|
||||||
|
CFlash_Path = "";
|
||||||
|
else
|
||||||
|
CFlash_Path = tmp_cflash_filename;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case NDS_ADDON_RUMBLEPAK:
|
case NDS_ADDON_RUMBLEPAK:
|
||||||
break;
|
break;
|
||||||
|
@ -442,14 +421,6 @@ void GBAslotDialog(HWND hwnd)
|
||||||
}
|
}
|
||||||
WritePrivateProfileInt("GBAslot","type",temp_type,IniName);
|
WritePrivateProfileInt("GBAslot","type",temp_type,IniName);
|
||||||
|
|
||||||
if(CFlash_Mode == ADDON_CFLASH_MODE_Path)
|
|
||||||
CFlash_Path = CFlashPath;
|
|
||||||
else if(CFlash_Mode == ADDON_CFLASH_MODE_RomPath)
|
|
||||||
CFlash_Path = "";
|
|
||||||
else
|
|
||||||
CFlash_Path = CFlashName;
|
|
||||||
|
|
||||||
|
|
||||||
addon_type = temp_type;
|
addon_type = temp_type;
|
||||||
addonsChangePak(addon_type);
|
addonsChangePak(addon_type);
|
||||||
if (romloaded)
|
if (romloaded)
|
||||||
|
|
|
@ -1492,23 +1492,28 @@ int _main()
|
||||||
GetINIPath();
|
GetINIPath();
|
||||||
|
|
||||||
addon_type = GetPrivateProfileInt("GBAslot", "type", NDS_ADDON_NONE, IniName);
|
addon_type = GetPrivateProfileInt("GBAslot", "type", NDS_ADDON_NONE, IniName);
|
||||||
UINT CFlashUsePath = GetPrivateProfileInt("GBAslot.CFlash", "usePath", 1, IniName);
|
UINT CFlashFileMode = GetPrivateProfileInt("GBAslot.CFlash", "fileMode", 2, IniName);
|
||||||
UINT CFlashUseRomPath = GetPrivateProfileInt("GBAslot.CFlash", "useRomPath", 1, IniName);
|
|
||||||
|
|
||||||
CFlashPath = GetPrivateProfileStdString("GBAslot.CFlash", "path", "");
|
CFlashPath = GetPrivateProfileStdString("GBAslot.CFlash", "path", "");
|
||||||
CFlashName = GetPrivateProfileStdString("GBAslot.CFlash", "filename", "");
|
CFlashName = GetPrivateProfileStdString("GBAslot.CFlash", "filename", "");
|
||||||
GetPrivateProfileString("GBAslot.GBAgame", "filename", "", GBAgameName, MAX_PATH, IniName);
|
GetPrivateProfileString("GBAslot.GBAgame", "filename", "", GBAgameName, MAX_PATH, IniName);
|
||||||
|
|
||||||
if(CFlashUsePath) {
|
if(CFlashFileMode==ADDON_CFLASH_MODE_Path)
|
||||||
|
{
|
||||||
CFlash_Mode = ADDON_CFLASH_MODE_Path;
|
CFlash_Mode = ADDON_CFLASH_MODE_Path;
|
||||||
CFlash_Path = CFlashPath;
|
|
||||||
}
|
|
||||||
else if(CFlashUseRomPath) {
|
|
||||||
CFlash_Mode = ADDON_CFLASH_MODE_RomPath;
|
|
||||||
} else {
|
|
||||||
CFlash_Path = CFlashName;
|
|
||||||
CFlash_Mode = ADDON_CFLASH_MODE_RomPath;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if(CFlashFileMode==ADDON_CFLASH_MODE_File)
|
||||||
|
{
|
||||||
|
CFlash_Path = CFlashName;
|
||||||
|
CFlash_Mode = ADDON_CFLASH_MODE_File;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CFlash_Path = "";
|
||||||
|
CFlash_Mode = ADDON_CFLASH_MODE_RomPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue