Mercurial > sdl-ios-xcode
diff src/video/SDL_shape.c @ 5251:58265e606e4e
Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 10 Feb 2011 14:44:25 -0800 |
parents | b67815cf9f25 |
children |
line wrap: on
line diff
--- a/src/video/SDL_shape.c Thu Feb 10 14:36:09 2011 -0800 +++ b/src/video/SDL_shape.c Thu Feb 10 14:44:25 2011 -0800 @@ -35,7 +35,7 @@ SDL_Window *result = NULL; result = SDL_CreateWindow(title,-1000,-1000,w,h,(flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /*& (~SDL_WINDOW_SHOWN)*/); if(result != NULL) { - result->shaper = result->display->device->shape_driver.CreateShaper(result); + result->shaper = SDL_GetVideoDevice()->shape_driver.CreateShaper(result); if(result->shaper != NULL) { result->shaper->userx = x; result->shaper->usery = y; @@ -240,7 +240,7 @@ if(shape_mode != NULL) window->shaper->mode = *shape_mode; - result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shape_mode); + result = SDL_GetVideoDevice()->shape_driver.SetWindowShape(window->shaper,shape,shape_mode); window->shaper->hasshape = SDL_TRUE; if(window->shaper->userx != 0 && window->shaper->usery != 0) { SDL_SetWindowPosition(window,window->shaper->userx,window->shaper->usery);