mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
macOS: rename most internal uses of "macosx" to "macos".
--HG-- branch : minor
This commit is contained in:
@@ -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<SDL_Keycode, love::keyboard::Keyboard::Key>::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;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 <string>
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "common/config.h"
|
||||
#include "System.h"
|
||||
|
||||
#if defined(LOVE_MACOSX)
|
||||
#if defined(LOVE_MACOS)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#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,
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#if defined(LOVE_WINDOWS)
|
||||
#include <windows.h>
|
||||
#elif defined(LOVE_MACOSX) || defined(LOVE_IOS)
|
||||
#elif defined(LOVE_MACOS) || defined(LOVE_IOS)
|
||||
#include <mach/mach_time.h>
|
||||
#include <sys/time.h>
|
||||
#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;
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
#if defined(LOVE_WINDOWS)
|
||||
#include <windows.h>
|
||||
#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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user