int Core::RunCmdTool(int argc, char * argv[], AppHandle handle)
	{
		CoreWin32Platform * core = new CoreWin32Platform();

		//core->CreateWin32Window(handle);
		//core->Run();
		core->EnableConsoleMode();
		core->CreateSingletons();

		core->InitArgs();

		Logger::Instance()->EnableConsoleMode();
		
		FrameworkDidLaunched();
		FrameworkWillTerminate();
		core->ReleaseSingletons();
#ifdef ENABLE_MEMORY_MANAGER
		if (DAVA::MemoryManager::Instance() != 0)
		{
			DAVA::MemoryManager::Instance()->FinalLog();
		}
#endif
		return 0;

	}
Beispiel #2
0
void QtLayerWin32::SetWindow(HINSTANCE hInstance, HWND hWindow, int32 width, int32 height)
{
    CoreWin32Platform *core = dynamic_cast<CoreWin32Platform *>(CoreWin32Platform::Instance());
    if (NULL != core)
    {
        core->SetupWindow(hInstance, hWindow);
        RenderManager::Create(Core::RENDERER_OPENGL);
        RenderManager::Instance()->Create(hInstance, hWindow);

        FrameworkDidLaunched();

        Resize(width, height);
// 		DisplayMode currentMode = DisplayMode(width, height, 16, 0);
//
// 		KeyedArchive * options = Core::Instance()->GetOptions();
// 		if (options)
// 		{
// 			currentMode.bpp = options->GetInt32("bpp");
// 		}
//
// 		RenderManager::Instance()->ChangeDisplayMode(currentMode, false);
// 		RenderManager::Instance()->Init(currentMode.width, currentMode.height);
// 		UIControlSystem::Instance()->SetInputScreenAreaSize(currentMode.width, currentMode.height);
// 		Core::Instance()->SetPhysicalScreenSize(currentMode.width, currentMode.height);

        AppStarted();
    }
}
Beispiel #3
0
void QtLayerWin32::LockKeyboardInput(bool locked)
{
	CoreWin32Platform *core = dynamic_cast<CoreWin32Platform *>(CoreWin32Platform::Instance());
	if (NULL != core)
	{
		core->SetFocused(locked);
	}
}
Beispiel #4
0
void QtLayerWin32::SetWindow(HINSTANCE hInstance, HWND hWindow, int32 width, int32 height)
{
	CoreWin32Platform *core = dynamic_cast<CoreWin32Platform *>(CoreWin32Platform::Instance());
	if (NULL != core)
	{
		core->SetupWindow(hInstance, hWindow);
		RenderManager::Create(Core::RENDERER_OPENGL);		
		RenderManager::Instance()->Create(hInstance, hWindow);

		FrameworkDidLaunched();

		Resize(width, height);
		AppStarted();
	}
}
Beispiel #5
0
	int Core::Run(int argc, char * argv[], AppHandle handle)
	{
		CoreWin32Platform * core = new CoreWin32Platform();
		core->CreateSingletons();
		bool windowCreated = core->CreateWin32Window(handle);
		if(windowCreated)
		{
			core->InitArgs();
			core->Run();
			core->ReleaseSingletons();
			
#ifdef ENABLE_MEMORY_MANAGER
			if (DAVA::MemoryManager::Instance() != 0)
			{
				DAVA::MemoryManager::Instance()->FinalLog();
			}
#endif
		}

		CloseHandle(core->hMutex);
		return 0;
	
	}