Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZSaberLv0 committed Jul 8, 2024
1 parent 83713ee commit 9f19a54
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
11 changes: 0 additions & 11 deletions ZFLoader/zfres/zf.lua

This file was deleted.

21 changes: 19 additions & 2 deletions ZFLoader/zfsrc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,25 @@ ZFMAIN_ENTRY() {
ZFResExtPathAdd(extResList[i]);
}

ZFLuaExecute(ZFInputForRes("zf.lua"));
ZFLuaGC();
ZFInput src = ZFInputForRes("zf.lua");
if(src) {
zfLogTrim("redirect to %s", src.callbackId());
ZFLuaExecute(src);
ZFLuaGC();
return;
}

zfobj<ZFUIWindow> w;
w->windowShow();
zfobj<ZFUITextView> text;
w->childAdd(text)->c_sizeWrap();
text->textSingleLine(zffalse);
zfstring hint = "put a \"zf.lua\" to one of these paths and run again:\n";
for(zfindex i = 0; i < ZFResExtPathList().count(); ++i) {
hint += "\n";
ZFPathInfoToStringT(hint, ZFResExtPathList()[i]);
}
text->text(hint);
}

ZFMAIN_PARAM_DISPATCH(LuaRunner) {
Expand Down

0 comments on commit 9f19a54

Please sign in to comment.