mirror of https://github.com/AxioDL/metaforce.git
Fix crash on exit
This commit is contained in:
parent
bd0a72a4cb
commit
4bfe4026f2
|
@ -15,26 +15,29 @@ struct Application : boo::IApplicationCallback
|
|||
{
|
||||
HECL::Runtime::FileStoreManager m_fileMgr;
|
||||
HECL::CVarManager m_cvarManager;
|
||||
ViewManager m_viewManager;
|
||||
std::unique_ptr<ViewManager> m_viewManager;
|
||||
|
||||
bool m_running = true;
|
||||
|
||||
Application() :
|
||||
m_fileMgr(_S("urde")),
|
||||
m_cvarManager(m_fileMgr),
|
||||
m_viewManager(m_fileMgr, m_cvarManager) {}
|
||||
m_cvarManager(m_fileMgr)
|
||||
{
|
||||
m_viewManager.reset(new ViewManager(m_fileMgr, m_cvarManager));
|
||||
}
|
||||
|
||||
int appMain(boo::IApplication* app)
|
||||
{
|
||||
initialize(app);
|
||||
m_viewManager.init(app);
|
||||
m_viewManager->init(app);
|
||||
while (m_running)
|
||||
{
|
||||
if (!m_viewManager.proc())
|
||||
if (!m_viewManager->proc())
|
||||
break;
|
||||
}
|
||||
m_viewManager.stop();
|
||||
m_viewManager->stop();
|
||||
m_cvarManager.serialize();
|
||||
m_viewManager.reset();
|
||||
return 0;
|
||||
}
|
||||
void appQuitting(boo::IApplication*)
|
||||
|
|
|
@ -179,7 +179,7 @@ int CMain::appMain(boo::IApplication* app)
|
|||
TOneStatic<CGameArchitectureSupport> archSupport;
|
||||
|
||||
boo::IGraphicsCommandQueue* gfxQ = mainWindow->getCommandQueue();
|
||||
float rgba[4] = { 0.5f, 0.5f, 0.5f, 1.0f};
|
||||
float rgba[4] = { 0.2f, 0.2f, 0.2f, 1.0f};
|
||||
gfxQ->setClearColor(rgba);
|
||||
|
||||
float time = 0.0f;
|
||||
|
@ -192,6 +192,7 @@ int CMain::appMain(boo::IApplication* app)
|
|||
xe8_b24_finished = archSupport->Update();
|
||||
gfxQ->clearTarget();
|
||||
|
||||
gfxQ->resolveDisplay(nullptr);
|
||||
gfxQ->execute();
|
||||
|
||||
time = (frame++) / 60.f;
|
||||
|
|
Loading…
Reference in New Issue