Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemvideo.c @ 2120:2c835d58faad
make indent
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 14 Jun 2007 13:21:29 +0000 |
parents | a930c8e4d8b0 |
children | f54670a477bb |
comparison
equal
deleted
inserted
replaced
2119:9341a884a4d9 | 2120:2c835d58faad |
---|---|
648 } | 648 } |
649 | 649 |
650 /*--- Verify if asked mode can be used ---*/ | 650 /*--- Verify if asked mode can be used ---*/ |
651 if (VDI_bpp != bpp) { | 651 if (VDI_bpp != bpp) { |
652 SDL_SetError("%d bpp mode not supported", bpp); | 652 SDL_SetError("%d bpp mode not supported", bpp); |
653 return(NULL); | 653 return (NULL); |
654 } | 654 } |
655 | 655 |
656 if (flags & SDL_FULLSCREEN) { | 656 if (flags & SDL_FULLSCREEN) { |
657 if ((VDI_w < width) || (VDI_h < height)) { | 657 if ((VDI_w < width) || (VDI_h < height)) { |
658 SDL_SetError("%dx%d mode is too large", width, height); | 658 SDL_SetError("%dx%d mode is too large", width, height); |
772 } | 772 } |
773 | 773 |
774 /* Center window */ | 774 /* Center window */ |
775 x2 = (GEM_desk_w - w2) >> 1; | 775 x2 = (GEM_desk_w - w2) >> 1; |
776 y2 = (GEM_desk_h - h2) >> 1; | 776 y2 = (GEM_desk_h - h2) >> 1; |
777 if (x2<0) { | 777 if (x2 < 0) { |
778 x2 = 0; | 778 x2 = 0; |
779 } | 779 } |
780 if (y2<0) { | 780 if (y2 < 0) { |
781 y2 = 0; | 781 y2 = 0; |
782 } | 782 } |
783 x2 += GEM_desk_x; | 783 x2 += GEM_desk_x; |
784 y2 += GEM_desk_y; | 784 y2 += GEM_desk_y; |
785 | 785 |
809 | 809 |
810 /* Open the window */ | 810 /* Open the window */ |
811 wind_open(GEM_handle, x2, y2, w2, h2); | 811 wind_open(GEM_handle, x2, y2, w2, h2); |
812 } else { | 812 } else { |
813 /* Resize window to fit asked video mode */ | 813 /* Resize window to fit asked video mode */ |
814 wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2); | 814 wind_get(GEM_handle, WF_WORKXYWH, &x2, &y2, &w2, &h2); |
815 if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) { | 815 if (wind_calc |
816 wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2); | 816 (WC_BORDER, GEM_win_type, x2, y2, width, height, &x2, &y2, |
817 &w2, &h2)) { | |
818 wind_set(GEM_handle, WF_CURRXYWH, x2, y2, w2, h2); | |
817 } | 819 } |
818 } | 820 } |
819 | 821 |
820 GEM_fullscreen = SDL_FALSE; | 822 GEM_fullscreen = SDL_FALSE; |
821 } | 823 } |