Fix Full immersive mode in Android 9 and higher.
LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
will make sure to use all the screen when the fullscreen flag is enabled.
The other option is
LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS will work in some cases but in devices that have a camera in the middle this flag will not work.
Set thread name on Android the same way as we do on Linux.
Acording to Bionic source code this function is available since 2013 [1] and
hase the same signature.
[1] 2a1bb4e646
This is still disabled because SDL2's documentation can be spotty at times,
but it's better to have this stuff available in case we ever make some
documentation improvements.
In reality, this condition will never occur, since the index is checked before calling the display retrieval function, but aggressive LTO with jump threading can generate a warning if this isn't explicitly checked.
The objfiles of different builds show various differences in
the calls to SDL_DYNAPI_entry elements. This is generated
dynamically by gendynapi.pl which uses an unordered opendir/readdir
pair. To make the build reproducible and thereby e.g. debugging
easier change this to be used in an ordered fashion.
Fixes#11565.
(cherry picked from commit 5418740c4a)
Fixes:
src/video/directfb/SDL_DirectFB_render.c: In function ‘DirectFB_CreateRenderer’:
src/video/directfb/SDL_DirectFB_render.c:1153:35: error: assignment to ‘void (*)(SDL_Renderer *, SDL_Texture *, SDL_ScaleMode)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
1153 | renderer->SetTextureScaleMode = DirectFB_SetTextureScaleMode;
| ^
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Notes:
- declaration was just recently changed by commit 'Fix warning for Android
NDK compiler: "function declaration without a prototype is deprecated in
all versions of C [-Wstrict-prototypes]"', see
ccade50587
WIN_AddDisplay asserted that the returned index is the expected next
one in the list. This can be an unexpected number when displays are
add and removed in a batch (eg, Remote Desktop disconnect and reconnect).
Instead always just make use of the next index, even if it is not the
expected next index value. This fixes issue #9105
(cherry picked from commit bee8874629)