Fix regression main_menu_script setting not working any longer 1372/head
authorsapier <Sapier at GMX dot net>
Sat, 14 Jun 2014 09:45:12 +0000 (11:45 +0200)
committersapier <Sapier at GMX dot net>
Sat, 14 Jun 2014 19:20:09 +0000 (21:20 +0200)
builtin/init.lua

index 4f55e80346fdc73f6845edb05c5b5480bcf72173..6fc1bf6d5732ecec60819b0a87b6f01122ba5a79 100644 (file)
@@ -23,7 +23,12 @@ dofile(commonpath.."misc_helpers.lua")
 if INIT == "game" then
        dofile(gamepath.."init.lua")
 elseif INIT == "mainmenu" then
-       dofile(core.get_mainmenu_path()..DIR_DELIM.."init.lua")
+       local mainmenuscript = core.setting_get("main_menu_script")
+       if mainmenuscript ~= nil and mainmenuscript ~= "" then
+               dofile(mainmenuscript)
+       else
+               dofile(core.get_mainmenu_path()..DIR_DELIM.."init.lua")
+       end
 elseif INIT == "async" then
        dofile(asyncpath.."init.lua")
 else