COCOS2DX lua显示控制台输出窗口

2019-08-16  本文已影响0人  罐头过期

COCOS2DX lua显示控制台输出窗口
修改 win32\main.cpp 文件

//#include <shellapi.h>
USING_NS_CC;
#define USE_WIN32_CONSOLE

int WINAPI _tWinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPTSTR    lpCmdLine,
    int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

#ifdef USE_WIN32_CONSOLE
    AllocConsole();
    freopen("CONIN$", "r", stdin);
    freopen("CONOUT$", "w", stdout);
    freopen("CONOUT$", "w", stderr);
#endif

    //auto simulator = SimulatorWin::getInstance();
    //return simulator->run();
    AppDelegate app;
    int ret = Application::getInstance()->run();
#ifdef USE_WIN32_CONSOLE
    FreeConsole();
#endif
    return ret;
}
上一篇 下一篇

猜你喜欢

热点阅读