author Sam Lantinga <>
Sat, 12 Jul 2014 13:05:41 -0700
changeset 9006 98c808d72e20
parent 8694 244c7784723b
child 9171 3464a9bda1e2
permissions -rw-r--r--
Fixed bug 2638 - (Signed) Can't create signed apps in Android Pablo Mayobre When generating a signed app with SDL 2.0.3 an issue comes up, watching at the Error Log points out that the issue lies in the src/main/android/SDL_android_main.c where the process name is defined as "SDL_app", this name turns into an erroneous name so it should be changed to "app_process"

    SDL_android_main.c, placed in the public domain by Sam Lantinga  3/13/14
#include "../../SDL_internal.h"

#ifdef __ANDROID__

/* Include the SDL main definition header */
#include "SDL_main.h"

                 Functions called by JNI
#include <jni.h>

/* Called before SDL_main() to initialize JNI bindings in SDL library */
extern void SDL_Android_Init(JNIEnv* env, jclass cls);

/* Start up the SDL app */
int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj)
    /* This interface could expand with ABI negotiation, calbacks, etc. */
    SDL_Android_Init(env, cls);


    /* Run the application code! */
    /* Use the name "app_process" so PHYSFS_platformCalcBaseDir() works.
    int status;
    char *argv[2];
    argv[0] = SDL_strdup("app_process");
    argv[1] = NULL;
    status = SDL_main(1, argv);

    /* Do not issue an exit or the whole application will terminate instead of just the SDL thread */
    /* exit(status); */

    return status;

#endif /* __ANDROID__ */

/* vi: set ts=4 sw=4 expandtab: */