comparison src/video/gem/SDL_gemvideo.c @ 3942:b3b6f1a8d60a SDL-1.2

Simply resize existing window
author Patrice Mandin <patmandin@gmail.com>
date Sat, 26 May 2007 20:09:56 +0000
parents 2409c20399c1
children 1d9cd0ff67cc
comparison
equal deleted inserted replaced
3941:2409c20399c1 3942:b3b6f1a8d60a
776 GEM_refresh_name = SDL_FALSE; 776 GEM_refresh_name = SDL_FALSE;
777 777
778 /* Open the window */ 778 /* Open the window */
779 wind_open(GEM_handle,x2,y2,w2,h2); 779 wind_open(GEM_handle,x2,y2,w2,h2);
780 } else { 780 } else {
781 /* Resize window if needed, to fit asked video mode */ 781 /* Resize window to fit asked video mode */
782 if (modeflags & SDL_RESIZABLE) { 782 wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
783 wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2); 783 if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
784 if ((w2&15)!=0) { 784 wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
785 w2=(w2|15)+1;
786 }
787 if ((w2!=width) || (h2!=height)) {
788 if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
789 wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
790 }
791 }
792 } 785 }
793 } 786 }
794 787
795 GEM_fullscreen = SDL_FALSE; 788 GEM_fullscreen = SDL_FALSE;
796 } 789 }