Пример #1
0
void Activity::HandleMessage(android::PMessage message) {
    switch (message->GetWhat()) {
        case WhatMessage::START:
        {
            CallMain();
            break;        
        }
        case WhatMessage::QUIT_LOOP:
        {
            android::Looper::MyLooper()->Quit();
            break;
        }
        case WhatMessage::EXIT:
        {
            LOG("Exiting...");
            JavaExit(0);
            break;
        }
    }
}
Пример #2
0
extern "C" int CallApplicationMain(CALL_APPLICATION_MAIN_DATA* data)
{
    if (LoadCoreClr(data->runtimeDirectory) != 0)
    {
        return 1;
    }

    int result = 0;

    MultiByteToWideChar = (MultiByteToWideChar_fn)dlsym(pLibCoreClr, "MultiByteToWideChar");
    if (!MultiByteToWideChar)
    {
        fprintf(stderr, "Could not find MultiByteToWideChar entrypoint in coreclr\n");
        result = 1;
    }
    else
    {
        result = CallMain(data);
    }

    FreeCoreClr();

    return result;
}