From bc12312f0f9f900142e339a57fe3e84d5ce80152 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 22 Dec 2019 17:54:20 -0400 Subject: [PATCH] macOS: rename most internal uses of "macosx" to "macos". --HG-- branch : minor --- .../xcode/liblove.xcodeproj/project.pbxproj | 18 ++++++++---------- src/common/config.h | 6 +++--- src/common/{macosx.h => macos.h} | 13 +++++-------- src/common/{macosx.mm => macos.mm} | 8 ++++---- src/love.cpp | 14 +++++++------- src/modules/event/sdl/Event.cpp | 6 +++--- src/modules/filesystem/Filesystem.cpp | 8 ++++---- src/modules/filesystem/Filesystem.h | 2 +- src/modules/filesystem/physfs/Filesystem.cpp | 8 ++++---- src/modules/filesystem/wrap_Filesystem.cpp | 2 +- src/modules/graphics/opengl/StreamBuffer.cpp | 2 +- src/modules/love/love.cpp | 2 +- src/modules/system/System.cpp | 6 +++--- src/modules/timer/Timer.cpp | 6 +++--- src/modules/window/sdl/Window.cpp | 8 ++++---- 15 files changed, 52 insertions(+), 57 deletions(-) rename src/common/{macosx.h => macos.h} (92%) rename src/common/{macosx.mm => macos.mm} (97%) diff --git a/platform/xcode/liblove.xcodeproj/project.pbxproj b/platform/xcode/liblove.xcodeproj/project.pbxproj index 2f27ae956..dfb3d04d2 100644 --- a/platform/xcode/liblove.xcodeproj/project.pbxproj +++ b/platform/xcode/liblove.xcodeproj/project.pbxproj @@ -90,9 +90,6 @@ FA0B79321A958E3B000E1D17 /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79081A958E3B000E1D17 /* Object.cpp */; }; FA0B79331A958E3B000E1D17 /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79081A958E3B000E1D17 /* Object.cpp */; }; FA0B79341A958E3B000E1D17 /* Object.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79091A958E3B000E1D17 /* Object.h */; }; - FA0B79351A958E3B000E1D17 /* macosx.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B790A1A958E3B000E1D17 /* macosx.h */; }; - FA0B79361A958E3B000E1D17 /* macosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790B1A958E3B000E1D17 /* macosx.mm */; }; - FA0B79371A958E3B000E1D17 /* macosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790B1A958E3B000E1D17 /* macosx.mm */; }; FA0B79381A958E3B000E1D17 /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790C1A958E3B000E1D17 /* Reference.cpp */; }; FA0B79391A958E3B000E1D17 /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B790C1A958E3B000E1D17 /* Reference.cpp */; }; FA0B793A1A958E3B000E1D17 /* Reference.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B790D1A958E3B000E1D17 /* Reference.h */; }; @@ -1020,6 +1017,8 @@ FAC8E54A23AC8379007B07C8 /* wrap_NativeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */; }; FAC8E54B23AC8379007B07C8 /* wrap_NativeFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */; }; FAC8E54C23AC8379007B07C8 /* wrap_NativeFile.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC8E54923AC8379007B07C8 /* wrap_NativeFile.h */; }; + FAC8E55023B01C0D007B07C8 /* macos.h in Headers */ = {isa = PBXBuildFile; fileRef = FAC8E54E23B01C0C007B07C8 /* macos.h */; }; + FAC8E55123B01C0D007B07C8 /* macos.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAC8E54F23B01C0C007B07C8 /* macos.mm */; }; FACA02EC1F5E396B0084B28F /* CompressedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E01F5E396B0084B28F /* CompressedData.cpp */; }; FACA02ED1F5E396B0084B28F /* CompressedData.h in Headers */ = {isa = PBXBuildFile; fileRef = FACA02E11F5E396B0084B28F /* CompressedData.h */; }; FACA02EE1F5E396B0084B28F /* Compressor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FACA02E21F5E396B0084B28F /* Compressor.cpp */; }; @@ -1301,8 +1300,6 @@ FA0B79071A958E3B000E1D17 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Module.h; sourceTree = ""; }; FA0B79081A958E3B000E1D17 /* Object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Object.cpp; sourceTree = ""; }; FA0B79091A958E3B000E1D17 /* Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Object.h; sourceTree = ""; }; - FA0B790A1A958E3B000E1D17 /* macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macosx.h; sourceTree = ""; }; - FA0B790B1A958E3B000E1D17 /* macosx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = macosx.mm; sourceTree = ""; }; FA0B790C1A958E3B000E1D17 /* Reference.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Reference.cpp; sourceTree = ""; }; FA0B790D1A958E3B000E1D17 /* Reference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reference.h; sourceTree = ""; }; FA0B790E1A958E3B000E1D17 /* runtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = runtime.cpp; sourceTree = ""; }; @@ -1947,6 +1944,8 @@ FAC8E54423AC832A007B07C8 /* NativeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NativeFile.cpp; sourceTree = ""; }; FAC8E54823AC8379007B07C8 /* wrap_NativeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_NativeFile.cpp; sourceTree = ""; }; FAC8E54923AC8379007B07C8 /* wrap_NativeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_NativeFile.h; sourceTree = ""; }; + FAC8E54E23B01C0C007B07C8 /* macos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macos.h; sourceTree = ""; }; + FAC8E54F23B01C0C007B07C8 /* macos.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = macos.mm; sourceTree = ""; }; FACA02E01F5E396B0084B28F /* CompressedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompressedData.cpp; sourceTree = ""; }; FACA02E11F5E396B0084B28F /* CompressedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompressedData.h; sourceTree = ""; }; FACA02E21F5E396B0084B28F /* Compressor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Compressor.cpp; sourceTree = ""; }; @@ -2169,8 +2168,8 @@ FA0B79001A958E3B000E1D17 /* int.h */, FA0B7EF01A959D2C000E1D17 /* ios.h */, FA0B7EF11A959D2C000E1D17 /* ios.mm */, - FA0B790A1A958E3B000E1D17 /* macosx.h */, - FA0B790B1A958E3B000E1D17 /* macosx.mm */, + FAC8E54E23B01C0C007B07C8 /* macos.h */, + FAC8E54F23B01C0C007B07C8 /* macos.mm */, FA0B79011A958E3B000E1D17 /* math.h */, FA0B79021A958E3B000E1D17 /* Matrix.cpp */, FA0B79031A958E3B000E1D17 /* Matrix.h */, @@ -3863,7 +3862,6 @@ FA0B7E2F1A95902C000E1D17 /* RopeJoint.h in Headers */, FA0B7D141A95902C000E1D17 /* Font.h in Headers */, FA0B7E591A95902C000E1D17 /* wrap_Joint.h in Headers */, - FA0B79351A958E3B000E1D17 /* macosx.h in Headers */, FA0B7A631A958EA3000E1D17 /* b2ContactManager.h in Headers */, FA0B7E771A95902C000E1D17 /* wrap_WeldJoint.h in Headers */, FA0B7A911A958EA3000E1D17 /* b2FrictionJoint.h in Headers */, @@ -4084,6 +4082,7 @@ FA0B7A6A1A958EA3000E1D17 /* b2TimeStep.h in Headers */, FA0B7A281A958EA3000E1D17 /* Box2D.h in Headers */, FA0B7DE41A95902C000E1D17 /* wrap_RandomGenerator.h in Headers */, + FAC8E55023B01C0D007B07C8 /* macos.h in Headers */, FA0B7E0B1A95902C000E1D17 /* EdgeShape.h in Headers */, FA0B7EDA1A95902D000E1D17 /* wrap_Timer.h in Headers */, FA0B7EB11A95902C000E1D17 /* System.h in Headers */, @@ -4218,7 +4217,6 @@ FA0B7AAB1A958EA3000E1D17 /* b2WeldJoint.cpp in Sources */, FA0B7EC21A95902C000E1D17 /* threads.cpp in Sources */, FA4F2C051DE936C900CA37D7 /* compat.c in Sources */, - FA0B79371A958E3B000E1D17 /* macosx.mm in Sources */, FA4F2BE81DE6651000CA37D7 /* wrap_Transform.cpp in Sources */, FA0B7D011A95902C000E1D17 /* Filesystem.cpp in Sources */, FAF140651E20934C00F898D2 /* Constant.cpp in Sources */, @@ -4755,6 +4753,7 @@ 217DFBE71D9F6D490055D849 /* inet.c in Sources */, FA0B7D151A95902C000E1D17 /* Font.cpp in Sources */, FA0B7EB51A95902C000E1D17 /* wrap_System.cpp in Sources */, + FAC8E55123B01C0D007B07C8 /* macos.mm in Sources */, FA0B7DAB1A95902C000E1D17 /* STBHandler.cpp in Sources */, FA0B7AB81A958EA3000E1D17 /* enet.cpp in Sources */, FADF53F81E3C7ACD00012CC0 /* Buffer.cpp in Sources */, @@ -4775,7 +4774,6 @@ FA0B79381A958E3B000E1D17 /* Reference.cpp in Sources */, FAC7CD881FE35E95006A60C7 /* physfs_platform_apple.m in Sources */, FA0B7D391A95902C000E1D17 /* Graphics.cpp in Sources */, - FA0B79361A958E3B000E1D17 /* macosx.mm in Sources */, FA0B7E121A95902C000E1D17 /* GearJoint.cpp in Sources */, FAE272521C05A15B00A67640 /* ParticleSystem.cpp in Sources */, FA0B7DC11A95902C000E1D17 /* wrap_Joystick.cpp in Sources */, diff --git a/src/common/config.h b/src/common/config.h index a03152caa..d7bb17daa 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -45,7 +45,7 @@ # if TARGET_OS_IPHONE # define LOVE_IOS 1 # elif TARGET_OS_MAC -# define LOVE_MACOSX 1 +# define LOVE_MACOS 1 # endif #endif #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) @@ -117,7 +117,7 @@ # define NOMINMAX #endif -#if defined(LOVE_MACOSX) || defined(LOVE_IOS) +#if defined(LOVE_MACOS) || defined(LOVE_IOS) # define LOVE_LEGENDARY_APP_ARGV_HACK #endif @@ -164,7 +164,7 @@ #endif // Check we have a sane configuration -#if !defined(LOVE_WINDOWS) && !defined(LOVE_LINUX) && !defined(LOVE_IOS) && !defined(LOVE_MACOSX) && !defined(LOVE_ANDROID) +#if !defined(LOVE_WINDOWS) && !defined(LOVE_LINUX) && !defined(LOVE_IOS) && !defined(LOVE_MACOS) && !defined(LOVE_ANDROID) # error Could not detect target platform #endif #if !defined(LOVE_LITTLE_ENDIAN) && !defined(LOVE_BIG_ENDIAN) diff --git a/src/common/macosx.h b/src/common/macos.h similarity index 92% rename from src/common/macosx.h rename to src/common/macos.h index 5f94a7515..a7591963d 100644 --- a/src/common/macosx.h +++ b/src/common/macos.h @@ -18,18 +18,17 @@ * 3. This notice may not be removed or altered from any source distribution. **/ -#ifndef LOVE_OSX_H -#define LOVE_OSX_H +#pragma once #include "config.h" -#ifdef LOVE_MACOSX +#ifdef LOVE_MACOS #include namespace love { -namespace macosx +namespace macos { std::string getAppdataDirectory(); @@ -57,9 +56,7 @@ std::string getExecutablePath(); **/ void requestAttention(bool continuous); -} // macosx +} // macos } // love -#endif // LOVE_MACOSX - -#endif // LOVE_OSX_H +#endif // LOVE_MACOS diff --git a/src/common/macosx.mm b/src/common/macos.mm similarity index 97% rename from src/common/macosx.mm rename to src/common/macos.mm index d0b41493f..f87a7a6d6 100644 --- a/src/common/macosx.mm +++ b/src/common/macos.mm @@ -18,9 +18,9 @@ * 3. This notice may not be removed or altered from any source distribution. **/ -#include "macosx.h" +#include "macos.h" -#ifdef LOVE_MACOSX +#ifdef LOVE_MACOS #import #import @@ -33,7 +33,7 @@ namespace love { -namespace macosx +namespace macos { static std::string getUserDirectory(NSSearchPathDirectory dir) @@ -116,4 +116,4 @@ void requestAttention(bool continuous) } // osx } // love -#endif // LOVE_MACOSX +#endif // LOVE_MACOS diff --git a/src/love.cpp b/src/love.cpp index 2dc22dfab..ddd86e8e9 100644 --- a/src/love.cpp +++ b/src/love.cpp @@ -36,10 +36,10 @@ extern "C" { #include #endif // LOVE_WINDOWS -#ifdef LOVE_MACOSX -#include "common/macosx.h" +#ifdef LOVE_MACOS +#include "common/macos.h" #include -#endif // LOVE_MACOSX +#endif // LOVE_MACOS #ifdef LOVE_IOS #include "common/ios.h" @@ -75,14 +75,14 @@ static void get_app_arguments(int argc, char **argv, int &new_argc, char **&new_ temp_argv.push_back(std::string(argv[i])); } -#ifdef LOVE_MACOSX +#ifdef LOVE_MACOS // Check for a drop file string, if the app wasn't launched in a terminal. // Checking for the terminal is a pretty big hack, but works around an issue // where OS X will switch Spaces if the terminal launching love is in its // own full-screen Space. std::string dropfilestr; if (!isatty(STDIN_FILENO)) - dropfilestr = love::macosx::checkDropEvents(); + dropfilestr = love::macos::checkDropEvents(); if (!dropfilestr.empty()) temp_argv.insert(temp_argv.begin() + 1, dropfilestr); @@ -92,8 +92,8 @@ static void get_app_arguments(int argc, char **argv, int &new_argc, char **&new_ // If it exists, add the love file in love.app/Contents/Resources/ to argv. std::string loveResourcesPath; bool fused = true; -#if defined(LOVE_MACOSX) - loveResourcesPath = love::macosx::getLoveInResources(); +#if defined(LOVE_MACOS) + loveResourcesPath = love::macos::getLoveInResources(); #elif defined(LOVE_IOS) loveResourcesPath = love::ios::getLoveInResources(fused); #endif diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index 5c4600448..cd9a5d2b4 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -51,7 +51,7 @@ static void windowToDPICoords(double *x, double *y) window->windowToDPICoords(x, y); } -#ifndef LOVE_MACOSX +#ifndef LOVE_MACOS static void normalizedToDPICoords(double *x, double *y) { double w = 1.0, h = 1.0; @@ -184,7 +184,7 @@ Message *Event::convert(const SDL_Event &e) const char *txt2; std::map::const_iterator keyit; -#ifndef LOVE_MACOSX +#ifndef LOVE_MACOS love::touch::sdl::Touch *touchmodule = nullptr; love::touch::Touch::TouchInfo touchinfo; #endif @@ -303,7 +303,7 @@ Message *Event::convert(const SDL_Event &e) // screen events, but most touch devices in OS X aren't touch screens // (and SDL doesn't differentiate.) Non-screen touch devices like Mac // trackpads won't give touch coords in the window's coordinate-space. -#ifndef LOVE_MACOSX +#ifndef LOVE_MACOS touchinfo.id = (int64) e.tfinger.fingerId; touchinfo.x = e.tfinger.x; touchinfo.y = e.tfinger.y; diff --git a/src/modules/filesystem/Filesystem.cpp b/src/modules/filesystem/Filesystem.cpp index 9fab586fb..c62c47d35 100644 --- a/src/modules/filesystem/Filesystem.cpp +++ b/src/modules/filesystem/Filesystem.cpp @@ -26,8 +26,8 @@ #include #include -#if defined(LOVE_MACOSX) -#include "common/macosx.h" +#if defined(LOVE_MACOS) +#include "common/macos.h" #elif defined(LOVE_IOS) #include "common/ios.h" #elif defined(LOVE_WINDOWS) @@ -92,8 +92,8 @@ bool Filesystem::isRealDirectory(const std::string &path) const std::string Filesystem::getExecutablePath() const { -#if defined(LOVE_MACOSX) - return love::macosx::getExecutablePath(); +#if defined(LOVE_MACOS) + return love::macos::getExecutablePath(); #elif defined(LOVE_IOS) return love::ios::getExecutablePath(); #elif defined(LOVE_WINDOWS) diff --git a/src/modules/filesystem/Filesystem.h b/src/modules/filesystem/Filesystem.h index 6e3a12051..610e2d748 100644 --- a/src/modules/filesystem/Filesystem.h +++ b/src/modules/filesystem/Filesystem.h @@ -41,7 +41,7 @@ # define LOVE_PATH_SEPARATOR "/" # define LOVE_MAX_PATH _MAX_PATH #else -# if defined(LOVE_MACOSX) || defined(LOVE_IOS) +# if defined(LOVE_MACOS) || defined(LOVE_IOS) # define LOVE_APPDATA_FOLDER "LOVE" # elif defined(LOVE_LINUX) # define LOVE_APPDATA_FOLDER "love" diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index e2cd671f5..19e0137bd 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -46,8 +46,8 @@ # include "common/ios.h" #endif -#ifdef LOVE_MACOSX -# include "common/macosx.h" +#ifdef LOVE_MACOS +# include "common/macos.h" #endif #include @@ -500,8 +500,8 @@ std::string Filesystem::getAppdataDirectory() wchar_t *w_appdata = _wgetenv(L"APPDATA"); appdata = to_utf8(w_appdata); replace_char(appdata, '\\', '/'); -#elif defined(LOVE_MACOSX) - appdata = normalize(love::macosx::getAppdataDirectory()); +#elif defined(LOVE_MACOS) + appdata = normalize(love::macos::getAppdataDirectory()); #elif defined(LOVE_IOS) appdata = normalize(love::ios::getAppdataDirectory()); #elif defined(LOVE_LINUX) diff --git a/src/modules/filesystem/wrap_Filesystem.cpp b/src/modules/filesystem/wrap_Filesystem.cpp index e2c206291..990bba410 100644 --- a/src/modules/filesystem/wrap_Filesystem.cpp +++ b/src/modules/filesystem/wrap_Filesystem.cpp @@ -747,7 +747,7 @@ static const char *library_extensions[] = { #ifdef LOVE_WINDOWS ".dll" -#elif defined(LOVE_MACOSX) || defined(LOVE_IOS) +#elif defined(LOVE_MACOS) || defined(LOVE_IOS) ".dylib", ".so" #else ".so" diff --git a/src/modules/graphics/opengl/StreamBuffer.cpp b/src/modules/graphics/opengl/StreamBuffer.cpp index 93570e822..a33c2efed 100644 --- a/src/modules/graphics/opengl/StreamBuffer.cpp +++ b/src/modules/graphics/opengl/StreamBuffer.cpp @@ -498,7 +498,7 @@ love::graphics::StreamBuffer *CreateStreamBuffer(BufferType mode, size_t size) // slow on most drivers. On macOS, having a separate driver thread // is opt-in via an API, and we don't do it, so we can use this // instead of the (potentially slower) SubData approach. -#ifdef LOVE_MACOSX +#ifdef LOVE_MACOS return new StreamBufferMapSync(mode, size); #endif } diff --git a/src/modules/love/love.cpp b/src/modules/love/love.cpp index ac895f067..31ae67b7b 100644 --- a/src/modules/love/love.cpp +++ b/src/modules/love/love.cpp @@ -427,7 +427,7 @@ int luaopen_love(lua_State *L) lua_pushstring(L, "UWP"); #elif LOVE_WINDOWS lua_pushstring(L, "Windows"); -#elif defined(LOVE_MACOSX) +#elif defined(LOVE_MACOS) lua_pushstring(L, "OS X"); #elif defined(LOVE_IOS) lua_pushstring(L, "iOS"); diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp index d3175a00f..40e823746 100644 --- a/src/modules/system/System.cpp +++ b/src/modules/system/System.cpp @@ -22,7 +22,7 @@ #include "common/config.h" #include "System.h" -#if defined(LOVE_MACOSX) +#if defined(LOVE_MACOS) #include #elif defined(LOVE_IOS) #include "common/ios.h" @@ -53,7 +53,7 @@ System::System() std::string System::getOS() const { -#if defined(LOVE_MACOSX) +#if defined(LOVE_MACOS) return "OS X"; #elif defined(LOVE_IOS) return "iOS"; @@ -78,7 +78,7 @@ extern "C" bool System::openURL(const std::string &url) const { -#if defined(LOVE_MACOSX) +#if defined(LOVE_MACOS) bool success = false; CFURLRef cfurl = CFURLCreateWithBytes(nullptr, diff --git a/src/modules/timer/Timer.cpp b/src/modules/timer/Timer.cpp index 83a0b0d0c..dcc6a5494 100644 --- a/src/modules/timer/Timer.cpp +++ b/src/modules/timer/Timer.cpp @@ -26,7 +26,7 @@ #if defined(LOVE_WINDOWS) #include -#elif defined(LOVE_MACOSX) || defined(LOVE_IOS) +#elif defined(LOVE_MACOS) || defined(LOVE_IOS) #include #include #elif defined(LOVE_LINUX) @@ -111,7 +111,7 @@ double Timer::getAverageDelta() const double Timer::getTimerPeriod() { -#if defined(LOVE_MACOSX) || defined(LOVE_IOS) +#if defined(LOVE_MACOS) || defined(LOVE_IOS) mach_timebase_info_data_t info; mach_timebase_info(&info); return (double) info.numer / (double) info.denom / 1000000000.0; @@ -147,7 +147,7 @@ double Timer::getTime() #endif mt = getTimeOfDay(); return mt; -#elif defined(LOVE_MACOSX) || defined(LOVE_IOS) +#elif defined(LOVE_MACOS) || defined(LOVE_IOS) return (double) mach_absolute_time() * timerPeriod; #elif defined(LOVE_WINDOWS) LARGE_INTEGER microTime; diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 85ecbb8a5..93042daa4 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -44,8 +44,8 @@ #if defined(LOVE_WINDOWS) #include -#elif defined(LOVE_MACOSX) -#include "common/macosx.h" +#elif defined(LOVE_MACOS) +#include "common/macos.h" #endif #ifndef APIENTRY @@ -1259,9 +1259,9 @@ void Window::requestAttention(bool continuous) FlashWindowEx(&flashinfo); } -#elif defined(LOVE_MACOSX) +#elif defined(LOVE_MACOS) - love::macosx::requestAttention(continuous); + love::macos::requestAttention(continuous); #else