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

Function SetVideoMode

SourceX/display.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24#ifdef USE_SDL1
25void SetVideoMode(int width, int height, int bpp, std::uint32_t flags) {
26 SDL_Log("Setting video mode %dx%d bpp=%u flags=0x%08X", width, height, bpp, flags);
27 SDL_SetVideoMode(width, height, bpp, flags);
28 const auto &current = *SDL_GetVideoInfo();
29 SDL_Log("Video mode is now %dx%d bpp=%u flags=0x%08X",
30 current.current_w, current.current_h, current.vfmt->BitsPerPixel, SDL_GetVideoSurface()->flags);
31 window = SDL_GetVideoSurface();
32}
33
34void SetVideoModeToPrimary(bool fullscreen) {
35 int flags = SDL1_VIDEO_MODE_FLAGS | SDL_HWPALETTE;

Callers 2

SetVideoModeToPrimaryFunction · 0.85
SVidPlayBeginFunction · 0.85

Calls 1

SDL_LogFunction · 0.85

Tested by

no test coverage detected