| 214 | | static int ConFunc_VideoGetModes_Callback(lua_State* LuaState) |
| 215 | | { |
| 216 | | wxDisplay Display; |
| 217 | | wxArrayVideoModes Modes =Display.GetModes(); |
| 218 | | const wxVideoMode CurrentMode =Display.GetCurrentMode(); |
| 219 | | bool Have32BPPModes=false; |
| 220 | | |
| 221 | | for (size_t ModeNr=0; ModeNr<Modes.GetCount(); ModeNr++) |
| 222 | | { |
| 223 | | const wxVideoMode& Mode=Modes[ModeNr]; |
| 224 | | |
| 225 | | if (Mode.bpp>=32) |
| 226 | | { |
| 227 | | Have32BPPModes=true; |
| 228 | | break; |
| 229 | | } |
| 230 | | } |
| 231 | | |
| 232 | | for (size_t ModeNr=0; ModeNr<Modes.GetCount(); ModeNr++) |
| 233 | | { |
| 234 | | const wxVideoMode& Mode =Modes[ModeNr]; |
| 235 | | const bool IsCurrent=(Mode==CurrentMode); |
| 236 | | |
| 237 | | if (Have32BPPModes && Mode.bpp<32 && !IsCurrent) continue; |
| 238 | | |
| 239 | | Console->Print(cf::va("%3u, %i x %i, %i BPP @ %i Hz%s\n", ModeNr, Mode.w, Mode.h, Mode.bpp, Mode.refresh, IsCurrent ? " (current)" : "")); |
| 240 | | } |
| 241 | | |
| | 214 | static int ConFunc_VideoInfo_Callback(lua_State* LuaState) |
| | 215 | { |
| | 216 | Console->Print(GetVideoModes()); |