SDL: testcamera: open the camera using the highest framerate available

From db43a6b418ab8d6b0c34e7b52e940fb7c61a446e Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 2 May 2024 12:27:20 -0700
Subject: [PATCH] testcamera: open the camera using the highest framerate
 available

---
 test/testcamera.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/test/testcamera.c b/test/testcamera.c
index 01e0fcf3d2e2e..25cbd09143709 100644
--- a/test/testcamera.c
+++ b/test/testcamera.c
@@ -97,13 +97,9 @@ int SDL_AppInit(void **appstate, int argc, char *argv[])
         return -1;
     }
 
-    SDL_CameraSpec *pspec = NULL;
-    #if 0  /* just for edge-case testing purposes, ignore. */
-    pspec = &spec;
-    spec.width = 100 /*1280 * 2*/;
-    spec.height = 100 /*720 * 2*/;
-    spec.format = SDL_PIXELFORMAT_YUY2 /*SDL_PIXELFORMAT_RGBA8888*/;
-    #endif
+    SDL_CameraSpec *pspec = &spec;
+    spec.interval_numerator = 1000;
+    spec.interval_denominator = 1;
 
     camera = SDL_OpenCameraDevice(devid, pspec);
     if (!camera) {