本文整理汇总了C++中Platform::enterMessagePump方法的典型用法代码示例。如果您正苦于以下问题:C++ Platform::enterMessagePump方法的具体用法?C++ Platform::enterMessagePump怎么用?C++ Platform::enterMessagePump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Platform
的用法示例。
在下文中一共展示了Platform::enterMessagePump方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lua_Platform_enterMessagePump
int lua_Platform_enterMessagePump(lua_State* state)
{
// Get the number of parameters.
int paramCount = lua_gettop(state);
// Attempt to match the parameters to a valid binding.
switch (paramCount)
{
case 1:
{
if ((lua_type(state, 1) == LUA_TUSERDATA))
{
Platform* instance = getInstance(state);
int result = instance->enterMessagePump();
// Push the return value onto the stack.
lua_pushinteger(state, result);
return 1;
}
lua_pushstring(state, "lua_Platform_enterMessagePump - Failed to match the given parameters to a valid function signature.");
lua_error(state);
break;
}
default:
{
lua_pushstring(state, "Invalid number of parameters (expected 1).");
lua_error(state);
break;
}
}
return 0;
}
示例2: WinMain
/**
* Main entry point.
*/
extern "C" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int cmdShow)
{
Game* game = Game::getInstance();
Platform* platform = Platform::create(game);
GP_ASSERT(platform);
int result = platform->enterMessagePump();
delete platform;
return result;
}
示例3: main
/**
* Main entry point.
*/
int main(int argc, char** argv)
{
Game* game = Game::getInstance();
Platform* platform = Platform::create(game);
GP_ASSERT(platform);
int result = platform->enterMessagePump();
delete platform;
return result;
}
示例4: android_main
/**
* Main entry point.
*/
void android_main(struct android_app* state)
{
// Android specific : Dummy function that needs to be called to
// ensure that the native activity works properly behind the scenes.
// app_dummy();
__state = state;
Game* game = Game::getInstance();
Platform* platform = Platform::create(game);
GP_ASSERT(platform);
platform->enterMessagePump();
delete platform;
// Android specific : the process needs to exit to trigger
// cleanup of global and static resources (such as the game).
exit(0);
}