mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2025-04-01 20:51:47 +00:00
camera: make things work on older PipeWire
This commit is contained in:
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_t id;
|
||||
} sdl_video_formats[] = {
|
||||
@ -390,7 +390,8 @@ static struct {
|
||||
|
||||
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)
|
||||
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)
|
||||
{
|
||||
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)
|
||||
return f->format;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user