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

Function dx_create_primary_surface

SourceX/dx.cpp:55–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55static void dx_create_primary_surface()
56{
57#ifndef USE_SDL1
58 if (renderer) {
59 int width, height;
60 SDL_RenderGetLogicalSize(renderer, &width, &height);
61 Uint32 format;
62 if (SDL_QueryTexture(texture, &format, nullptr, nullptr, nullptr) < 0)
63 ErrSdl();
64 renderer_texture_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, SDL_BITSPERPIXEL(format), format);
65 }
66#endif
67 if (GetOutputSurface() == nullptr) {
68 ErrSdl();
69 }
70}
71
72void dx_init(HWND hWnd)
73{

Callers 1

dx_initFunction · 0.85

Calls 2

GetOutputSurfaceFunction · 0.85

Tested by

no test coverage detected