Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102043567
D47403.id145890.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D47403.id145890.diff
View Options
diff --git a/stand/liblua/gfx_utils.c b/stand/liblua/gfx_utils.c
--- a/stand/liblua/gfx_utils.c
+++ b/stand/liblua/gfx_utils.c
@@ -254,7 +254,9 @@
/*
* Add in the compatibility references in the loader table. Doing it with
- * a pseudo-embedded script is easier than the raw calls.
+ * a pseudo-embedded script is easier than the raw calls. Also note: when
+ * removing this in the future, pay special attention to drawer.lua which
+ * purposely uses loader.term_drawrect to detect the text-only BIOS laoder.
*/
if (luaL_dostring(L,
"loader.fb_bezier = gfx.fb_bezier\n"
diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua
--- a/stand/lua/drawer.lua
+++ b/stand/lua/drawer.lua
@@ -506,23 +506,53 @@
top_right = "+",
bottom_right = "+",
},
- ["single"] = {
+}
+
+-- The graphical-enabled loaders have unicode drawing character support. The text-only
+-- ones do not. Select the single and double frame styles based on whether or not we
+-- have gfx binding. We have to check these funciton bindings since we create gfx above
+-- for really old loaders and they may or may not support this based on whether these
+-- functions are defined. And we check the old loader.term_drawrect rather than the newer
+-- gfx.term_drawrect so that old releases with graphical support will work (though that's
+-- untested). We rely on liblua creating the compat loader.term_drawrect compat on new
+-- loaders.
+if loader.term_drawrect ~= nil then
+ -- unicode based framing characters
+ drawer.frame_styles["single"] = {
horizontal = "\xE2\x94\x80",
vertical = "\xE2\x94\x82",
top_left = "\xE2\x94\x8C",
bottom_left = "\xE2\x94\x94",
top_right = "\xE2\x94\x90",
bottom_right = "\xE2\x94\x98",
- },
- ["double"] = {
+ }
+ drawer.frame_styles["double"] = {
horizontal = "\xE2\x95\x90",
vertical = "\xE2\x95\x91",
top_left = "\xE2\x95\x94",
bottom_left = "\xE2\x95\x9A",
top_right = "\xE2\x95\x97",
bottom_right = "\xE2\x95\x9D",
- },
-}
+ }
+else
+ -- non-unicode cons25-style framing characters
+ drawer.frame_styles["single"] = {
+ horizontal = "\xC4",
+ vertical = "\xB3",
+ top_left = "\xDA",
+ bottom_left = "\xC0",
+ top_right = "\xBF",
+ bottom_right = "\xD9",
+ }
+ drawer.frame_styles["double"] = {
+ horizontal = "\xCD",
+ vertical = "\xBA",
+ top_left = "\xC9",
+ bottom_left = "\xC8",
+ top_right = "\xBB",
+ bottom_right = "\xBC",
+ }
+end
function drawer.drawscreen(menudef)
-- drawlogo() must go first.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 9:55 PM (18 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14521593
Default Alt Text
D47403.id145890.diff (2 KB)
Attached To
Mode
D47403: loader: Fix boot menu on BIOS
Attached
Detach File
Event Timeline
Log In to Comment