2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
4 Copyright (C) 2001 Hsieh-Fu Tsai
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the Free
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "SDL_config.h"
28 #include "SDL_stdinc.h"
29 #include "SDL_nxmodes_c.h"
31 SDL_Rect ** NX_ListModes (_THIS, SDL_PixelFormat * format, Uint32 flags)
33 if (flags & SDL_FULLSCREEN)
36 if (SDL_Visual.bpp == format -> BitsPerPixel) {
37 return ((SDL_Rect **) -1) ;
39 return ((SDL_Rect **) 0) ;
43 void NX_FreeVideoModes (_THIS)
48 for (i = 0; SDL_modelist [i]; ++ i) {
49 SDL_free (SDL_modelist [i]) ;
51 SDL_free (SDL_modelist) ;
56 int NX_EnterFullScreen (_THIS)
58 if (! currently_fullscreen) {
61 GrGetScreenInfo (& si) ;
62 GrResizeWindow (FSwindow, si.cols, si.rows) ;
63 GrUnmapWindow (SDL_Window) ;
64 GrMapWindow (FSwindow) ;
65 GrRaiseWindow (FSwindow) ;
66 GrSetFocus (FSwindow) ;
67 currently_fullscreen = 1 ;
73 int NX_LeaveFullScreen (_THIS)
75 if (currently_fullscreen) {
76 GrUnmapWindow (FSwindow) ;
77 GrMapWindow (SDL_Window) ;
78 GrRaiseWindow (SDL_Window) ;
79 GrSetFocus (SDL_Window) ;
80 currently_fullscreen = 0 ;