Add graphics platform name to window title

This commit is contained in:
Phillip Stephens 2016-08-04 20:21:19 -07:00
parent 1fce6a7535
commit 02a79b4c80
6 changed files with 15 additions and 3 deletions

View File

@ -71,7 +71,7 @@ bool ProjectManager::newProject(const hecl::SystemString& path)
saveProject();
hecl::SystemString windowTitle(m_proj->getProjectRootPath().getLastComponent());
windowTitle += _S(" - URDE");
windowTitle += _S(" - URDE [") + hecl::SystemString(m_vm.platformName()) + _S("]");
m_vm.m_mainWindow->setTitle(windowTitle.c_str());
m_vm.DismissSplash();
m_vm.FadeInEditors();
@ -143,7 +143,7 @@ makeProj:
{
hecl::SystemString windowTitle(m_proj->getProjectRootPath().getLastComponent());
windowTitle += _S(" - URDE");
windowTitle += _S(" - URDE [") + hecl::SystemString(m_vm.platformName()) + _S("]");
m_vm.m_mainWindow->setTitle(windowTitle.c_str());
}
m_vm.DismissSplash();

View File

@ -299,6 +299,8 @@ void ViewManager::init(boo::IApplication* app)
float pixelFactor = 1.0;
m_mainBooFactory = m_mainWindow->getMainContextDataFactory();
m_mainPlatformName = m_mainBooFactory->platformName();
m_mainWindow->setTitle(_S("URDE [") + hecl::SystemString(m_mainPlatformName) + _S("]"));
m_mainCommandQueue = m_mainWindow->getCommandQueue();
m_viewResources.init(m_mainBooFactory, &m_fontCache, &m_themeData, pixelFactor);
m_iconsToken = InitializeIcons(m_viewResources);

View File

@ -37,6 +37,7 @@ class ViewManager : public specter::IViewManager
boo::IGraphicsDataFactory* m_mainBooFactory = nullptr;
boo::IGraphicsCommandQueue* m_mainCommandQueue = nullptr;
boo::ITextureR* m_renderTex = nullptr;
const boo::SystemChar* m_mainPlatformName;
std::unique_ptr<specter::RootView> m_rootView;
std::unique_ptr<SplashScreen> m_splash;
@ -140,6 +141,7 @@ public:
void pushRecentFile(const hecl::SystemString& path);
void init(boo::IApplication* app);
const boo::SystemChar* platformName() { return m_mainPlatformName; }
bool proc();
void stop();
};

View File

@ -431,5 +431,6 @@ boo::IGraphicsDataFactory::Platform CGraphics::g_BooPlatform = boo::IGraphicsDat
boo::IGraphicsDataFactory* CGraphics::g_BooFactory = nullptr;
boo::IGraphicsCommandQueue* CGraphics::g_BooMainCommandQueue = nullptr;
boo::ITextureR* CGraphics::g_SpareTexture = nullptr;
const boo::SystemChar* CGraphics::g_BooPlatformName = nullptr;
}

View File

@ -231,6 +231,7 @@ public:
static void TickRenderTimings();
static boo::IGraphicsDataFactory::Platform g_BooPlatform;
static const boo::SystemChar* g_BooPlatformName;
static boo::IGraphicsDataFactory* g_BooFactory;
static boo::IGraphicsCommandQueue* g_BooMainCommandQueue;
static boo::ITextureR* g_SpareTexture;
@ -240,11 +241,17 @@ public:
boo::ITextureR* spareTex)
{
g_BooPlatform = factory->platform();
g_BooPlatformName = factory->platformName();
g_BooFactory = factory;
g_BooMainCommandQueue = cc;
g_SpareTexture = spareTex;
}
const boo::SystemChar* PlatformName()
{
return g_BooPlatformName;
}
static boo::GraphicsDataToken CommitResources(const boo::FactoryCommitFunc& commitFunc)
{
return g_BooFactory->commitTransaction(commitFunc);

2
hecl

@ -1 +1 @@
Subproject commit d0339be1d573b89abdd8d3f53816c61afea7af80
Subproject commit 200706dc92e9a458b18da295eff60f9711964556