Mercurial > sdl-ios-xcode
comparison src/video/xbios/SDL_xbios_milan.c @ 4196:89c7562eae9b SDL-1.2
Enumerates custom modes
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Sat, 19 Sep 2009 13:31:41 +0000 |
parents | 13de8ea401db |
children | 1bf6585720e9 |
comparison
equal
deleted
inserted
replaced
4195:13de8ea401db | 4196:89c7562eae9b |
---|---|
55 | 55 |
56 static const Uint8 mode_bpp[4]={ | 56 static const Uint8 mode_bpp[4]={ |
57 8, 15, 16, 32 | 57 8, 15, 16, 32 |
58 }; | 58 }; |
59 | 59 |
60 /*--- Variables ---*/ | |
61 | |
62 static int enum_actually_add; | |
63 static SDL_VideoDevice *enum_this; | |
64 | |
65 /*--- Functions ---*/ | |
66 | |
67 static unsigned long /*cdecl*/ enumfunc(SCREENINFO *inf, unsigned long flag) | |
68 { | |
69 xbiosmode_t modeinfo; | |
70 | |
71 modeinfo.number = inf->devID; | |
72 modeinfo.width = inf->scrWidth; | |
73 modeinfo.height = inf->scrHeight; | |
74 modeinfo.depth = inf->scrPlanes; | |
75 modeinfo.doubleline = SDL_FALSE; | |
76 | |
77 SDL_XBIOS_AddMode(enum_this, enum_actually_add, &modeinfo); | |
78 | |
79 return ENUMMODE_CONT; | |
80 } | |
81 | |
60 void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) | 82 void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) |
61 { | 83 { |
62 int i; | 84 int i; |
63 | 85 |
64 /* Read infos about current mode */ | 86 /* Read infos about current mode */ |
82 } | 104 } |
83 } | 105 } |
84 } | 106 } |
85 | 107 |
86 /* Read custom created modes */ | 108 /* Read custom created modes */ |
109 enum_this = this; | |
110 enum_actually_add = actually_add; | |
111 VsetScreen(-1, &enumfunc, MI_MAGIC, CMD_ENUMMODES); | |
87 } | 112 } |