| 53 | } |
| 54 | |
| 55 | static 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 | |
| 72 | void dx_init(HWND hWnd) |
| 73 | { |
no test coverage detected