Mercurial > sdl-ios-xcode
diff src/video/directfb/SDL_DirectFB_video.c @ 2259:1e690901ecd7
Date: Fri, 17 Aug 2007 01:12:31 +0200
From: Couriersud
Subject: fix for audio dsp exit crash / various dfb issues
improved cursor handling
fixes some mouse and event related bugs
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 17 Aug 2007 02:54:50 +0000 |
parents | b252359547ed |
children | e1da92da346c e82a0e3e9b0e |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_video.c Fri Aug 17 02:54:12 2007 +0000 +++ b/src/video/directfb/SDL_DirectFB_video.c Fri Aug 17 02:54:50 2007 +0000 @@ -674,17 +674,25 @@ } else { y = window->y; } + if (window->flags & SDL_WINDOW_FULLSCREEN) { + x = 0; + y = 0; + } desc.flags = - DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS | DWDESC_PIXELFORMAT; - desc.flags |= DWDESC_POSX | DWDESC_POSY | DWDESC_SURFACE_CAPS; - desc.posx = x; - desc.posy = y; + DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS | DWDESC_PIXELFORMAT | + DWDESC_SURFACE_CAPS; + if (!(window->flags & SDL_WINDOW_FULLSCREEN) + && window->x != SDL_WINDOWPOS_UNDEFINED + && window->y != SDL_WINDOWPOS_UNDEFINED) { + desc.flags |= DWDESC_POSX | DWDESC_POSY; + desc.posx = x; + desc.posy = y; + } + desc.width = window->w; desc.height = window->h; - desc.pixelformat = dispdata->pixelformat; - desc.caps = 0; //DWCAPS_DOUBLEBUFFER; desc.surface_caps = DSCAPS_DOUBLE | DSCAPS_TRIPLE; //| DSCAPS_PREMULTIPLIED; @@ -783,7 +791,8 @@ SDL_DFB_WINDOWDATA(window); SDL_DFB_DISPLAYDATA(_this, window); - windata->window->MoveTo(windata->window, window->x, window->y); + if (!(window->flags & SDL_WINDOW_FULLSCREEN)) + windata->window->MoveTo(windata->window, window->x, window->y); } static void @@ -793,8 +802,8 @@ SDL_DFB_WINDOWDATA(window); SDL_DFB_DISPLAYDATA(_this, window); - windata->window->Resize(windata->window, window->w, window->h); - + if (!(window->flags & SDL_WINDOW_FULLSCREEN)) + windata->window->Resize(windata->window, window->w, window->h); } static void DirectFB_ShowWindow(_THIS, SDL_Window * window)