Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemvideo.c @ 959:51ec8fc8bedb
No need to close the window when going to fullscreen mode
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Fri, 08 Oct 2004 09:08:32 +0000 |
parents | 83db694556eb |
children | d9209754ebee |
comparison
equal
deleted
inserted
replaced
958:d390f9bd6b1c | 959:51ec8fc8bedb |
---|---|
625 if (VDI_bpp == 8) { | 625 if (VDI_bpp == 8) { |
626 modeflags |= SDL_HWPALETTE; | 626 modeflags |= SDL_HWPALETTE; |
627 } | 627 } |
628 | 628 |
629 if (flags & SDL_FULLSCREEN) { | 629 if (flags & SDL_FULLSCREEN) { |
630 /* Close window if needed */ | |
631 if (GEM_handle >= 0) { | |
632 wind_close(GEM_handle); | |
633 } | |
634 | |
635 GEM_LockScreen(this); | 630 GEM_LockScreen(this); |
636 | 631 |
637 GEM_ClearScreen(this); | 632 GEM_ClearScreen(this); |
638 | 633 |
639 modeflags |= SDL_FULLSCREEN; | 634 modeflags |= SDL_FULLSCREEN; |
663 modeflags |= SDL_NOFRAME; | 658 modeflags |= SDL_NOFRAME; |
664 } | 659 } |
665 modeflags |= SDL_SWSURFACE; | 660 modeflags |= SDL_SWSURFACE; |
666 | 661 |
667 /* Recreate window ? only for different widget or non-created window */ | 662 /* Recreate window ? only for different widget or non-created window */ |
668 if ((old_win_type == GEM_win_type) && (GEM_handle >= 0)) { | 663 if ((old_win_type != GEM_win_type) || (GEM_handle < 0)) { |
669 wind_get(GEM_handle, WF_CURRXYWH, &x2,&y2,&w2,&h2); | |
670 } else { | |
671 /* Calculate window size */ | 664 /* Calculate window size */ |
672 if (!wind_calc(WC_BORDER, GEM_win_type, 0,0,width,height, &x2,&y2,&w2,&h2)) { | 665 if (!wind_calc(WC_BORDER, GEM_win_type, 0,0,width,height, &x2,&y2,&w2,&h2)) { |
673 GEM_FreeBuffers(this); | 666 GEM_FreeBuffers(this); |
674 SDL_SetError("Can not calculate window attributes"); | 667 SDL_SetError("Can not calculate window attributes"); |
675 return NULL; | 668 return NULL; |
698 #endif | 691 #endif |
699 | 692 |
700 /* Setup window name */ | 693 /* Setup window name */ |
701 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0); | 694 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0); |
702 GEM_refresh_name = SDL_FALSE; | 695 GEM_refresh_name = SDL_FALSE; |
703 } | 696 |
704 | 697 /* Open the window */ |
705 /* Open the window */ | 698 wind_open(GEM_handle,x2,y2,w2,h2); |
706 wind_open(GEM_handle,x2,y2,w2,h2); | 699 } |
707 | 700 |
708 GEM_fullscreen = SDL_FALSE; | 701 GEM_fullscreen = SDL_FALSE; |
709 } | 702 } |
710 | 703 |
711 /* Set up the new mode framebuffer */ | 704 /* Set up the new mode framebuffer */ |