mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 02:43:30 +08:00
Fixed warnings building on Android
This commit is contained in:
parent
596fcfa6c4
commit
06bd214af6
@ -25,7 +25,7 @@ cd $srcdir
|
||||
|
||||
build=build
|
||||
buildandroid=$build/android
|
||||
platform=android-16
|
||||
platform=android-21
|
||||
abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
|
||||
obj=
|
||||
lib=
|
||||
|
@ -55,6 +55,9 @@
|
||||
#include "video/SDL_surface_c.h"
|
||||
#include "video/SDL_video_c.h"
|
||||
#include "filesystem/SDL_filesystem_c.h"
|
||||
#ifdef SDL_PLATFORM_ANDROID
|
||||
#include "core/android/SDL_android.h"
|
||||
#endif
|
||||
|
||||
#define SDL_INIT_EVERYTHING ~0U
|
||||
|
||||
@ -711,7 +714,6 @@ const char *SDL_GetPlatform(void)
|
||||
bool SDL_IsTablet(void)
|
||||
{
|
||||
#ifdef SDL_PLATFORM_ANDROID
|
||||
extern bool SDL_IsAndroidTablet(void);
|
||||
return SDL_IsAndroidTablet();
|
||||
#elif defined(SDL_PLATFORM_IOS)
|
||||
extern bool SDL_IsIPad(void);
|
||||
@ -724,7 +726,6 @@ bool SDL_IsTablet(void)
|
||||
bool SDL_IsTV(void)
|
||||
{
|
||||
#ifdef SDL_PLATFORM_ANDROID
|
||||
extern bool SDL_IsAndroidTV(void);
|
||||
return SDL_IsAndroidTV();
|
||||
#elif defined(SDL_PLATFORM_IOS)
|
||||
extern bool SDL_IsAppleTV(void);
|
||||
|
@ -276,7 +276,7 @@ static bool maybe_resize(SDL_HashTable *restrict ht)
|
||||
}
|
||||
|
||||
Uint32 max_load_factor = 217; // range: 0-255; 217 is roughly 85%
|
||||
Uint32 resize_threshold = (max_load_factor * (Uint64)capacity) >> 8;
|
||||
Uint32 resize_threshold = (Uint32)((max_load_factor * (Uint64)capacity) >> 8);
|
||||
|
||||
if (ht->num_occupied_slots > resize_threshold) {
|
||||
return resize(ht, capacity * 2);
|
||||
|
@ -146,6 +146,7 @@ bool Android_JNI_OpenURL(const char *url);
|
||||
int SDL_GetAndroidSDKVersion(void);
|
||||
|
||||
bool SDL_IsAndroidTablet(void);
|
||||
bool SDL_IsAndroidTV(void);
|
||||
|
||||
// File Dialogs
|
||||
bool Android_JNI_OpenFileDialog(SDL_DialogFileCallback callback, void* userdata,
|
||||
|
Loading…
Reference in New Issue
Block a user