| 244 | | flags |= Sdl.SDL_FULLSCREEN; |
| 245 | | |
| 246 | | // remember previous window settings for when we destroy it |
| 247 | | IntPtr info = Sdl.SDL_GetVideoInfo(); |
| 248 | | Sdl.SDL_VideoInfo videoInfo = (Sdl.SDL_VideoInfo) Marshal.PtrToStructure(info, typeof(Sdl.SDL_VideoInfo)); |
| 249 | | Sdl.SDL_PixelFormat vfmt = (Sdl.SDL_PixelFormat) Marshal.PtrToStructure(videoInfo.vfmt, typeof(Sdl.SDL_PixelFormat)); |
| 250 | | |
| 251 | | _previousWidth = videoInfo.current_w; |
| 252 | | _previousHeight = videoInfo.current_h; |
| 253 | | _previousColorDepth = vfmt.BitsPerPixel; |
| 254 | | } |
| 255 | | |
| 256 | | // set the video mode (and create the surface) |
| | 248 | flags |= Sdl.SDL_FULLSCREEN; |
| | 249 | } |
| | 250 | |
| | 251 | // set the video mode (and create the surface) |
| 261 | | throw new Exception( "Failed to create SDL window :" + Sdl.SDL_GetError() ); |
| 262 | | |
| 263 | | } |
| 264 | | |
| 265 | | internal void WndProc() |
| | 256 | throw new Exception( String.Format( "SDL: failed to set video mode to {0}x{1}, color depth: {2}./n{3}", Width, Height, ColorDepth, Sdl.SDL_GetError() ) ); |
| | 257 | |
| | 258 | } |
| | 259 | |
| | 260 | private void SavePreviousWindowSettings() |
| | 261 | { |
| | 262 | IntPtr info = Sdl.SDL_GetVideoInfo(); |
| | 263 | Sdl.SDL_VideoInfo videoInfo = (Sdl.SDL_VideoInfo) Marshal.PtrToStructure(info, typeof(Sdl.SDL_VideoInfo)); |
| | 264 | Sdl.SDL_PixelFormat vfmt = (Sdl.SDL_PixelFormat) Marshal.PtrToStructure(videoInfo.vfmt, typeof(Sdl.SDL_PixelFormat)); |
| | 265 | |
| | 266 | this._previousWidth = videoInfo.current_w; |
| | 267 | this._previousHeight = videoInfo.current_h; |
| | 268 | this._previousColorDepth = vfmt.BitsPerPixel; |
| | 269 | } |
| | 270 | |
| | 271 | internal void WndProc() |