Merge pull request #21 from MelonSpeedruns/melon-randomizer

fixed direct3d drag & drop
This commit is contained in:
briaguya 2022-05-30 18:12:31 -04:00 committed by GitHub
commit 09c9c7c81d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,7 @@ static void onkeyup(WPARAM w_param, LPARAM l_param) {
} }
} }
extern "C" void LoadItemLocations(const char* spoilerFileName); char fileName[256];
static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) { static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) {
SohImGui::EventImpl event_impl; SohImGui::EventImpl event_impl;
@ -270,7 +270,6 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
onkeyup(w_param, l_param); onkeyup(w_param, l_param);
break; break;
case WM_DROPFILES: case WM_DROPFILES:
char fileName[256];
DragQueryFileA((HDROP)w_param, 0, fileName, 256); DragQueryFileA((HDROP)w_param, 0, fileName, 256);
CVar_SetString("gDroppedFile", fileName); CVar_SetString("gDroppedFile", fileName);
CVar_SetS32("gDroppedNewSpoilerFile", 1); CVar_SetS32("gDroppedNewSpoilerFile", 1);