mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-22 04:38:30 +00:00
Fixed warnings building on Android
This commit is contained in:
parent
596fcfa6c4
commit
06bd214af6
4 changed files with 6 additions and 4 deletions
|
@ -25,7 +25,7 @@ cd $srcdir
|
||||||
|
|
||||||
build=build
|
build=build
|
||||||
buildandroid=$build/android
|
buildandroid=$build/android
|
||||||
platform=android-16
|
platform=android-21
|
||||||
abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
|
abi="arm64-v8a" # "armeabi-v7a arm64-v8a x86 x86_64"
|
||||||
obj=
|
obj=
|
||||||
lib=
|
lib=
|
||||||
|
|
|
@ -55,6 +55,9 @@
|
||||||
#include "video/SDL_surface_c.h"
|
#include "video/SDL_surface_c.h"
|
||||||
#include "video/SDL_video_c.h"
|
#include "video/SDL_video_c.h"
|
||||||
#include "filesystem/SDL_filesystem_c.h"
|
#include "filesystem/SDL_filesystem_c.h"
|
||||||
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
|
#include "core/android/SDL_android.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SDL_INIT_EVERYTHING ~0U
|
#define SDL_INIT_EVERYTHING ~0U
|
||||||
|
|
||||||
|
@ -711,7 +714,6 @@ const char *SDL_GetPlatform(void)
|
||||||
bool SDL_IsTablet(void)
|
bool SDL_IsTablet(void)
|
||||||
{
|
{
|
||||||
#ifdef SDL_PLATFORM_ANDROID
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
extern bool SDL_IsAndroidTablet(void);
|
|
||||||
return SDL_IsAndroidTablet();
|
return SDL_IsAndroidTablet();
|
||||||
#elif defined(SDL_PLATFORM_IOS)
|
#elif defined(SDL_PLATFORM_IOS)
|
||||||
extern bool SDL_IsIPad(void);
|
extern bool SDL_IsIPad(void);
|
||||||
|
@ -724,7 +726,6 @@ bool SDL_IsTablet(void)
|
||||||
bool SDL_IsTV(void)
|
bool SDL_IsTV(void)
|
||||||
{
|
{
|
||||||
#ifdef SDL_PLATFORM_ANDROID
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
extern bool SDL_IsAndroidTV(void);
|
|
||||||
return SDL_IsAndroidTV();
|
return SDL_IsAndroidTV();
|
||||||
#elif defined(SDL_PLATFORM_IOS)
|
#elif defined(SDL_PLATFORM_IOS)
|
||||||
extern bool SDL_IsAppleTV(void);
|
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 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) {
|
if (ht->num_occupied_slots > resize_threshold) {
|
||||||
return resize(ht, capacity * 2);
|
return resize(ht, capacity * 2);
|
||||||
|
|
|
@ -146,6 +146,7 @@ bool Android_JNI_OpenURL(const char *url);
|
||||||
int SDL_GetAndroidSDKVersion(void);
|
int SDL_GetAndroidSDKVersion(void);
|
||||||
|
|
||||||
bool SDL_IsAndroidTablet(void);
|
bool SDL_IsAndroidTablet(void);
|
||||||
|
bool SDL_IsAndroidTV(void);
|
||||||
|
|
||||||
// File Dialogs
|
// File Dialogs
|
||||||
bool Android_JNI_OpenFileDialog(SDL_DialogFileCallback callback, void* userdata,
|
bool Android_JNI_OpenFileDialog(SDL_DialogFileCallback callback, void* userdata,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue