stand: Fix brand positioning on framebuffer console

The drawer.lua script ignores the values in loader_brand_x and
loader_brand_y on framebuffer consoles, always positioning the brand at
(1, 1).

Allow it to be positioned by accepting the x and y values just like the
text version.  For example:

/boot/lua/gfx-nanobsd.lua:

    return {
    	brand = {
    		graphic = {
    			""
    		},
    		requires_color = true,
    		image = "/boot/images/freebsd-logo-rev.png"
    	}
    }

/boot/loader.conf.d/bootloader.conf:

    loader_logo="none"
    loader_brand="nanobsd"
    loader_brand_x="15"

PR:		255202
Reviewed by:	manu, imp
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49092
This commit is contained in:
Jose Luis Duran
2025-02-24 14:36:10 +00:00
parent a18e999454
commit 7d1d7f4230
+1 -1
View File
@@ -327,7 +327,7 @@ local function drawbrand()
if core.isFramebufferConsole() and if core.isFramebufferConsole() and
gfx.term_putimage ~= nil and gfx.term_putimage ~= nil and
branddef.image ~= nil then branddef.image ~= nil then
if gfx.term_putimage(branddef.image, 1, 1, 0, 7, 0) if gfx.term_putimage(branddef.image, x, y, 0, 7, 0)
then then
return true return true
end end