mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-17 07:49:29 +08:00
fix: hook game setting panel in the same lua_pcall thread
This commit is contained in:
@@ -153,7 +153,7 @@ int (*old_lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc);
|
||||
int my_lua_pcall (lua_State *L, int nargs, int nresults, int errfunc) {
|
||||
auto ret = old_lua_pcall(L, nargs, nresults, errfunc);
|
||||
if (g_is_panel_loaded && !g_is_game_loaded && g_target_L == L) {
|
||||
std::thread(hook_game_setting_panel, L).detach();
|
||||
hook_game_setting_panel(L);
|
||||
g_is_game_loaded = true;
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user