예제 #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
파일: dnx.coreclr.cpp 프로젝트: Alexei-/dnx
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;
}