fix debug printing with dummy renderer

This commit is contained in:
Tim Felgentreff 2022-05-31 20:17:42 +02:00
parent 99f26b1156
commit a14c4f539a

View file

@ -395,13 +395,14 @@ void InitVideoSdl()
TheRenderer = SDL_CreateRenderer(TheWindow, -1, rendererFlags);
}
SDL_RendererInfo rendererInfo;
SDL_GetRendererInfo(TheRenderer, &rendererInfo);
printf("[Renderer] %s\n", rendererInfo.name);
if (strlen(rendererInfo.name) == 0) {
dummyRenderer = true;
}
if(!strncmp(rendererInfo.name, "opengl", 6)) {
LoadShaderExtensions();
if (!SDL_GetRendererInfo(TheRenderer, &rendererInfo)) {
printf("[Renderer] %s\n", rendererInfo.name);
if (strlen(rendererInfo.name) == 0) {
dummyRenderer = true;
}
if(!strncmp(rendererInfo.name, "opengl", 6)) {
LoadShaderExtensions();
}
}
SDL_SetRenderDrawColor(TheRenderer, 0, 0, 0, 255);
Video.ResizeScreen(Video.Width, Video.Height);