Android: message to indicate that main() is called for the 1 or n'th time

main
Sylvain 2023-04-06 10:06:19 +02:00 committed by Sylvain Becker
parent 60dcaff7eb
commit 3c703f2061
1 changed files with 4 additions and 1 deletions

View File

@ -729,6 +729,8 @@ JNIEXPORT void JNICALL SDL_JAVA_CONTROLLER_INTERFACE(nativeSetupJNI)(JNIEnv *env
/* SDL main function prototype */
typedef int (*SDL_main_func)(int argc, char *argv[]);
static int run_count = 1;
/* Start up the SDL app */
JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls, jstring library, jstring function, jobject array)
{
@ -736,7 +738,8 @@ JNIEXPORT int JNICALL SDL_JAVA_INTERFACE(nativeRunMain)(JNIEnv *env, jclass cls,
const char *library_file;
void *library_handle;
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeRunMain()");
__android_log_print(ANDROID_LOG_VERBOSE, "SDL", "nativeRunMain() %d time", run_count);
run_count += 1;
/* Save JNIEnv of SDLThread */
Android_JNI_SetEnv(env);