winport:
- added selecting a path to internal files in ROM on PC disk for Slot1 Debug;
This commit is contained in:
parent
9935052acc
commit
7555d69e9e
|
@ -2475,7 +2475,9 @@ static BOOL LoadROM(const char * filename, const char * physicalName, const char
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
INFO("Loading %s FAILED.\n",logicalName);
|
else
|
||||||
|
msgbox->error("Loading %s FAILED.\n", logicalName);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -440,6 +440,7 @@
|
||||||
#define IDC_LIST1 1056
|
#define IDC_LIST1 1056
|
||||||
#define IDC_IMP_INFO_CURRENT 1056
|
#define IDC_IMP_INFO_CURRENT 1056
|
||||||
#define IDC_FIRMWAREEXTUSER 1056
|
#define IDC_FIRMWAREEXTUSER 1056
|
||||||
|
#define IDC_DIRECTORY_SCAN 1056
|
||||||
#define IDC_BADD_AR 1057
|
#define IDC_BADD_AR 1057
|
||||||
#define IDC_IMP_INFO_FILE 1057
|
#define IDC_IMP_INFO_FILE 1057
|
||||||
#define IDC_BADD_CB 1058
|
#define IDC_BADD_CB 1058
|
||||||
|
@ -838,6 +839,7 @@
|
||||||
#define IDD_GBASLOT_PIANO 10010
|
#define IDD_GBASLOT_PIANO 10010
|
||||||
#define IDD_SLOT1_NONE 10011
|
#define IDD_SLOT1_NONE 10011
|
||||||
#define IDD_SLOT1_R4 10012
|
#define IDD_SLOT1_R4 10012
|
||||||
|
#define IDD_SLOT1_DEBUG 10013
|
||||||
#define IDM_FILE_STOPAVI 40000
|
#define IDM_FILE_STOPAVI 40000
|
||||||
#define IDM_SCREENSEP_NONE 40000
|
#define IDM_SCREENSEP_NONE 40000
|
||||||
#define IDM_FILE_STOPWAV 40001
|
#define IDM_FILE_STOPWAV 40001
|
||||||
|
@ -918,6 +920,7 @@
|
||||||
#define IDM_AUTODETECTSAVETYPE_FROMDATABASE 40105
|
#define IDM_AUTODETECTSAVETYPE_FROMDATABASE 40105
|
||||||
#define ID_DISPLAYMETHOD_FILTER 40106
|
#define ID_DISPLAYMETHOD_FILTER 40106
|
||||||
#define IDC_VIEW_PADTOINTEGER 40107
|
#define IDC_VIEW_PADTOINTEGER 40107
|
||||||
|
#define ID_TOOLS_VIEWFSNITRO 40108
|
||||||
#define ID_LABEL_HK3b 44670
|
#define ID_LABEL_HK3b 44670
|
||||||
#define ID_LABEL_HK3c 44671
|
#define ID_LABEL_HK3c 44671
|
||||||
#define ID_LABEL_HK3d 44672
|
#define ID_LABEL_HK3d 44672
|
||||||
|
@ -1023,8 +1026,8 @@
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 128
|
#define _APS_NEXT_RESOURCE_VALUE 128
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40108
|
#define _APS_NEXT_COMMAND_VALUE 40109
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1056
|
#define _APS_NEXT_CONTROL_VALUE 1057
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Binary file not shown.
|
@ -17,17 +17,20 @@
|
||||||
|
|
||||||
#include "slot1_config.h"
|
#include "slot1_config.h"
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
|
#include <shlobj.h>
|
||||||
|
#include <string>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "../slot1.h"
|
#include "../slot1.h"
|
||||||
#include "../NDSSystem.h"
|
#include "../NDSSystem.h"
|
||||||
#include <shlobj.h>
|
#include "../path.h"
|
||||||
|
|
||||||
HWND wndConfigSlot1 = NULL;
|
HWND wndConfigSlot1 = NULL;
|
||||||
NDS_SLOT1_TYPE temp_type_slot1 = NDS_SLOT1_NONE;
|
NDS_SLOT1_TYPE temp_type_slot1 = NDS_SLOT1_NONE;
|
||||||
NDS_SLOT1_TYPE last_type_slot1 = NDS_SLOT1_NONE;
|
NDS_SLOT1_TYPE last_type_slot1 = NDS_SLOT1_NONE;
|
||||||
char tmp_fat_path[MAX_PATH] = {0};
|
char tmp_fat_path[MAX_PATH] = {0};
|
||||||
|
char tmp_fs_path[MAX_PATH] = {0};
|
||||||
HWND OKbutton_slot1 = NULL;
|
HWND OKbutton_slot1 = NULL;
|
||||||
bool _OKbutton_slot1 = false;
|
bool _OKbutton_slot1 = false;
|
||||||
bool needReset_slot1 = true;
|
bool needReset_slot1 = true;
|
||||||
|
@ -46,6 +49,55 @@ INT_PTR CALLBACK Slot1None(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INT_PTR CALLBACK Slot1Debug(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
|
{
|
||||||
|
switch(msg)
|
||||||
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
{
|
||||||
|
_OKbutton_slot1 = TRUE;
|
||||||
|
|
||||||
|
SetWindowText(GetDlgItem(dialog, IDC_DIRECTORY_SCAN), tmp_fs_path);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case WM_COMMAND:
|
||||||
|
{
|
||||||
|
switch (LOWORD(wparam))
|
||||||
|
{
|
||||||
|
case IDC_BROWSE:
|
||||||
|
{
|
||||||
|
BROWSEINFO bp={0};
|
||||||
|
|
||||||
|
bp.hwndOwner=dialog;
|
||||||
|
bp.pidlRoot=NULL;
|
||||||
|
bp.pszDisplayName=NULL;
|
||||||
|
bp.lpszTitle="Select directory for game files";
|
||||||
|
bp.ulFlags=BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE | BIF_USENEWUI;
|
||||||
|
bp.lpfn=NULL;
|
||||||
|
|
||||||
|
LPITEMIDLIST tmp = SHBrowseForFolder((LPBROWSEINFO)&bp);
|
||||||
|
if (tmp!=NULL)
|
||||||
|
{
|
||||||
|
memset(tmp_fs_path, 0, sizeof(tmp_fs_path));
|
||||||
|
SHGetPathFromIDList(tmp, tmp_fs_path);
|
||||||
|
if (tmp_fs_path[strlen(tmp_fs_path)-1] != '\\')
|
||||||
|
tmp_fs_path[strlen(tmp_fs_path)] = '\\';
|
||||||
|
SetWindowText(GetDlgItem(dialog, IDC_DIRECTORY_SCAN), tmp_fs_path);
|
||||||
|
}
|
||||||
|
if (strlen(tmp_fs_path))
|
||||||
|
EnableWindow(OKbutton_slot1, TRUE);
|
||||||
|
else
|
||||||
|
EnableWindow(OKbutton_slot1, FALSE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
INT_PTR CALLBACK Slot1R4(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
INT_PTR CALLBACK Slot1R4(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
{
|
{
|
||||||
switch(msg)
|
switch(msg)
|
||||||
|
@ -99,7 +151,7 @@ u32 Slot1_IDDs[NDS_SLOT1_COUNT] = {
|
||||||
IDD_SLOT1_R4, // NDS_SLOT1_R4, - R4 flash card
|
IDD_SLOT1_R4, // NDS_SLOT1_R4, - R4 flash card
|
||||||
IDD_SLOT1_NONE, // NDS_SLOT1_RETAIL_NAND - Made in Ore/WarioWare D.I.Y.
|
IDD_SLOT1_NONE, // NDS_SLOT1_RETAIL_NAND - Made in Ore/WarioWare D.I.Y.
|
||||||
IDD_SLOT1_NONE, // NDS_SLOT1_RETAIL_MCROM - a standard MC (eeprom, flash, fram)
|
IDD_SLOT1_NONE, // NDS_SLOT1_RETAIL_MCROM - a standard MC (eeprom, flash, fram)
|
||||||
IDD_SLOT1_NONE, // NDS_SLOT1_RETAIL_DEBUG - for romhacking and fan-made translations
|
IDD_SLOT1_DEBUG, // NDS_SLOT1_RETAIL_DEBUG - for romhacking and fan-made translations
|
||||||
};
|
};
|
||||||
|
|
||||||
DLGPROC Slot1_Procs[NDS_SLOT1_COUNT] = {
|
DLGPROC Slot1_Procs[NDS_SLOT1_COUNT] = {
|
||||||
|
@ -108,7 +160,7 @@ DLGPROC Slot1_Procs[NDS_SLOT1_COUNT] = {
|
||||||
Slot1None, // NDS_SLOT1_R4, - R4 flash card
|
Slot1None, // NDS_SLOT1_R4, - R4 flash card
|
||||||
Slot1R4, // NDS_SLOT1_RETAIL_NAND - Made in Ore/WarioWare D.I.Y.
|
Slot1R4, // NDS_SLOT1_RETAIL_NAND - Made in Ore/WarioWare D.I.Y.
|
||||||
Slot1None, // NDS_SLOT1_RETAIL_MCROM - a standard MC (eeprom, flash, fram)
|
Slot1None, // NDS_SLOT1_RETAIL_MCROM - a standard MC (eeprom, flash, fram)
|
||||||
Slot1None // NDS_SLOT1_RETAIL_DEBUG - for romhacking and fan-made translations
|
Slot1Debug // NDS_SLOT1_RETAIL_DEBUG - for romhacking and fan-made translations
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -197,6 +249,7 @@ BOOL CALLBACK Slot1Box_Proc(HWND dialog, UINT msg,WPARAM wparam,LPARAM lparam)
|
||||||
void slot1Dialog(HWND hwnd)
|
void slot1Dialog(HWND hwnd)
|
||||||
{
|
{
|
||||||
strcpy(tmp_fat_path, slot1_GetFatDir().c_str());
|
strcpy(tmp_fat_path, slot1_GetFatDir().c_str());
|
||||||
|
strcpy(tmp_fs_path, path.getpath(path.SLOT1D).c_str());
|
||||||
temp_type_slot1 = slot1_GetCurrentType();
|
temp_type_slot1 = slot1_GetCurrentType();
|
||||||
last_type_slot1 = temp_type_slot1;
|
last_type_slot1 = temp_type_slot1;
|
||||||
_OKbutton_slot1 = false;
|
_OKbutton_slot1 = false;
|
||||||
|
@ -225,6 +278,11 @@ void slot1Dialog(HWND hwnd)
|
||||||
case NDS_SLOT1_RETAIL_NAND:
|
case NDS_SLOT1_RETAIL_NAND:
|
||||||
break;
|
break;
|
||||||
case NDS_SLOT1_RETAIL_DEBUG:
|
case NDS_SLOT1_RETAIL_DEBUG:
|
||||||
|
if (strlen(tmp_fs_path))
|
||||||
|
{
|
||||||
|
path.setpath(path.SLOT1D, tmp_fs_path);
|
||||||
|
WritePrivateProfileString(SECTION, SLOT1DKEY, path.pathToSlot1D, IniName);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue