summaryrefslogtreecommitdiff
path: root/com32/lua/src/vesa.c
diff options
context:
space:
mode:
authorMarcel Ritter <unrzl1@linux.rrze.uni-erlangen.de>2009-10-10 10:52:17 +0200
committerMarcel Ritter <unrzl1@linux.rrze.uni-erlangen.de>2009-10-10 10:52:17 +0200
commit66eed81cb26a36789b41b287d02c637856cf1b88 (patch)
tree5575718efbfede64dc4999bf00f860bf0c406225 /com32/lua/src/vesa.c
parent60688e63d0fe03e12bcf1536500049d4248c104b (diff)
downloadsyslinux-66eed81cb26a36789b41b287d02c637856cf1b88.tar.gz
Fixed vesa stuff
Diffstat (limited to 'com32/lua/src/vesa.c')
-rw-r--r--com32/lua/src/vesa.c21
1 files changed, 21 insertions, 0 deletions
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}
};