OSX: minor fixes

master
MoNTE48 2021-12-26 02:15:52 +01:00
parent 168acbd050
commit 4cfc5a506f
5 changed files with 14 additions and 25 deletions

View File

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 55;
objects = {
/* Begin PBXBuildFile section */
@ -152,6 +152,7 @@
8458618024B1C3BC0040BA4F /* textures in Resources */ = {isa = PBXBuildFile; fileRef = 8458617C24B1C3BB0040BA4F /* textures */; };
847C6D4825D6DBE4008F5FC8 /* libintl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 847C6D4625D6DBE4008F5FC8 /* libintl.cpp */; };
847C6D4B25D6F483008F5FC8 /* lutf8lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 847C6D4A25D6F483008F5FC8 /* lutf8lib.c */; };
848CE6E527778E38001D3E0F /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 848CE6E427778E30001D3E0F /* libz.tbd */; };
84A1F9B2252E616B00000717 /* semaphore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A1F9AC252E616B00000717 /* semaphore.cpp */; };
84A1F9B3252E616B00000717 /* thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A1F9AF252E616B00000717 /* thread.cpp */; };
84A1F9BB252E617D00000717 /* scripting_mainmenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A1F9B5252E617D00000717 /* scripting_mainmenu.cpp */; };
@ -623,6 +624,7 @@
847C6D4725D6DBE4008F5FC8 /* MessageCatalog.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = MessageCatalog.hpp; path = ../../deps/libintl/internal/MessageCatalog.hpp; sourceTree = "<group>"; };
847C6D4925D6F483008F5FC8 /* unidata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = unidata.h; path = ../../../../lib/luautf8/unidata.h; sourceTree = "<group>"; };
847C6D4A25D6F483008F5FC8 /* lutf8lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lutf8lib.c; path = ../../../../lib/luautf8/lutf8lib.c; sourceTree = "<group>"; };
848CE6E427778E30001D3E0F /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
84A1F9A6252E616A00000717 /* thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = thread.h; path = ../../../../src/threading/thread.h; sourceTree = "<group>"; };
84A1F9A7252E616A00000717 /* mutex_auto_lock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mutex_auto_lock.h; path = ../../../../src/threading/mutex_auto_lock.h; sourceTree = "<group>"; };
84A1F9A8252E616A00000717 /* event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = event.cpp; path = ../../../../src/threading/event.cpp; sourceTree = "<group>"; };
@ -947,6 +949,7 @@
buildActionMask = 2147483647;
files = (
84585C0724B134900040BA4F /* libcurl.tbd in Frameworks */,
848CE6E527778E38001D3E0F /* libz.tbd in Frameworks */,
84585C0E24B134F80040BA4F /* libiconv.tbd in Frameworks */,
84463B8C24B258AA0099DFBD /* AppKit.framework in Frameworks */,
84463B9124B258AF0099DFBD /* Foundation.framework in Frameworks */,
@ -1157,6 +1160,7 @@
84585BFF24B1347B0040BA4F /* Frameworks */ = {
isa = PBXGroup;
children = (
848CE6E427778E30001D3E0F /* libz.tbd */,
84C8E20A257804A200C1E5D0 /* libopenal.1.dylib */,
8458617724B1BF2D0040BA4F /* AppKit.framework */,
8458617524B1BF280040BA4F /* IOKit.framework */,
@ -1843,7 +1847,7 @@
};
};
buildConfigurationList = 845856A424B1322C0040BA4F /* Build configuration list for PBXProject "MultiCraft" */;
compatibilityVersion = "Xcode 12.0";
compatibilityVersion = "Xcode 13.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
@ -2219,14 +2223,13 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_INCREMENTAL_DISTILL = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_OPTIMIZATION_LEVEL = 1;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"DEBUG=1",
@ -2234,7 +2237,7 @@
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_UNROLL_LOOPS = YES;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
ONLY_ACTIVE_ARCH = YES;
OTHER_CPLUSPLUSFLAGS = (
@ -2256,7 +2259,6 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_INCREMENTAL_DISTILL = YES;
@ -2268,7 +2270,7 @@
GCC_UNROLL_LOOPS = YES;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
@ -2324,7 +2326,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 2.0;
OTHER_LDFLAGS = (
"$(inherited)",
@ -2384,7 +2386,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 2.0;
OTHER_LDFLAGS = (
"$(inherited)",

View File

@ -2,7 +2,7 @@
# This file sets the appropriate compiler and flags for compiling for macOS without XCode
sdk=macosx
osver=10.10
osver=10.11
export OSX_ARCHES="x86_64 arm64"
arches="-arch x86_64 -arch arm64"

View File

@ -203,11 +203,6 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
keyIsDown.unset(key);
keyWasReleased.set(key);
break;
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
case EMIE_MOUSE_WHEEL_X:
mouse_wheel -= event.MouseInput.Wheel;
return true;
#endif
case EMIE_MOUSE_WHEEL:
mouse_wheel += event.MouseInput.Wheel;
break;

View File

@ -491,6 +491,8 @@ void set_default_settings()
// Altered settings for macOS
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
settings->setDefault("screen_w", "0");
settings->setDefault("screen_h", "0");
settings->setDefault("keymap_sneak", "KEY_SHIFT");
settings->setDefault("keymap_camera_mode", "KEY_KEY_C");
settings->setDefault("vsync", "true");

View File

@ -900,19 +900,9 @@ bool GUITable::OnEvent(const SEvent &event)
core::position2d<s32> p(event.MouseInput.X, event.MouseInput.Y);
if (event.MouseInput.Event == EMIE_MOUSE_WHEEL) {
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
// looks awful, works same
float wheel = event.MouseInput.Wheel;
if (wheel > 0.01) wheel = 2;
else if (wheel < -0.01) wheel = -2;
m_scrollbar->setPos(m_scrollbar->getPos() +
(s32) wheel *
- (s32) m_rowheight / 2);
#else
m_scrollbar->setPos(m_scrollbar->getPos() +
(event.MouseInput.Wheel < 0 ? -3 : 3) *
- (s32) m_rowheight / 2);
#endif
return true;
}