Compiling and running on android, but the window is black when run (bug)
40
android/SDL_android_main.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
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 */
|
||||
void 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);
|
||||
|
||||
SDL_SetMainReady();
|
||||
|
||||
/* Run the application code! */
|
||||
int status;
|
||||
char *argv[2];
|
||||
argv[0] = SDL_strdup("SDL_app");
|
||||
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); */
|
||||
}
|
||||
|
||||
#endif /* __ANDROID__ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 429 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 822 B |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
android/project/res/drawable-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |