Drag & Drop 64DD Disk support

This commit is contained in:
luigiblood 2016-01-26 15:55:30 +01:00
parent 226c29d5c7
commit 7c468bd624
1 changed files with 30 additions and 1 deletions

View File

@ -1142,7 +1142,36 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
DragQueryFile(hDrop, 0, filename, sizeof(filename));
DragFinish(hDrop);
CN64System::RunFileImage(filename);
if (!CN64System::RunFileImage(filename))
{
// Open Disk
if (CN64System::RunDiskImage(filename))
{
stdstr IPLROM = g_Settings->LoadStringVal(File_DiskIPLPath);
if ((IPLROM.length() <= 0) || (!CN64System::RunFileImage(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))
{
CN64System::RunFileImage(FileName);
}
}
}
}
}
break;
case WM_DESTROY: