Fix regression main_menu_script setting not working any longer

This commit is contained in:
sapier 2014-06-14 11:45:12 +02:00 committed by Nils Dagsson Moskopp
parent d8335372ca
commit 5b6f7286a2
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 6 additions and 1 deletions

View 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