android+test: testcamera needs CAMERA permissions

This commit is contained in:
Anonymous Maarten 2024-05-16 16:43:53 +02:00
parent 79cabeef18
commit 88980aeb21
2 changed files with 7 additions and 1 deletions

View File

@ -69,8 +69,10 @@ static int SDLCALL SDL_ANDROID_SensorThread(void *data)
while (SDL_AtomicGet(&ctx->running)) {
Uint64 timestamp = SDL_GetTicksNS();
int poll_result;
if (ALooper_pollAll(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
poll_result = ALooper_pollOnce(-1, NULL, &events, (void **)&source);
if (poll_result == LOOPER_ID_USER) {
SDL_LockSensors();
for (i = 0; i < SDL_sensors_count; ++i) {
if (!SDL_sensors[i].event_queue) {

View File

@ -33,6 +33,10 @@
<!-- Allow access to the microphone -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Allow access to the camera -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<application
android:allowBackup="true"
android:icon="@mipmap/sdl-test"