Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemvideo.c @ 1066:671bbd773c8a
Resize window to fit asked video mode
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Thu, 02 Jun 2005 22:02:18 +0000 |
parents | af92ee34b3e2 |
children | 8b1c83edcde2 |
comparison
equal
deleted
inserted
replaced
1065:5d9947da7510 | 1066:671bbd773c8a |
---|---|
699 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0); | 699 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0); |
700 GEM_refresh_name = SDL_FALSE; | 700 GEM_refresh_name = SDL_FALSE; |
701 | 701 |
702 /* Open the window */ | 702 /* Open the window */ |
703 wind_open(GEM_handle,x2,y2,w2,h2); | 703 wind_open(GEM_handle,x2,y2,w2,h2); |
704 } else { | |
705 /* Resize window if needed, to fit asked video mode */ | |
706 if (modeflags & SDL_RESIZABLE) { | |
707 wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2); | |
708 if ((w2&15)!=0) { | |
709 w2=(w2|15)+1; | |
710 } | |
711 if ((w2!=width) || (h2!=height)) { | |
712 if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) { | |
713 wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2); | |
714 } | |
715 } | |
716 } | |
704 } | 717 } |
705 | 718 |
706 GEM_fullscreen = SDL_FALSE; | 719 GEM_fullscreen = SDL_FALSE; |
707 } | 720 } |
708 | 721 |