mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-12-03 17:42:55 +00:00
ref_soft: check if renderer and texture are created correctly during context initialization
This commit is contained in:
parent
ccc9027b1a
commit
0ea0dbf4ac
1 changed files with 8 additions and 1 deletions
|
@ -1932,6 +1932,10 @@ RE_InitContext(void *win)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
if(!renderer) {
|
||||
Com_Printf("Can't create renderer: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Select the color for drawing. It is set to black here. */
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
|
||||
|
@ -1974,7 +1978,10 @@ RE_InitContext(void *win)
|
|||
#endif
|
||||
SDL_TEXTUREACCESS_STREAMING,
|
||||
vid_buffer_width, vid_buffer_height);
|
||||
|
||||
if(!texture) {
|
||||
Com_Printf("Can't create texture: %s\n", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
R_InitGraphics(vid_buffer_width, vid_buffer_height);
|
||||
SWimp_CreateRender(vid_buffer_width, vid_buffer_height);
|
||||
|
||||
|
|
Loading…
Reference in a new issue