Skip to content

Commit

Permalink
drivers/sdl2dev/devpixmp: fall back to memory pixelmaps if depth matc…
Browse files Browse the repository at this point in the history
…hing
  • Loading branch information
vs49688 committed Sep 20, 2024
1 parent 9460716 commit 4d2bcec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/sdl2dev/devpixmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,14 @@ br_error BR_CMETHOD_DECL(br_device_pixelmap_sdl2, match)(br_device_pixelmap *sel
}

/*
* NB: pixel_bits is only used for depth formats, and as such is ignored until
* I figure out how to plumb one in using SDL_Surface (SDL has no depth pixel
* formats, nor single-channel ones).
* SDL has no depth or single-channel formats, so we can't handle depth
* textures - fall back to memory.
*
* NB: pixel_bits is only used for depth formats
*/
if(mt.use == BRT_DEPTH) {
return BR_CMETHOD(br_device_pixelmap_mem, match)(self, newpm, tv);
}

if(BRenderToSDLPixelFormat(mt.type, &format, &bpp) != BRE_OK) {
/*
Expand Down

0 comments on commit 4d2bcec

Please sign in to comment.