Simple Directmedia Layer

android+test: testcamera needs CAMERA permissions

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