diff options
author | Marcel Ritter <unrzl1@linux.rrze.uni-erlangen.de> | 2009-10-10 10:52:17 +0200 |
---|---|---|
committer | Marcel Ritter <unrzl1@linux.rrze.uni-erlangen.de> | 2009-10-10 10:52:17 +0200 |
commit | 66eed81cb26a36789b41b287d02c637856cf1b88 (patch) | |
tree | 5575718efbfede64dc4999bf00f860bf0c406225 | |
parent | 60688e63d0fe03e12bcf1536500049d4248c104b (diff) | |
download | syslinux-66eed81cb26a36789b41b287d02c637856cf1b88.tar.gz syslinux-66eed81cb26a36789b41b287d02c637856cf1b88.tar.xz syslinux-66eed81cb26a36789b41b287d02c637856cf1b88.zip |
Fixed vesa stuff
-rw-r--r-- | com32/lib/sys/vesa/initvesa.c | 2 | ||||
-rw-r--r-- | com32/lua/src/Makefile | 2 | ||||
-rw-r--r-- | 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 0c2574db..d131d214 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 3ff05e38..1bd1c653 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 d58dfaa3..6f34820a 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} }; |