HandleJoystickEvent(event);
break;
+#if defined(USE_DRAG_AND_DROP)
case SDL_DROPBEGIN:
case SDL_DROPCOMPLETE:
case SDL_DROPFILE:
case SDL_DROPTEXT:
HandleDropEvent(event);
break;
+#endif
default:
break;
CloseAllAndExit(0);
}
+#if defined(USE_DRAG_AND_DROP)
static boolean HandleDropFileEvent(char *filename)
{
Error(ERR_DEBUG, "DROP FILE EVENT: '%s'", filename);
if (event->drop.file != NULL)
SDL_free(event->drop.file);
}
+#endif
void HandleButton(int mx, int my, int button, int button_nr)
{
#define SCREEN_KEYBOARD_POS(h) ((h) / 2)
#endif
+// values for drag-and-drop support (some parts not added before SDL 2.0.5)
+#if SDL_VERSION_ATLEAST(2,0,5)
+#define USE_DRAG_AND_DROP
+#endif
+
// default input keys
#define DEFAULT_KEY_LEFT KSYM_Left
#define DEFAULT_KEY_RIGHT KSYM_Right