summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luaconsole.c12
-rw-r--r--src/main.c10
2 files changed, 19 insertions, 3 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c
index bac4182..f9ce853 100644
--- a/src/luaconsole.c
+++ b/src/luaconsole.c
@@ -62,6 +62,7 @@ void luacon_open(){
{"setdebug", &luatpt_setdebug},
{"setfpscap",&luatpt_setfpscap},
{"getscript",&luatpt_getscript},
+ {"setwindowsize",&luatpt_setwindowsize},
{NULL,NULL}
};
@@ -1157,4 +1158,15 @@ fin:
if(lastError) return luaL_error(l, lastError);
return 0;
}
+
+int luatpt_setwindowsize(lua_State* l)
+{
+ int result, scale = luaL_optint(l,1,1), kiosk = luaL_optint(l,2,0);
+ if (scale!=2) scale = 1;
+ if (kiosk!=1) kiosk = 0;
+ result = set_scale(scale, kiosk);
+ lua_pushnumber(l, result);
+ return 1;
+}
+
#endif
diff --git a/src/main.c b/src/main.c
index 1ca9b6c..34bc99d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1718,14 +1718,18 @@ int main(int argc, char *argv[])
}
- save_presets(0);
-
make_kernel();
prepare_alpha(CELL, 1.0f);
stamp_init();
- if (!sdl_open()) exit(1);
+ if (!sdl_open())
+ {
+ sdl_scale = 1;
+ kiosk_enable = 0;
+ if (!sdl_open()) exit(1);
+ }
+ save_presets(0);
http_init(http_proxy_string[0] ? http_proxy_string : NULL);
if (cpu_check())