Simple Directmedia Layer

android+test: testcamera needs CAMERA permissions

+7 -1
+3 -1
src/sensor/android/SDL_androidsensor.c
··· 69 70 while (SDL_AtomicGet(&ctx->running)) { 71 Uint64 timestamp = SDL_GetTicksNS(); 72 73 - if (ALooper_pollAll(-1, NULL, &events, (void **)&source) == LOOPER_ID_USER) { 74 SDL_LockSensors(); 75 for (i = 0; i < SDL_sensors_count; ++i) { 76 if (!SDL_sensors[i].event_queue) {
··· 69 70 while (SDL_AtomicGet(&ctx->running)) { 71 Uint64 timestamp = SDL_GetTicksNS(); 72 + int poll_result; 73 74 + poll_result = ALooper_pollOnce(-1, NULL, &events, (void **)&source); 75 + if (poll_result == LOOPER_ID_USER) { 76 SDL_LockSensors(); 77 for (i = 0; i < SDL_sensors_count; ++i) { 78 if (!SDL_sensors[i].event_queue) {
+4
test/android/cmake/AndroidManifest.xml.cmake
··· 33 <!-- Allow access to the microphone --> 34 <uses-permission android:name="android.permission.RECORD_AUDIO" /> 35 36 <application 37 android:allowBackup="true" 38 android:icon="@mipmap/sdl-test"
··· 33 <!-- Allow access to the microphone --> 34 <uses-permission android:name="android.permission.RECORD_AUDIO" /> 35 36 + <!-- Allow access to the camera --> 37 + <uses-permission android:name="android.permission.CAMERA" /> 38 + <uses-feature android:name="android.hardware.camera" /> 39 + 40 <application 41 android:allowBackup="true" 42 android:icon="@mipmap/sdl-test"