From 7cd40eb58d8f51d66b57d38a7c8b2baf15109b55 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 20 Mar 2016 09:53:59 +0100 Subject: [PATCH] Added uismall.bdc and way to load it for those that wish to use it still (nw) --- .gitignore | 1 + src/emu/rendfont.cpp | 20 +++++++++++++++++++- uismall.bdc | Bin 0 -> 3772 bytes 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 uismall.bdc diff --git a/.gitignore b/.gitignore index 5256e5fea85..b5573638381 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ !/makefile !/mame.doxygen !/*.md +!/*.bdc !/LICENSE /.idea regtests/chdman/temp diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp index bcd1ca35d78..24272eb7ef1 100644 --- a/src/emu/rendfont.cpp +++ b/src/emu/rendfont.cpp @@ -132,7 +132,25 @@ render_font::render_font(render_manager &manager, const char *filename) // if this is an OSD font, we're done if (filename != nullptr) - { + { + // attempt to open the cached version of the font + { + emu_file cachefile(manager.machine().options().font_path(), OPEN_FLAG_READ); + osd_file::error filerr = cachefile.open(filename); + if (filerr == osd_file::error::NONE) + { + // if we have a cached version, load it + bool result = load_cached(cachefile, 0); + + // if that worked, we're done + if (result) + { + render_font_command_glyph(); + return; + } + } + } + m_osdfont = manager.machine().osd().font_alloc(); if (m_osdfont) { diff --git a/uismall.bdc b/uismall.bdc new file mode 100644 index 0000000000000000000000000000000000000000..4dc1703dbea2f3a91dc2367f77bda59f19b6c0a4 GIT binary patch literal 3772 zcmYk9Yj6`)6vt0CA=#Erx@9t>&N$3wo0bw05K$4KhPX%x2qB0MP()O$ick<0U(6E1 z%r-boq&o1yanew*#22C>DoU-WwZ0Hv_ztxwFSX*UqJrn%O_=|Fxc9gJdtUeMxtVss z;zi3yJOfXj;Bgn}XVU=51DJ0{KJPP<+;L*V60iO?i0q_{$3xUT%Jr_aE*~Plehp1AQ9sbl^Df4B!OtOyJ9bX8~UU zd?oNzz*hs$2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