[syslinux:master] Fixed vesa stuff
syslinux-bot for Marcel Ritter
unrzl1 at linux.rrze.uni-erlangen.de
Mon Jul 5 14:27:18 PDT 2010
Commit-ID: 66eed81cb26a36789b41b287d02c637856cf1b88
Gitweb: http://syslinux.zytor.com/commit/66eed81cb26a36789b41b287d02c637856cf1b88
Author: Marcel Ritter <unrzl1 at linux.rrze.uni-erlangen.de>
AuthorDate: Sat, 10 Oct 2009 10:52:17 +0200
Committer: Marcel Ritter <unrzl1 at linux.rrze.uni-erlangen.de>
CommitDate: Sat, 10 Oct 2009 10:52:17 +0200
Fixed vesa stuff
---
com32/lib/sys/vesa/initvesa.c | 2 +-
com32/lua/src/Makefile | 2 +-
com32/lua/src/vesa.c | 21 +++++++++++++++++++++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/com32/lib/sys/vesa/initvesa.c b/com32/lib/sys/vesa/initvesa.c
index 0c2574d..d131d21 100644
--- a/com32/lib/sys/vesa/initvesa.c
+++ b/com32/lib/sys/vesa/initvesa.c
@@ -88,7 +88,7 @@ static int vesacon_paged_mode_ok(const struct vesa_mode_info *mi)
return 0; /* Nope... */
}
-static int vesacon_set_mode(void)
+int vesacon_set_mode(void)
{
com32sys_t rm;
uint8_t *rom_font;
diff --git a/com32/lua/src/Makefile b/com32/lua/src/Makefile
index 3ff05e3..1bd1c65 100644
--- a/com32/lua/src/Makefile
+++ b/com32/lua/src/Makefile
@@ -54,7 +54,7 @@ LIBLUA_OBJS += lauxlib.o lbaselib.o ldblib.o ltablib.o \
LIBLUA_OBJS += liolib.o
LIBLUA_OBJS += dmi.o ../../modules/dmi.o
LIBLUA_OBJS += pci.o
-LIBLUA_OBJS += vesa.o
+LIBLUA_OBJS += vesa.o ../../lib/sys/vesa/initvesa.o
# add function __parse_argv
LIBLUA_OBJS += ../../../com32/lib/sys/argv.o
# add function sleep()
diff --git a/com32/lua/src/vesa.c b/com32/lua/src/vesa.c
index d58dfaa..6f34820 100644
--- a/com32/lua/src/vesa.c
+++ b/com32/lua/src/vesa.c
@@ -4,9 +4,11 @@
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
+#include "../../include/console.h"
#include "../../lib/sys/vesa/vesa.h"
#include "../../lib/sys/vesa/video.h"
+int vesacon_load_background(const char *filename);
static int __constfunc is_power_of_2(unsigned int x)
{
@@ -113,8 +115,27 @@ static int vesa_getmodes(lua_State *L)
}
+static int vesa_setmode(lua_State *L)
+{
+ openconsole(&dev_rawcon_r, &dev_vesaserial_w);
+
+ return 0;
+}
+
+
+static int vesa_load_background(lua_State *L)
+{
+ const char *filename = luaL_checkstring(L, 1);
+
+ vesacon_load_background(filename);
+
+ return 0;
+}
+
static const luaL_reg vesalib[] = {
{"getmodes", vesa_getmodes},
+ {"setmode", vesa_setmode},
+ {"load_background", vesa_load_background},
{NULL, NULL}
};
More information about the Syslinux-commits
mailing list