Removed the AMIGAOS4 global variable and now I am using the PLATFORM one to determine the running platform
This commit is contained in:
parent
ff535843e8
commit
2c711138d7
|
@ -6,8 +6,10 @@ keymap.map = {}
|
||||||
keymap.reverse_map = {}
|
keymap.reverse_map = {}
|
||||||
|
|
||||||
local macos = rawget(_G, "MACOS_RESOURCES")
|
local macos = rawget(_G, "MACOS_RESOURCES")
|
||||||
local os4 = rawget(_G, "AMIGAOS4")
|
local os4 = false
|
||||||
|
if PLATFORM == "AmigaOS 4" then
|
||||||
|
os4 = true
|
||||||
|
end
|
||||||
-- Thanks to mathewmariani, taken from his lite-macos github repository.
|
-- Thanks to mathewmariani, taken from his lite-macos github repository.
|
||||||
local modkeys_os = require("core.modkeys-" .. (macos and "macos" or os4 and "os4" or "generic"))
|
local modkeys_os = require("core.modkeys-" .. (macos and "macos" or os4 and "os4" or "generic"))
|
||||||
local modkey_map = modkeys_os.map
|
local modkey_map = modkeys_os.map
|
||||||
|
|
|
@ -168,10 +168,6 @@ init_lua:
|
||||||
enable_momentum_scroll();
|
enable_momentum_scroll();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __amigaos4__
|
|
||||||
lua_setglobal(L, "AMIGAOS4");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *init_lite_code = \
|
const char *init_lite_code = \
|
||||||
"local core\n"
|
"local core\n"
|
||||||
"xpcall(function()\n"
|
"xpcall(function()\n"
|
||||||
|
@ -210,11 +206,13 @@ init_lua:
|
||||||
lua_pcall(L, 0, 1, 0);
|
lua_pcall(L, 0, 1, 0);
|
||||||
if (lua_toboolean(L, -1)) {
|
if (lua_toboolean(L, -1)) {
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
|
rencache_invalidate();
|
||||||
goto init_lua;
|
goto init_lua;
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
ren_free_window_resources();
|
ren_free_window_resources();
|
||||||
|
SDL_Quit();
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue