From Rick Johnson:
Here's the call pattern:
Create the window hidden
The game tells it to adjust the window position
Make the window visible.
A problem arises from the SetWindowsPos() - the default behavior of that would cause a WM_ACTIVATE message to be passed, of which SDL interprets that as the window now becoming visible and sets the flags. The window is not visible though. Now, when you try to call ShowWindow() - SDL sees those flags as indicating that the window is visible and early returns.
My proposed fix was that if we are calling set windows position and we aren't visible, add on the flag SWP_NOACTIVATE, which tells windows to not send down the WM_ACTIVATE flag.
Philipp Wiesemann 2012-09-30 05:56:09 PDT
I attached a patch which tries to implement the dropfile support for Microsoft
Windows. If applied SDL_DROPFILE events should be sent for single or multiple
files which are dropped on window.
The handling on Windows side is always activated (cursor will change and so on)
because there is no connection between SDL_EventState() and the window setup. I
assumed this additional overhead would be small and can be ignored.
Alexander Hirsch 2012-08-25 20:01:29 PDT
When creating a SDL_Texture with unsupported format (I'll now refer to it as
texture A), SDL_CreateTexture will call SDL_CreateTexture again with
GetClosestSupportedFormat to set texture->native (which I will now refer to as
texture B).
This causes texture B to be put before A in renderer->textures.
If texture A is explicitly destroyed, everything is fine. Otherwise, upon
SDL_DestroyRenderer, the loop will first encounter texture B, destroy it, then
texture A, destroy that which will want to destroy texture->native and since it
is already destroyed set an error.
The solution could be as simple as swapping texture A with B after
texture->native gets set in SDL_CreateTextures.
Martin Gerhardy 2012-08-27 02:42:25 PDT
I've extended the gl error checks.
This is needed because on my system there are errors in the renderer that are
hard to find.
Also glError can return multiple errors. Even if SDL_SetError would only
contain the last one of course, the SDL log facilities are able to get the
output for each error.
Cecil Curry 2012-08-27 16:55:12 PDT
Allow "aclocal" to find the "AC_CHECK_DEFINE" macro.
On running:
rm aclocal.m4
libtoolize --install --copy --force
aclocal -I acinclude
autoconf -I acinclude
The former three commands succeed, but "autoconf" fails with:
configure.in:198: error: possibly undefined macro: AC_CHECK_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
"aclocal" fails to find AC_CHECK_DEFINE and hence add such macro to
"aclocal.m4". Here is why:
* "acinclude/ac_check_define.m4" defines AC_CHECK_DEFINE via define() rather
than AC_DEFUN().
* "aclocal" fails to find macros defined via define().