Cloud save: fixed broken 64-bit integer type

This commit is contained in:
Sergii Pylypenko
2014-07-09 23:36:38 +03:00
parent bfee524d25
commit c4eba6f2d0
4 changed files with 6 additions and 5 deletions

View File

@@ -213,7 +213,7 @@ FirstStartMenuOptions=''
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
MultiABI='armeabi-v7a'
MultiABI='armeabi-v7a x86'
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
AppMinimumRAM=0

View File

@@ -1252,7 +1252,7 @@ BNX_BOOL saveGame( BNX_GAME *game )
fclose( file );
SDL_SaveBMP(SDL_GetVideoSurface(), "screenshot.bmp");
SDL_ANDROID_CloudSave( sysGetFullFileName( csSaveGameName ), "", "Biniax2", "savegame", "screenshot.bmp", game->moves );
SDL_ANDROID_CloudSave( sysGetFullFileName( csSaveGameName ), "", "Biniax2", "savegame", "screenshot.bmp", (uint64_t)0 );
return BNX_TRUE;
}

View File

@@ -105,7 +105,7 @@ Use SDL_SaveBMP(SDL_GetVideoSurface(), "screenshot.bmp") to create the screensho
Returns 1 if save succeeded, 0 if user aborted sign-in, or there was no network available.
*/
extern DECLSPEC int SDLCALL SDL_ANDROID_CloudSave(const char *filename, const char *saveId, const char *dialogTitle,
const char *description, const char *screenshotFile, long long playedTimeMs);
const char *description, const char *screenshotFile, uint64_t playedTimeMs);
/*
Load the specified file from the cloud.

View File

@@ -475,8 +475,9 @@ int SDLCALL SDL_ANDROID_RequestNewAdvertisement(void)
}
int SDLCALL SDL_ANDROID_CloudSave(const char *filename, const char *saveId, const char *dialogTitle,
const char *description, const char *screenshotFile, long long playedTimeMs)
const char *description, const char *screenshotFile, uint64_t playedTimeMs)
{
__android_log_print(ANDROID_LOG_INFO, "libSDL", "SDL_ANDROID_CloudSave: played time %llu", playedTimeMs);
if( !filename )
return 0;
if( !saveId )
@@ -493,7 +494,7 @@ int SDLCALL SDL_ANDROID_CloudSave(const char *filename, const char *saveId, cons
jstring s3 = (*JavaEnv)->NewStringUTF(JavaEnv, dialogTitle);
jstring s4 = (*JavaEnv)->NewStringUTF(JavaEnv, description);
jstring s5 = (*JavaEnv)->NewStringUTF(JavaEnv, screenshotFile);
int result = (*JavaEnv)->CallBooleanMethod( JavaEnv, JavaRenderer, JavaRequestCloudSave, s1, s2, s3, s4, s5, &playedTimeMs );
int result = (*JavaEnv)->CallBooleanMethod( JavaEnv, JavaRenderer, JavaRequestCloudSave, s1, s2, s3, s4, s5, (jlong)playedTimeMs );
(*JavaEnv)->DeleteLocalRef(JavaEnv, s5);
(*JavaEnv)->DeleteLocalRef(JavaEnv, s4);
(*JavaEnv)->DeleteLocalRef(JavaEnv, s3);