Added "Open Disk" to File menu.
This commit is contained in:
parent
39a1c9f407
commit
f0b81bbfc0
|
@ -63,6 +63,7 @@ enum LanguageStringID{
|
|||
MENU_RECENT_ROM = 107,
|
||||
MENU_RECENT_DIR = 108,
|
||||
MENU_EXIT = 109,
|
||||
MENU_DISK = 110,
|
||||
|
||||
//System Menu
|
||||
MENU_SYSTEM = 120,
|
||||
|
@ -125,7 +126,7 @@ enum LanguageStringID{
|
|||
POPUP_SETTINGS = 212,
|
||||
POPUP_CHEATS = 213,
|
||||
POPUP_GFX_PLUGIN = 214,
|
||||
POPUP_PLAYDISK = 215,
|
||||
POPUP_PLAYDISK = 215,
|
||||
|
||||
//selecting save slot
|
||||
SAVE_SLOT_DEFAULT = 220,
|
||||
|
|
|
@ -71,6 +71,7 @@ void CLanguage::LoadDefaultStrings(void)
|
|||
DEF_STR(MENU_RECENT_ROM, "Recent ROM");
|
||||
DEF_STR(MENU_RECENT_DIR, "Recent ROM Directories");
|
||||
DEF_STR(MENU_EXIT, "E&xit");
|
||||
DEF_STR(MENU_DISK, "Open Disk");
|
||||
|
||||
//System Menu
|
||||
DEF_STR(MENU_SYSTEM, "&System");
|
||||
|
|
|
@ -980,7 +980,9 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
switch (LOWORD(wParam)) {
|
||||
case ID_POPUPMENU_PLAYGAME: g_BaseSystem->RunFileImage(_this->CurrentedSelectedRom()); break;
|
||||
case ID_POPUPMENU_PLAYGAMEWITHDISK:
|
||||
if (!g_BaseSystem->RunFileImageIPL(g_Settings->LoadStringVal(File_DiskIPLPath).c_str()))
|
||||
{
|
||||
stdstr IPLROM = g_Settings->LoadStringVal(File_DiskIPLPath);
|
||||
if ((IPLROM.length() <= 0) || (!g_BaseSystem->RunFileImageIPL(IPLROM.c_str())))
|
||||
{
|
||||
// Open DDROM
|
||||
OPENFILENAME openfilename;
|
||||
|
@ -1006,8 +1008,8 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
openfilename.lpstrFilter = "N64DD Disk Image (*.ndd)\0*.ndd\0All files (*.*)\0*.*\0";
|
||||
if (GetOpenFileName(&openfilename))
|
||||
{
|
||||
g_BaseSystem->RunDiskImage(FileName);
|
||||
g_BaseSystem->RunFileImage(_this->CurrentedSelectedRom());
|
||||
if (g_BaseSystem->RunDiskImage(FileName))
|
||||
g_BaseSystem->RunFileImage(_this->CurrentedSelectedRom());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1032,11 +1034,12 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
|
||||
if (GetOpenFileName(&openfilename))
|
||||
{
|
||||
g_BaseSystem->RunDiskImage(FileName);
|
||||
g_BaseSystem->RunFileImage(_this->CurrentedSelectedRom());
|
||||
if (g_BaseSystem->RunDiskImage(FileName))
|
||||
g_BaseSystem->RunFileImage(_this->CurrentedSelectedRom());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ID_POPUPMENU_ROMDIRECTORY: _this->SelectRomDir(); break;
|
||||
case ID_POPUPMENU_REFRESHROMLIST: _this->RefreshRomBrowser(); break;
|
||||
case ID_POPUPMENU_ROMINFORMATION:
|
||||
|
|
|
@ -123,6 +123,67 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
|
|||
}
|
||||
}
|
||||
break;
|
||||
case ID_FILE_DISK:
|
||||
{
|
||||
stdstr IPLROM = g_Settings->LoadStringVal(File_DiskIPLPath);
|
||||
if ((IPLROM.length() <= 0) || (!g_BaseSystem->RunFileImageIPL(IPLROM.c_str())))
|
||||
{
|
||||
// Open DDROM
|
||||
OPENFILENAME openfilename;
|
||||
char FileName[_MAX_PATH], Directory[_MAX_PATH];
|
||||
|
||||
memset(&FileName, 0, sizeof(FileName));
|
||||
memset(&openfilename, 0, sizeof(openfilename));
|
||||
|
||||
strcpy(Directory, g_Settings->LoadStringVal(Directory_Game).c_str());
|
||||
|
||||
openfilename.lStructSize = sizeof(openfilename);
|
||||
openfilename.hwndOwner = (HWND)hWnd;
|
||||
openfilename.lpstrFilter = "64DD IPL ROM Image (*.zip, *.7z, *.?64, *.rom, *.usa, *.jap, *.pal, *.bin)\0*.?64;*.zip;*.7z;*.bin;*.rom;*.usa;*.jap;*.pal\0All files (*.*)\0*.*\0";
|
||||
openfilename.lpstrFile = FileName;
|
||||
openfilename.lpstrInitialDir = Directory;
|
||||
openfilename.nMaxFile = MAX_PATH;
|
||||
openfilename.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
|
||||
|
||||
if (GetOpenFileName(&openfilename))
|
||||
{
|
||||
g_BaseSystem->RunFileImageIPL(FileName);
|
||||
// Open Disk
|
||||
openfilename.lpstrFilter = "N64DD Disk Image (*.ndd)\0*.ndd\0All files (*.*)\0*.*\0";
|
||||
if (GetOpenFileName(&openfilename))
|
||||
{
|
||||
if (g_BaseSystem->RunDiskImage(FileName))
|
||||
g_BaseSystem->RunFileImage(g_Settings->LoadStringVal(File_DiskIPLPath).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Open Disk
|
||||
OPENFILENAME openfilename;
|
||||
char FileName[_MAX_PATH], Directory[_MAX_PATH];
|
||||
|
||||
memset(&FileName, 0, sizeof(FileName));
|
||||
memset(&openfilename, 0, sizeof(openfilename));
|
||||
|
||||
strcpy(Directory, g_Settings->LoadStringVal(Directory_Game).c_str());
|
||||
|
||||
openfilename.lStructSize = sizeof(openfilename);
|
||||
openfilename.hwndOwner = (HWND)hWnd;
|
||||
openfilename.lpstrFilter = "N64DD Disk Image (*.ndd)\0*.ndd\0All files (*.*)\0*.*\0";
|
||||
openfilename.lpstrFile = FileName;
|
||||
openfilename.lpstrInitialDir = Directory;
|
||||
openfilename.nMaxFile = MAX_PATH;
|
||||
openfilename.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
|
||||
|
||||
if (GetOpenFileName(&openfilename))
|
||||
{
|
||||
if (g_BaseSystem->RunDiskImage(FileName))
|
||||
g_BaseSystem->RunFileImage(g_Settings->LoadStringVal(File_DiskIPLPath).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ID_FILE_ROM_INFO:
|
||||
{
|
||||
if (g_Rom)
|
||||
|
@ -691,6 +752,8 @@ void CMainMenu::FillOutMenu(HMENU hMenu)
|
|||
MenuItemList FileMenu;
|
||||
Item.Reset(ID_FILE_OPEN_ROM, MENU_OPEN, m_ShortCuts.ShortCutString(ID_FILE_OPEN_ROM, AccessLevel));
|
||||
FileMenu.push_back(Item);
|
||||
Item.Reset(ID_FILE_DISK, MENU_DISK, m_ShortCuts.ShortCutString(ID_FILE_DISK, AccessLevel));
|
||||
FileMenu.push_back(Item);
|
||||
if (!inBasicMode)
|
||||
{
|
||||
Item.Reset(ID_FILE_ROM_INFO, MENU_ROM_INFO, m_ShortCuts.ShortCutString(ID_FILE_ROM_INFO, AccessLevel));
|
||||
|
|
|
@ -4,7 +4,7 @@ enum MainMenuID
|
|||
{
|
||||
//File Menu
|
||||
ID_FILE_OPEN_ROM = 4000, ID_FILE_ROM_INFO, ID_FILE_STARTEMULATION, ID_FILE_ENDEMULATION,
|
||||
ID_FILE_ROMDIRECTORY, ID_FILE_REFRESHROMLIST, ID_FILE_EXIT,
|
||||
ID_FILE_ROMDIRECTORY, ID_FILE_REFRESHROMLIST, ID_FILE_EXIT, ID_FILE_DISK,
|
||||
|
||||
//language
|
||||
ID_LANG_START, ID_LANG_END = ID_LANG_START + 100,
|
||||
|
|
Loading…
Reference in New Issue