jordirovira 2012-01-28 12:07:39 PST
in SDL_x11window around 520:
/* Setup the normal size hints */
if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
sizehints.min_width = sizehints.max_width = window->w;
sizehints.min_height = sizehints.max_height = window->h;
sizehints.flags = PMaxSize | PMinSize;
}
sizehints.x = window->x;
sizehints.y = window->y;
sizehints.flags |= USPosition;
the sizehints.flags member is not initizalised if it doesn't enter the
conditional. It is as easy as setting it to zero before the conditional.
From Gabriel Jacobo:
What I did notice is that calling
data->glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &value); doesn't produce any
result in Android GLES1.1 if the active framebuffer is the default one, ie,
whatever is in value stays unmodified.
It was very confusing to have configure generate an SDL_config.h and then not have it be used when building on Mac OS X or Windows. I'll just have to remember to use SDL_config_windows.h when building official releases that are supposed to be ABI compatible with Visual Studio.
--HG--
rename : include/SDL_config_generated.h.in => include/SDL_config.h.in
Alex Nankervis 2012-01-15 14:20:01 PST
SDL_cocoawindow.m, windowDidResize needs to also send a window move event.
Depending on the corner you resize a window from, or when maximizing a window,
the window position will change. Discovered this when creating a maximized
window and found that the window position was stuck at the un-maximized
window's value.
Diff with fix attached.
Tim Angus to SDL
void function( SDL_Surface* surface )
{
SDL_Surface* anotherSurface =
SDL_ConvertSurfaceFormat( surface, ... );
// surface->map->dst is now equal to anotherSurface
// Do some stuff with anotherSurface
SDL_FreeSurface( anotherSurface );
// anotherSurface is now a dead pointer,
// but surface->map->dst still points to it
}
int main( )
{
SDL_Surface* surface = CreateAValidSurface( );
function( surface );
}
At this point blit something from surface. SDL_LowerBlit is called, which checks surface->map->dst against the blit destination. If the pointers happen to match (not that unlikely), the map is decided to be valid and bad things happen.
It seems to me like the whole idea of caching the blit mapping is fundamentally flawed in that the source surface has no knowledge of the lifetime of the destination surface.
Alex Nankervis 2012-01-15 11:19:45 PST
DirectX joysticks can enumerate their axis out of order. This results in some
joysticks having vertical/horizontal swapped, for example (vertical axis gets
assigned to axis0). Joysticks that I've tested with this problem: XBOX 360
controller, Logitech Extreme 3D Pro.
Attached is a diff that fixes this by sorting the DX joystick objects by their
data offsets into the DX data structs. This puts the joystick objects into a
standard ordering (X axis -> axis0, Y axis -> axis1, and so on).