Mercurial > sdl-ios-xcode
comparison src/video/windib/SDL_dibvideo.c @ 1291:31331c444ea2
Only save the window position if we're in windowed mode
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 29 Jan 2006 22:09:26 +0000 |
parents | c4a5a772c5d9 |
children | 59c7a470a51e |
comparison
equal
deleted
inserted
replaced
1290:c4a5a772c5d9 | 1291:31331c444ea2 |
---|---|
466 | 466 |
467 /* Clean up any GL context that may be hanging around */ | 467 /* Clean up any GL context that may be hanging around */ |
468 if ( current->flags & SDL_OPENGL ) { | 468 if ( current->flags & SDL_OPENGL ) { |
469 WIN_GL_ShutDown(this); | 469 WIN_GL_ShutDown(this); |
470 } | 470 } |
471 SDL_resizing = 1; | |
471 | 472 |
472 /* Recalculate the bitmasks if necessary */ | 473 /* Recalculate the bitmasks if necessary */ |
473 if ( bpp == current->format->BitsPerPixel ) { | 474 if ( bpp == current->format->BitsPerPixel ) { |
474 video = current; | 475 video = current; |
475 } else { | 476 } else { |
684 } | 685 } |
685 } | 686 } |
686 } | 687 } |
687 swp_flags = (SWP_NOCOPYBITS | SWP_SHOWWINDOW); | 688 swp_flags = (SWP_NOCOPYBITS | SWP_SHOWWINDOW); |
688 | 689 |
689 SDL_resizing = 1; | |
690 bounds.left = SDL_windowX; | 690 bounds.left = SDL_windowX; |
691 bounds.top = SDL_windowY; | 691 bounds.top = SDL_windowY; |
692 bounds.right = SDL_windowX+video->w; | 692 bounds.right = SDL_windowX+video->w; |
693 bounds.bottom = SDL_windowY+video->h; | 693 bounds.bottom = SDL_windowY+video->h; |
694 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); | 694 AdjustWindowRectEx(&bounds, GetWindowLong(SDL_Window, GWL_STYLE), FALSE, 0); |
711 top = HWND_TOPMOST; | 711 top = HWND_TOPMOST; |
712 } else { | 712 } else { |
713 top = HWND_NOTOPMOST; | 713 top = HWND_NOTOPMOST; |
714 } | 714 } |
715 SetWindowPos(SDL_Window, top, x, y, width, height, swp_flags); | 715 SetWindowPos(SDL_Window, top, x, y, width, height, swp_flags); |
716 SDL_resizing = 0; | 716 if ( !(flags & SDL_FULLSCREEN) ) { |
717 SDL_windowX = SDL_bounds.left; | |
718 SDL_windowY = SDL_bounds.top; | |
719 } | |
717 SetForegroundWindow(SDL_Window); | 720 SetForegroundWindow(SDL_Window); |
718 } | 721 } |
722 SDL_resizing = 0; | |
719 | 723 |
720 /* Set up for OpenGL */ | 724 /* Set up for OpenGL */ |
721 if ( flags & SDL_OPENGL ) { | 725 if ( flags & SDL_OPENGL ) { |
722 if ( WIN_GL_SetupWindow(this) < 0 ) { | 726 if ( WIN_GL_SetupWindow(this) < 0 ) { |
723 return(NULL); | 727 return(NULL); |