comparison src/video/gem/SDL_gemvideo.c @ 2107:757dfb38f574

Simply resize existing window
author Patrice Mandin <patmandin@gmail.com>
date Sat, 26 May 2007 20:10:49 +0000
parents 2714a8976e37
children a930c8e4d8b0
comparison
equal deleted inserted replaced
2106:2714a8976e37 2107:757dfb38f574
803 GEM_refresh_name = SDL_FALSE; 803 GEM_refresh_name = SDL_FALSE;
804 804
805 /* Open the window */ 805 /* Open the window */
806 wind_open(GEM_handle, x2, y2, w2, h2); 806 wind_open(GEM_handle, x2, y2, w2, h2);
807 } else { 807 } else {
808 /* Resize window if needed, to fit asked video mode */ 808 /* Resize window to fit asked video mode */
809 if (modeflags & SDL_RESIZABLE) { 809 wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
810 wind_get(GEM_handle, WF_WORKXYWH, &x2, &y2, &w2, &h2); 810 if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
811 if ((w2 & 15) != 0) { 811 wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
812 w2 = (w2 | 15) + 1;
813 }
814 if ((w2 != width) || (h2 != height)) {
815 if (wind_calc
816 (WC_BORDER, GEM_win_type, x2, y2, width,
817 height, &x2, &y2, &w2, &h2)) {
818 wind_set(GEM_handle, WF_CURRXYWH, x2, y2, w2, h2);
819 }
820 }
821 } 812 }
822 } 813 }
823 814
824 GEM_fullscreen = SDL_FALSE; 815 GEM_fullscreen = SDL_FALSE;
825 } 816 }