summaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index c9c7780a2a..bf8b0ee6b5 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -724,6 +724,32 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) {
}
} break;
+ case WM_DROPFILES: {
+
+ HDROP hDropInfo = NULL;
+ hDropInfo = (HDROP) wParam;
+ const int buffsize=4096;
+ wchar_t buf[buffsize];
+
+ int fcount = DragQueryFileW(hDropInfo, 0xFFFFFFFF,NULL,0);
+
+ Vector<String> files;
+
+ for(int i=0;i<fcount;i++) {
+
+ DragQueryFileW(hDropInfo, i, buf, buffsize);
+ String file=buf;
+ files.push_back(file);
+ }
+
+ if (files.size() && main_loop) {
+ main_loop->drop_files(files,0);
+ }
+
+
+ } break;
+
+
default: {
@@ -1035,6 +1061,8 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_
_ensure_data_dir();
+ DragAcceptFiles(hWnd,true);
+
}