mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:41:47 +08:00
[sdl2]: Fix build error on android ndk r27 (#40510)
This commit is contained in:
parent
3d23d8f278
commit
f2ea3e0789
13
ports/sdl2/poll-fix.patch
Normal file
13
ports/sdl2/poll-fix.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/sensor/android/SDL_androidsensor.c b/src/sensor/android/SDL_androidsensor.c
|
||||
index 3f57253cd..c06faf2ee 100644
|
||||
--- a/src/sensor/android/SDL_androidsensor.c
|
||||
+++ b/src/sensor/android/SDL_androidsensor.c
|
||||
@@ -161,7 +161,7 @@ static void SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
|
||||
ASensorEvent event;
|
||||
struct android_poll_source *source;
|
||||
|
||||
- if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
|
||||
+ if (ALooper_pollOnce(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
|
||||
SDL_zero(event);
|
||||
while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
|
||||
SDL_PrivateSensorUpdate(sensor, 0, event.data, SDL_arraysize(event.data));
|
@ -8,6 +8,7 @@ vcpkg_from_github(
|
||||
deps.patch
|
||||
alsa-dep-fix.patch
|
||||
cxx-linkage-pkgconfig.diff
|
||||
poll-fix.patch # Remove with next version (2.30.7).
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "sdl2",
|
||||
"version": "2.30.6",
|
||||
"port-version": 1,
|
||||
"description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.",
|
||||
"homepage": "https://www.libsdl.org/download-2.0.php",
|
||||
"license": "Zlib",
|
||||
|
@ -8070,7 +8070,7 @@
|
||||
},
|
||||
"sdl2": {
|
||||
"baseline": "2.30.6",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"sdl2-gfx": {
|
||||
"baseline": "1.0.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "35851962eb04c90f32822e7574ae69265113d88b",
|
||||
"version": "2.30.6",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "0ddd2439efece30735786a3530fced0bb645c0af",
|
||||
"version": "2.30.6",
|
||||
|
Loading…
Reference in New Issue
Block a user