Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemmodes.c @ 2189:f54670a477bb
Update GEM driver to new API, will have to fill the void later :)
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Fri, 13 Jul 2007 22:55:15 +0000 |
parents | |
children | 7e1caa8452f3 |
comparison
equal
deleted
inserted
replaced
2188:0e751c1f83f5 | 2189:f54670a477bb |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 1997-2006 Sam Lantinga | |
4 | |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Lesser General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2.1 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Lesser General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Lesser General Public | |
16 License along with this library; if not, write to the Free Software | |
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | |
19 Sam Lantinga | |
20 slouken@libsdl.org | |
21 */ | |
22 #include "SDL_config.h" | |
23 | |
24 #include "SDL_gemvideo.h" | |
25 | |
26 | |
27 void | |
28 GEM_InitModes(_THIS) | |
29 { | |
30 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; | |
31 Uint32 Rmask, Gmask, Bmask, Amask; | |
32 SDL_VideoDisplay display; | |
33 SDL_DisplayData *displaydata; | |
34 SDL_DisplayMode mode; | |
35 int bpp; | |
36 | |
37 /* read vdi bpp, rmask, gmask, bmask, amask */ | |
38 | |
39 mode.format = | |
40 SDL_MasksToPixelFormatEnum(bpp, Rmask, Gmask, Bmask, Amask); | |
41 mode.w = 0 /* vdi width */; | |
42 mode.h = 0 /* vdi height */; | |
43 mode.refresh_rate = 0; | |
44 mode.driverdata = NULL; | |
45 | |
46 displaydata = (SDL_DisplayData *) SDL_malloc(sizeof(*displaydata)); | |
47 if (!displaydata) { | |
48 return; | |
49 } | |
50 /* fill display data */ | |
51 | |
52 SDL_zero(display); | |
53 display.desktop_mode = mode; | |
54 display.current_mode = mode; | |
55 display.driverdata = displaydata; | |
56 SDL_AddVideoDisplay(&display); | |
57 } | |
58 | |
59 void | |
60 GEM_GetDisplayModes(_THIS) | |
61 { | |
62 SDL_DisplayData *data = (SDL_DisplayData *) SDL_CurrentDisplay.driverdata; | |
63 SDL_DisplayMode mode; | |
64 //SDL_AddDisplayMode(_this->current_display, &mode); | |
65 } | |
66 | |
67 int | |
68 GEM_SetDisplayMode(_THIS, SDL_DisplayMode * mode) | |
69 { | |
70 //SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata; | |
71 return -1; | |
72 } | |
73 | |
74 void | |
75 GEM_QuitModes(_THIS) | |
76 { | |
77 } | |
78 | |
79 /* vi: set ts=4 sw=4 expandtab: */ |