Changeset 836


Ignore:
Timestamp:
Aug 18, 2011, 8:44:35 AM (8 years ago)
Author:
sam
Message:

android: implement JNI_OnLoad and use Log::Info instead of the native
Android functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/androidapp.cpp

    r780 r836  
    3030};
    3131
     32extern "C" jint
     33JNI_OnLoad(JavaVM* vm, void* reserved)
     34{
     35    return JNI_VERSION_1_4;
     36}
     37
    3238extern "C" void
    3339Java_org_zoy_LolEngine_LolActivity_nativeInit(JNIEnv* env, jobject thiz)
     
    4046Java_org_zoy_LolEngine_LolRenderer_nativeInit(JNIEnv* env)
    4147{
     48    /* We cannot use JNI_OnLoad for this because we're in a different
     49     * thread now. */
    4250    g_env = env;
    4351
    44     __android_log_print(ANDROID_LOG_INFO, "LOL", "init");
     52    Log::Info("initialising renderer");
    4553    Ticker::Setup(30.0f);
    4654    Video::Setup(vec2i(320, 200));
     
    5462                                                jint w, jint h)
    5563{
    56     __android_log_print(ANDROID_LOG_INFO, "LOL", "resize w=%d h=%d", w, h);
     64    Log::Info("resizing to %i x %i", w, h);
    5765    Video::Setup(vec2i(w, h));
    5866}
Note: See TracChangeset for help on using the changeset viewer.