comparison src/video/SDL_video.c @ 4661:03dcb795c583

Merged changes from the main SDL codebase
author Sam Lantinga <slouken@libsdl.org>
date Mon, 12 Jul 2010 21:09:23 -0700
parents dbbfdb9ea716
children c04dd942610d
comparison
equal deleted inserted replaced
4660:b15e7017409b 4661:03dcb795c583
302 } 302 }
303 return _this->name; 303 return _this->name;
304 } 304 }
305 305
306 SDL_VideoDevice * 306 SDL_VideoDevice *
307 SDL_GetVideoDevice() 307 SDL_GetVideoDevice(void)
308 { 308 {
309 return _this; 309 return _this;
310 } 310 }
311 311
312 int 312 int
713 SDL_BITSPERPIXEL(display_mode.format)); 713 SDL_BITSPERPIXEL(display_mode.format));
714 } 714 }
715 } 715 }
716 716
717 return 0; 717 return 0;
718 }
719
720 int
721 SDL_SetDisplayMode(const SDL_DisplayMode * mode)
722 {
723 if (!_this) {
724 SDL_UninitializedVideo();
725 return -1;
726 }
727 return SDL_SetDisplayModeForDisplay(SDL_CurrentDisplay, mode);
728 } 718 }
729 719
730 int 720 int
731 SDL_SetWindowDisplayMode(SDL_Window * window, const SDL_DisplayMode * mode) 721 SDL_SetWindowDisplayMode(SDL_Window * window, const SDL_DisplayMode * mode)
732 { 722 {
2841 } 2831 }
2842 if (_this->displays) { 2832 if (_this->displays) {
2843 SDL_free(_this->displays); 2833 SDL_free(_this->displays);
2844 _this->displays = NULL; 2834 _this->displays = NULL;
2845 } 2835 }
2836 if (_this->clipboard_text) {
2837 SDL_free(_this->clipboard_text);
2838 _this->clipboard_text = NULL;
2839 }
2846 _this->free(_this); 2840 _this->free(_this);
2847 _this = NULL; 2841 _this = NULL;
2848 } 2842 }
2849 2843
2850 int 2844 int