removed experimental (Windows specific) drag and drop test code
authorHolger Schemel <info@artsoft.org>
Thu, 10 Jan 2019 18:59:36 +0000 (19:59 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 12 Jan 2019 19:49:46 +0000 (20:49 +0100)
src/events.c
src/events.h
src/libgame/sdl.c
src/libgame/sdl.h

index 7b2ba984732b8fa857478f9bfc44d26d9259d041..e770480d67a25c14b0b0e7f0bb3fd57172cba206 100644 (file)
@@ -268,10 +268,6 @@ void HandleOtherEvents(Event *event)
       HandleJoystickEvent(event);
       break;
 
-    case SDL_SYSWMEVENT:
-      HandleWindowManagerEvent(event);
-      break;
-
     default:
       break;
   }
@@ -1522,11 +1518,6 @@ void HandleClientMessageEvent(ClientMessageEvent *event)
     CloseAllAndExit(0);
 }
 
-void HandleWindowManagerEvent(Event *event)
-{
-  SDLHandleWindowManagerEvent(event);
-}
-
 void HandleButton(int mx, int my, int button, int button_nr)
 {
   static int old_mx = 0, old_my = 0;
index 93504eb92259f85949b5e82e8cff6c617d66486b..c90580b0e1ce0e671275b39deb6c77081bb2272e 100644 (file)
@@ -35,7 +35,6 @@ boolean HandleKeysDebug(Key, int);
 void HandleKeyEvent(KeyEvent *);
 void HandleFocusEvent(FocusChangeEvent *);
 void HandleClientMessageEvent(ClientMessageEvent *);
-void HandleWindowManagerEvent(Event *);
 
 void HandleToonAnimations(void);
 
index 2c8e116acf4025ab75f06e323806050b746d9d04..45cfcd7d81a6a498cad884038ecdf0d6c42b5f65 100644 (file)
@@ -660,32 +660,6 @@ boolean SDLSetVideoMode(boolean fullscreen)
 
   SDLRedrawWindow();                   // map window
 
-#ifdef DEBUG
-#if defined(PLATFORM_WIN32)
-  // experimental drag and drop code
-
-  SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
-
-  {
-    SDL_SysWMinfo wminfo;
-    HWND hwnd;
-    boolean wminfo_success = FALSE;
-
-    SDL_VERSION(&wminfo.version);
-
-    if (sdl_window)
-      wminfo_success = SDL_GetWindowWMInfo(sdl_window, &wminfo);
-
-    if (wminfo_success)
-    {
-      hwnd = wminfo.info.win.window;
-
-      DragAcceptFiles(hwnd, TRUE);
-    }
-  }
-#endif
-#endif
-
   return success;
 }
 
@@ -2388,40 +2362,6 @@ void SDLWaitEvent(Event *event)
   SDL_WaitEvent(event);
 }
 
-void SDLHandleWindowManagerEvent(Event *event)
-{
-#ifdef DEBUG
-#if defined(PLATFORM_WIN32)
-  // experimental drag and drop code
-
-  SDL_SysWMEvent *syswmevent = (SDL_SysWMEvent *)event;
-  SDL_SysWMmsg *syswmmsg = (SDL_SysWMmsg *)(syswmevent->msg);
-
-  if (syswmmsg->msg.win.msg == WM_DROPFILES)
-  {
-    HDROP hdrop = (HDROP)syswmmsg->msg.win.wParam;
-    int i, num_files;
-
-    printf("::: SDL_SYSWMEVENT:\n");
-
-    num_files = DragQueryFile(hdrop, 0xffffffff, NULL, 0);
-
-    for (i = 0; i < num_files; i++)
-    {
-      int buffer_len = DragQueryFile(hdrop, i, NULL, 0);
-      char buffer[buffer_len + 1];
-
-      DragQueryFile(hdrop, i, buffer, buffer_len + 1);
-
-      printf("::: - '%s'\n", buffer);
-    }
-
-    DragFinish((HDROP)syswmmsg->msg.win.wParam);
-  }
-#endif
-#endif
-}
-
 
 // ============================================================================
 // joystick functions
index 4f9ced82a7cc193a6a2561c01b0cf9631f9af740..676dfab9dbe144e311e6915c42b91a04658f6257 100644 (file)
@@ -413,7 +413,6 @@ void SDLOpenAudio(void);
 void SDLCloseAudio(void);
 
 void SDLWaitEvent(Event *);
-void SDLHandleWindowManagerEvent(Event *);
 
 void HandleJoystickEvent(Event *);
 void SDLInitJoysticks(void);