From 291616df3f3dad86fdc724dfa470cd67675c5b48 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Mon, 20 Sep 2021 23:50:06 -0400 Subject: [PATCH] Removed extra macros, used PLATFORM. Also removed MACOS, as it's redundant C code that's already encapsulated within PLATFORM. --- data/core/keymap.lua | 2 +- data/core/start.lua | 1 + src/main.c | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/data/core/keymap.lua b/data/core/keymap.lua index 50eadec6..7f7c0fe2 100644 --- a/data/core/keymap.lua +++ b/data/core/keymap.lua @@ -5,7 +5,7 @@ keymap.modkeys = {} keymap.map = {} keymap.reverse_map = {} -local macos = rawget(_G, "MACOS") +local macos = PLATFORM == "Mac OS X" -- Thanks to mathewmariani, taken from his lite-macos github repository. local modkeys_os = require("core.modkeys-" .. (macos and "macos" or "generic")) diff --git a/data/core/start.lua b/data/core/start.lua index 71050057..24b6d978 100644 --- a/data/core/start.lua +++ b/data/core/start.lua @@ -19,3 +19,4 @@ package.path = DATADIR .. '/?.lua;' .. package.path package.path = DATADIR .. '/?/init.lua;' .. package.path package.path = USERDIR .. '/?.lua;' .. package.path package.path = USERDIR .. '/?/init.lua;' .. package.path + diff --git a/src/main.c b/src/main.c index 67d260b2..6275be74 100644 --- a/src/main.c +++ b/src/main.c @@ -140,8 +140,6 @@ init_lua: lua_setglobal(L, "EXEFILE"); #ifdef __APPLE__ - lua_pushboolean(L, true); - lua_setglobal(L, "MACOS"); enable_momentum_scroll(); #ifdef MACOS_USE_BUNDLE set_macos_bundle_resources(L);