Mercurial > sdl-ios-xcode
diff src/video/bwindow/SDL_sysvideo.cc @ 4012:4e29535b821b SDL-1.2
Fixed bug #360
Fixed fullscreen video modes and improved the mouse grab code.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 07 Jul 2007 19:20:28 +0000 |
parents | 678576473849 |
children | a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/video/bwindow/SDL_sysvideo.cc Fri Jul 06 13:39:03 2007 +0000 +++ b/src/video/bwindow/SDL_sysvideo.cc Sat Jul 07 19:20:28 2007 +0000 @@ -366,9 +366,8 @@ --i; /* We went too far */ } -/* BeSman::We dont want to use a Desktop resolution */ -// width = modes[i]->w; -// height = modes[i]->h; + width = modes[i]->w; + height = modes[i]->h; bscreen.GetModeList(&dmodes, &nmodes); for ( i = 0; i < nmodes; ++i ) { @@ -455,6 +454,12 @@ cx = (bounds.IntegerWidth() - width)/2; cy = (bounds.IntegerHeight() - height)/2; + if ( fullscreen ) { + /* Set offset for drawing */ + SDL_Win->SetXYOffset(cx, cy); + } else { + SDL_Win->SetXYOffset(0, 0); + } if ( ! needs_unlock || was_fullscreen ) { /* Center the window the first time */ SDL_Win->MoveTo(cx, cy);