mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
camera: make things work on older PipeWire
This commit is contained in:

committed by
Sam Lantinga

parent
fb429f0dfe
commit
f3d79ad75f
@@ -356,7 +356,7 @@ static void param_update(struct spa_list *param_list, struct spa_list *pending_l
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
static struct sdl_video_format {
|
||||||
Uint32 format;
|
Uint32 format;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
} sdl_video_formats[] = {
|
} sdl_video_formats[] = {
|
||||||
@@ -390,7 +390,8 @@ static struct {
|
|||||||
|
|
||||||
static inline uint32_t sdl_format_to_id(Uint32 format)
|
static inline uint32_t sdl_format_to_id(Uint32 format)
|
||||||
{
|
{
|
||||||
SPA_FOR_EACH_ELEMENT_VAR(sdl_video_formats, f) {
|
struct sdl_video_format *f;
|
||||||
|
SPA_FOR_EACH_ELEMENT(sdl_video_formats, f) {
|
||||||
if (f->format == format)
|
if (f->format == format)
|
||||||
return f->id;
|
return f->id;
|
||||||
}
|
}
|
||||||
@@ -399,7 +400,8 @@ static inline uint32_t sdl_format_to_id(Uint32 format)
|
|||||||
|
|
||||||
static inline Uint32 id_to_sdl_format(uint32_t id)
|
static inline Uint32 id_to_sdl_format(uint32_t id)
|
||||||
{
|
{
|
||||||
SPA_FOR_EACH_ELEMENT_VAR(sdl_video_formats, f) {
|
struct sdl_video_format *f;
|
||||||
|
SPA_FOR_EACH_ELEMENT(sdl_video_formats, f) {
|
||||||
if (f->id == id)
|
if (f->id == id)
|
||||||
return f->format;
|
return f->format;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user