fix bug in GDIRenderer font cache that made fonts go wacky and get measured wrong and then TAStudio to layout differently each time
This commit is contained in:
parent
bcbc588e05
commit
c9dab721fb
|
@ -25,7 +25,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cache of all the HFONTs used, rather than create them again and again
|
/// Cache of all the HFONTs used, rather than create them again and again
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static readonly Dictionary<Font, FontCacheEntry> FontsCache = new Dictionary<Font, FontCacheEntry>();
|
private readonly Dictionary<Font, FontCacheEntry> FontsCache = new Dictionary<Font, FontCacheEntry>();
|
||||||
|
|
||||||
class FontCacheEntry
|
class FontCacheEntry
|
||||||
{
|
{
|
||||||
|
@ -302,7 +302,7 @@ namespace BizHawk.Client.EmuHawk.CustomControls
|
||||||
SelectObject(_hdc, GetCachedHFont(font));
|
SelectObject(_hdc, GetCachedHFont(font));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IntPtr GetCachedHFont(Font font)
|
private IntPtr GetCachedHFont(Font font)
|
||||||
{
|
{
|
||||||
//the original code struck me as bad. attempting to ID fonts by picking a subset of their fields is not gonna work.
|
//the original code struck me as bad. attempting to ID fonts by picking a subset of their fields is not gonna work.
|
||||||
//don't call this.Font in InputRoll.cs, it is probably slow.
|
//don't call this.Font in InputRoll.cs, it is probably slow.
|
||||||
|
|
Loading…
Reference in New Issue