Open ROM/Drag&Drop Error fixed, delete g_DDRom if normal N64 ROM play
This commit is contained in:
parent
7c468bd624
commit
4bf95e61f1
|
@ -1142,7 +1142,14 @@ LRESULT CALLBACK CMainGui::MainGui_Proc(HWND hWnd, DWORD uMsg, DWORD wParam, DWO
|
|||
DragQueryFile(hDrop, 0, filename, sizeof(filename));
|
||||
DragFinish(hDrop);
|
||||
|
||||
if (!CN64System::RunFileImage(filename))
|
||||
stdstr ext = CPath(filename).GetExtension();
|
||||
if (!(_stricmp(ext.c_str(), "ndd") == 0))
|
||||
{
|
||||
delete g_DDRom;
|
||||
g_DDRom = NULL;
|
||||
CN64System::RunFileImage(filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Open Disk
|
||||
if (CN64System::RunDiskImage(filename))
|
||||
|
|
|
@ -119,7 +119,14 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
|
|||
stdstr File = ChooseFileToOpen(hWnd);
|
||||
if (File.length() > 0)
|
||||
{
|
||||
if (!g_BaseSystem->RunFileImage(File.c_str()))
|
||||
stdstr ext = CPath(File).GetExtension();
|
||||
if (!(_stricmp(ext.c_str(), "ndd") == 0))
|
||||
{
|
||||
delete g_DDRom;
|
||||
g_DDRom = NULL;
|
||||
g_BaseSystem->RunFileImage(File.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Open Disk
|
||||
if (g_BaseSystem->RunDiskImage(File.c_str()))
|
||||
|
|
|
@ -1472,6 +1472,10 @@ void CRomBrowser::RomList_OpenRom(uint32_t /*pnmh*/)
|
|||
|
||||
if (!pRomInfo) { return; }
|
||||
m_StopRefresh = true;
|
||||
|
||||
delete g_DDRom;
|
||||
g_DDRom = NULL;
|
||||
|
||||
CN64System::RunFileImage(pRomInfo->szFullFileName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue