From f1501a686ca27662b1ad05cc6ec9b9fa0d62fb98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 23 Apr 2016 12:25:05 -0700 Subject: [PATCH] texturev: Added texture info to title bar. --- tools/texturev/texturev.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/texturev/texturev.cpp b/tools/texturev/texturev.cpp index 60ba28c9b..d8f3db2c1 100644 --- a/tools/texturev/texturev.cpp +++ b/tools/texturev/texturev.cpp @@ -27,6 +27,8 @@ #include namespace stl = tinystl; +#include "image.h" + struct Binding { enum Enum @@ -534,8 +536,6 @@ int _main_(int _argc, char** _argv) fileIndex = view.m_fileIndex; filePath = view.m_fileList[view.m_fileIndex].c_str(); - entry::WindowHandle handle = { 0 }; - entry::setWindowTitle(handle, filePath); texture = loadTexture(filePath , 0 @@ -545,6 +545,16 @@ int _main_(int _argc, char** _argv) , 0 , &view.m_info ); + + std::string title; + bx::stringPrintf(title, "%s (%d x %d, %s)" + , filePath + , view.m_info.width + , view.m_info.height + , bgfx::getName(view.m_info.format) + ); + entry::WindowHandle handle = { 0 }; + entry::setWindowTitle(handle, title.c_str() ); } int64_t now = bx::getHPCounter();