From: <sag...@us...> - 2015-05-24 22:25:07
|
Revision: 5158 http://sourceforge.net/p/modplug/code/5158 Author: saga-games Date: 2015-05-24 22:25:01 +0000 (Sun, 24 May 2015) Log Message: ----------- [Imp] Credits: Scale font according to UI zoom settings. [Imp] Plugin selection dialog: Indicate bitness of non-native plugins. Modified Paths: -------------- trunk/OpenMPT/mptrack/CreditStatic.cpp trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/mptrack/Vstplug.h Modified: trunk/OpenMPT/mptrack/CreditStatic.cpp =================================================================== --- trunk/OpenMPT/mptrack/CreditStatic.cpp 2015-05-24 22:17:44 UTC (rev 5157) +++ trunk/OpenMPT/mptrack/CreditStatic.cpp 2015-05-24 22:25:01 UTC (rev 5158) @@ -9,6 +9,7 @@ #include "stdafx.h" #include "CreditStatic.h" +#include "MPTrackUtil.h" OPENMPT_NAMESPACE_BEGIN @@ -30,7 +31,7 @@ m_TextHeights[0] = 21; m_TextHeights[1] = 19; m_TextHeights[2] = 17; - m_TextHeights[3] = 15; + m_TextHeights[3] = MulDiv(15, Util::GetDPIy(m_hWnd), 96); m_nCurrentFontHeight = m_TextHeights[NORMAL_TEXT_HEIGHT]; Modified: trunk/OpenMPT/mptrack/SelectPluginDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/SelectPluginDialog.cpp 2015-05-24 22:17:44 UTC (rev 5157) +++ trunk/OpenMPT/mptrack/SelectPluginDialog.cpp 2015-05-24 22:25:01 UTC (rev 5158) @@ -339,7 +339,12 @@ } } - HTREEITEM h = AddTreeItem(plug.libraryName.AsNative().c_str(), plug.isInstrument ? IMAGE_PLUGININSTRUMENT : IMAGE_EFFECTPLUGIN, true, categoryFolders[plug.category], reinterpret_cast<LPARAM>(&plug)); + std::wstring title = plug.libraryName.AsNative(); + if(!plug.IsNativeFromCache()) + { + title += mpt::String::Print(L" (%1-Bit)", plug.GetDllBits()); + } + HTREEITEM h = AddTreeItem(title.c_str(), plug.isInstrument ? IMAGE_PLUGININSTRUMENT : IMAGE_EFFECTPLUGIN, true, categoryFolders[plug.category], reinterpret_cast<LPARAM>(&plug)); categoryUsed[plug.category] = true; if(nameFilterActive) Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2015-05-24 22:17:44 UTC (rev 5157) +++ trunk/OpenMPT/mptrack/Vstplug.h 2015-05-24 22:25:01 UTC (rev 5158) @@ -83,6 +83,9 @@ // Check whether a plugin can be hosted inside OpenMPT or requires bridging uint8 GetDllBits(bool fromCache = true) const; bool IsNative(bool fromCache = true) const { return GetDllBits(fromCache) == sizeof(void *) * CHAR_BIT; } + // Check if a plugin is native, and if it is currently unknown, assume that it is native. Use this function only for performance reasons + // (e.g. if tons of unscanned plugins would slow down generation of the plugin selection dialog) + bool IsNativeFromCache() const { return dllBits == sizeof(void *) * CHAR_BIT || dllBits == 0; } void WriteToCache() const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |