comparison src/video/SDL_video.c @ 5248:3a8a452b49f0

Removed gamma support since it wasn't widely used and not well supported.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 10 Feb 2011 11:39:08 -0800
parents 78ce7bfd0faf
children 762e40fb8e28
comparison
equal deleted inserted replaced
5247:78ce7bfd0faf 5248:3a8a452b49f0
1642 void 1642 void
1643 SDL_OnWindowFocusGained(SDL_Window * window) 1643 SDL_OnWindowFocusGained(SDL_Window * window)
1644 { 1644 {
1645 SDL_VideoDisplay *display = window->display; 1645 SDL_VideoDisplay *display = window->display;
1646 1646
1647 if (display->gamma && _this->SetDisplayGammaRamp) {
1648 _this->SetDisplayGammaRamp(_this, display, display->gamma);
1649 }
1650 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN)) 1647 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
1651 && _this->SetWindowGrab) { 1648 && _this->SetWindowGrab) {
1652 _this->SetWindowGrab(_this, window); 1649 _this->SetWindowGrab(_this, window);
1653 } 1650 }
1654 } 1651 }
1662 if ((window->flags & SDL_WINDOW_FULLSCREEN) && 1659 if ((window->flags & SDL_WINDOW_FULLSCREEN) &&
1663 _this->num_displays == 1) { 1660 _this->num_displays == 1) {
1664 SDL_MinimizeWindow(window); 1661 SDL_MinimizeWindow(window);
1665 } 1662 }
1666 1663
1667 if (display->gamma && _this->SetDisplayGammaRamp) {
1668 _this->SetDisplayGammaRamp(_this, display, display->saved_gamma);
1669 }
1670 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN)) 1664 if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
1671 && _this->SetWindowGrab) { 1665 && _this->SetWindowGrab) {
1672 _this->SetWindowGrab(_this, window); 1666 _this->SetWindowGrab(_this, window);
1673 } 1667 }
1674 } 1668 }
1822 display->display_modes = NULL; 1816 display->display_modes = NULL;
1823 } 1817 }
1824 if (display->desktop_mode.driverdata) { 1818 if (display->desktop_mode.driverdata) {
1825 SDL_free(display->desktop_mode.driverdata); 1819 SDL_free(display->desktop_mode.driverdata);
1826 display->desktop_mode.driverdata = NULL; 1820 display->desktop_mode.driverdata = NULL;
1827 }
1828 if (display->gamma) {
1829 SDL_free(display->gamma);
1830 display->gamma = NULL;
1831 } 1821 }
1832 if (display->driverdata) { 1822 if (display->driverdata) {
1833 SDL_free(display->driverdata); 1823 SDL_free(display->driverdata);
1834 display->driverdata = NULL; 1824 display->driverdata = NULL;
1835 } 1825 }