Ignore:
Timestamp:
Jul 30, 2012, 2:25:20 AM (10 years ago)
Author:
sam
Message:

build: switch the Android native build rules to autoconf; still a bit rough
but we can now create shared objects for each project; only the testsuite
is not building properly because of issues with STLport, and EglApp is
deactivated because AndroidApp should have precedence.

Location:
trunk/src/platform/android
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/platform/android/androidapp.cpp

    r1222 r1684  
    2424using namespace lol;
    2525
    26 /* Monsterz-specific */
    27 #include "interface.h"
     26/* One of these wrappers will be overridden by the user's version */
     27void lol_android_main(void) __attribute__((weak));
     28void lol_android_main(void) {}
     29void lol_android_main(int argc, char **argv) __attribute__((weak));
     30void lol_android_main(int argc, char **argv) {}
     31void lol_android_main(int argc, char **argv, char **envp) __attribute__((weak));
     32void lol_android_main(int argc, char **argv, char **envp) {}
    2833
    2934namespace lol
     
    3136JavaVM *g_vm;
    3237jobject g_activity;
     38Thread *g_main_thread;
    3339
    3440AndroidApp::AndroidApp(char const *title, ivec2 res, float fps) :
     
    4854        Ticker::TickDraw();
    4955    }
     56}
     57
     58void *AndroidApp::MainRun(void *data)
     59{
     60    int argc = 1;
     61    char *argv[] = { "", NULL };
     62    char *env[] = { NULL };
     63
     64    /* Call the user's main() function. One of these will work. */
     65    lol_android_main();
     66    lol_android_main(argc, argv);
     67    lol_android_main(argc, argv, env);
     68
     69    return NULL;
    5070}
    5171
     
    7797    Video::Setup(ivec2(320, 200));
    7898
    79     new Interface();
    80     new DebugFps(20, 20);
     99    g_main_thread = new Thread(lol::AndroidApp::MainRun, NULL);;
    81100}
    82101
     
    93112{
    94113    /* FIXME: clean up */
     114    delete g_main_thread;
    95115}
    96116
  • trunk/src/platform/android/androidapp.h

    r1219 r1684  
    3333    void Run();
    3434
     35    static void *MainRun(void *data);
     36
    3537private:
    3638    AndroidAppData *data;
Note: See TracChangeset for help on using the changeset viewer.