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

Function SetVideoModeToPrimary

SourceX/display.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void SetVideoModeToPrimary(bool fullscreen) {
35 int flags = SDL1_VIDEO_MODE_FLAGS | SDL_HWPALETTE;
36 if (fullscreen)
37 flags |= SDL_FULLSCREEN;
38 SetVideoMode(SDL1_VIDEO_MODE_WIDTH, SDL1_VIDEO_MODE_HEIGHT, SDL1_VIDEO_MODE_BPP, flags);
39 if (OutputRequiresScaling())
40 SDL_Log("Using software scaling");
41}
42
43bool IsFullScreen() {
44 return (SDL_GetVideoSurface()->flags & SDL_FULLSCREEN) != 0;

Callers 2

SpawnWindowFunction · 0.85
SVidPlayEndFunction · 0.85

Calls 3

SetVideoModeFunction · 0.85
OutputRequiresScalingFunction · 0.85
SDL_LogFunction · 0.85

Tested by

no test coverage detected