diff --git a/Source/Project64/User Interface/Gui Class.cpp b/Source/Project64/User Interface/Gui Class.cpp index 97183e9d0..adc9bb0bb 100644 --- a/Source/Project64/User Interface/Gui Class.cpp +++ b/Source/Project64/User Interface/Gui Class.cpp @@ -864,15 +864,12 @@ DWORD CALLBACK CMainGui::MainGui_Proc (HWND hWnd, DWORD uMsg, DWORD wParam, DWOR break; case WM_DROPFILES: { - //We need to stop the filename from the file dropped - char filename[200]; - //Set HRDOP to the paramater that we have recieved + char filename[MAX_PATH]; + HDROP hDrop = (HDROP)wParam; - //Queery the file so we can get the filename DragQueryFile(hDrop, 0, filename, sizeof(filename)); - //Now we have queried, lets tell windows to release the memory. DragFinish(hDrop); - //Now the important part, run said image. + CN64System::RunFileImage(filename); } break;