mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 04:31:09 +00:00
Merge pull request #1154 from 0lvin/sdl2_soft_fix
soft: fix texture lock
This commit is contained in:
commit
b134bb1770
1 changed files with 8 additions and 0 deletions
|
@ -2194,7 +2194,11 @@ RE_CleanFrame(void)
|
|||
memset(swap_buffers, 0,
|
||||
vid_buffer_height * vid_buffer_width * sizeof(pixel_t) * 2);
|
||||
|
||||
#ifdef USE_SDL3
|
||||
if (!SDL_LockTexture(texture, NULL, (void**)&pixels, &pitch))
|
||||
#else
|
||||
if (SDL_LockTexture(texture, NULL, (void**)&pixels, &pitch))
|
||||
#endif
|
||||
{
|
||||
Com_Printf("Can't lock texture: %s\n", SDL_GetError());
|
||||
return;
|
||||
|
@ -2214,7 +2218,11 @@ RE_FlushFrame(int vmin, int vmax)
|
|||
int pitch;
|
||||
Uint32 *pixels;
|
||||
|
||||
#ifdef USE_SDL3
|
||||
if (!SDL_LockTexture(texture, NULL, (void**)&pixels, &pitch))
|
||||
#else
|
||||
if (SDL_LockTexture(texture, NULL, (void**)&pixels, &pitch))
|
||||
#endif
|
||||
{
|
||||
Com_Printf("Can't lock texture: %s\n", SDL_GetError());
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue