Cloud save: fixed broken 64-bit integer type
This commit is contained in:
@@ -213,7 +213,7 @@ FirstStartMenuOptions=''
|
|||||||
|
|
||||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
# 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
|
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||||
AppMinimumRAM=0
|
AppMinimumRAM=0
|
||||||
|
|||||||
@@ -1252,7 +1252,7 @@ BNX_BOOL saveGame( BNX_GAME *game )
|
|||||||
|
|
||||||
fclose( file );
|
fclose( file );
|
||||||
SDL_SaveBMP(SDL_GetVideoSurface(), "screenshot.bmp");
|
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;
|
return BNX_TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
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,
|
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.
|
Load the specified file from the cloud.
|
||||||
|
|||||||
@@ -475,8 +475,9 @@ int SDLCALL SDL_ANDROID_RequestNewAdvertisement(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int SDLCALL SDL_ANDROID_CloudSave(const char *filename, const char *saveId, const char *dialogTitle,
|
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 )
|
if( !filename )
|
||||||
return 0;
|
return 0;
|
||||||
if( !saveId )
|
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 s3 = (*JavaEnv)->NewStringUTF(JavaEnv, dialogTitle);
|
||||||
jstring s4 = (*JavaEnv)->NewStringUTF(JavaEnv, description);
|
jstring s4 = (*JavaEnv)->NewStringUTF(JavaEnv, description);
|
||||||
jstring s5 = (*JavaEnv)->NewStringUTF(JavaEnv, screenshotFile);
|
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, s5);
|
||||||
(*JavaEnv)->DeleteLocalRef(JavaEnv, s4);
|
(*JavaEnv)->DeleteLocalRef(JavaEnv, s4);
|
||||||
(*JavaEnv)->DeleteLocalRef(JavaEnv, s3);
|
(*JavaEnv)->DeleteLocalRef(JavaEnv, s3);
|
||||||
|
|||||||
Reference in New Issue
Block a user