}
}
+
+#if 1
+ SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
+
+#if defined(PLATFORM_WIN32)
+ {
+ SDL_SysWMinfo wminfo;
+ HWND hwnd;
+
+ SDL_VERSION(&wminfo.version);
+ SDL_GetWMInfo(&wminfo);
+
+ hwnd = wminfo.window;
+
+ DragAcceptFiles(hwnd, TRUE);
+ }
+#endif
+#endif
+
+
return success;
}
int src_x = x, src_y = y;
int dst_x = x, dst_y = y;
unsigned int time_last, time_current;
- float alpha;
- int alpha_final;
src_rect.x = src_x;
src_rect.y = src_y;
int ypos[melt_columns];
int max_steps = height / 8 + 32;
int steps_done = 0;
+ float steps = 0;
int i;
SDL_BlitSurface(surface_source, &src_rect, surface_screen, &dst_rect);
while (!done)
{
- float steps;
int steps_final;
time_last = time_current;
}
if (steps_done >= steps_final)
+ {
+ if (draw_border_function != NULL)
+ draw_border_function();
+
SDL_UpdateRect(surface_screen, dst_x, dst_y, width, height);
+ }
}
}
else
{
+ float alpha;
+ int alpha_final;
+
for (alpha = 0.0; alpha < 255.0;)
{
time_last = time_current;
return NULL;
}
+ UPDATE_BUSY_STATE();
+
/* create native non-transparent surface for current image */
if ((new_bitmap->surface = SDL_DisplayFormat(sdl_image_tmp)) == NULL)
{
return NULL;
}
+ UPDATE_BUSY_STATE();
+
/* create native transparent surface for current image */
SDL_SetColorKey(sdl_image_tmp, SDL_SRCCOLORKEY,
SDL_MapRGB(sdl_image_tmp->format, 0x00, 0x00, 0x00));
return NULL;
}
+ UPDATE_BUSY_STATE();
+
/* free temporary surface */
SDL_FreeSurface(sdl_image_tmp);
}
}
+void SDLHandleWindowManagerEvent(Event *event)
+{
+#if defined(PLATFORM_WIN32)
+ SDL_SysWMEvent *syswmevent = (SDL_SysWMEvent *)event;
+ SDL_SysWMmsg *syswmmsg = (SDL_SysWMmsg *)(syswmevent->msg);
+
+ if (syswmmsg->msg == WM_DROPFILES)
+ {
+ HDROP hdrop = (HDROP)syswmmsg->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->wParam);
+ }
+#endif
+}
+
/* ========================================================================= */
/* joystick functions */