MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / SetVideoMode

Function SetVideoMode

Source/utils/display.cpp:228–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226
227#ifdef USE_SDL1
228void SetVideoMode(int width, int height, int bpp, uint32_t flags)
229{
230 Log("Setting video mode {}x{} bpp={} flags=0x{:08X}", width, height, bpp, flags);
231 ghMainWnd = SDL_SetVideoMode(width, height, bpp, flags);
232 if (ghMainWnd == nullptr) {
233 ErrSdl();
234 }
235 const SDL_VideoInfo &current = *SDL_GetVideoInfo();
236 Log("Video mode is now {}x{} bpp={} flags=0x{:08X}",
237 current.current_w, current.current_h, current.vfmt->BitsPerPixel, SDL_GetVideoSurface()->flags);
238}
239
240void SetVideoModeToPrimary(bool fullscreen, int width, int height)
241{

Callers 2

SetVideoModeToPrimaryFunction · 0.85

Calls 1

LogFunction · 0.85

Tested by

no test coverage detected