From dba475a1aed9ec9bad50d6af4adbe4a8c47495bf Mon Sep 17 00:00:00 2001 From: zilmar Date: Wed, 18 Feb 2015 07:41:34 +1100 Subject: [PATCH] change drag and drop filename length to MAX_PATH --- Source/Project64/User Interface/Gui Class.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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;