mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 14:08:28 +00:00
Switched the camera format to use framerate ratio instead of interval ratio
This is more intuitive for game developers and users. Fixes https://github.com/libsdl-org/SDL/issues/9896
This commit is contained in:
@@ -655,11 +655,11 @@ static void GatherCameraSpecs(const char *devid, CameraFormatAddData *add_data,
|
||||
const long long duration = (long long) i64ptr[3];
|
||||
SDL_Log("CAMERA: possible fps %s %dx%d duration=%lld", SDL_GetPixelFormatName(sdlfmt), fpsw, fpsh, duration);
|
||||
if ((duration > 0) && (fpsfmt == fmt) && (fpsw == w) && (fpsh == h)) {
|
||||
SDL_AddCameraFormat(add_data, sdlfmt, colorspace, w, h, duration, 1000000000);
|
||||
SDL_AddCameraFormat(add_data, sdlfmt, colorspace, w, h, 1000000000, duration);
|
||||
}
|
||||
}
|
||||
#else
|
||||
SDL_AddCameraFormat(add_data, sdlfmt, colorspace, w, h, 1, 30);
|
||||
SDL_AddCameraFormat(add_data, sdlfmt, colorspace, w, h, 30, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user