osx: xcode 11 / swift 5
This commit is contained in:
parent
d49373b0f9
commit
76b7970589
|
@ -64,7 +64,10 @@ bool mem_region_set_exec(void *start, size_t len)
|
|||
{
|
||||
size_t inpage = (uintptr_t)start & PAGE_MASK;
|
||||
if (mprotect((u8*)start - inpage, len + inpage, PROT_READ | PROT_WRITE | PROT_EXEC))
|
||||
die("mprotect failed...");
|
||||
{
|
||||
WARN_LOG(VMEM, "mem_region_set_exec: mprotect failed. errno %d", errno);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,35 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
|
@ -21,6 +41,16 @@
|
|||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
|
@ -51,6 +81,16 @@
|
|||
"idiom" : "ipad",
|
||||
"filename" : "Icon-76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
|
|
@ -31,8 +31,8 @@ class EmuGLView: NSOpenGLView, NSWindowDelegate {
|
|||
override func awakeFromNib() {
|
||||
let renderTimer = Timer.scheduledTimer(timeInterval: 0.001, target: self, selector: #selector(EmuGLView.timerTick), userInfo: nil, repeats: true)
|
||||
|
||||
RunLoop.current.add(renderTimer, forMode: RunLoopMode.defaultRunLoopMode)
|
||||
RunLoop.current.add(renderTimer, forMode: RunLoopMode.eventTrackingRunLoopMode)
|
||||
RunLoop.current.add(renderTimer, forMode: .default)
|
||||
RunLoop.current.add(renderTimer, forMode: .eventTracking)
|
||||
|
||||
let attrs:[NSOpenGLPixelFormatAttribute] =
|
||||
[
|
||||
|
@ -42,7 +42,7 @@ class EmuGLView: NSOpenGLView, NSWindowDelegate {
|
|||
// Must specify the 3.2 Core Profile to use OpenGL 3.2
|
||||
UInt32(NSOpenGLPFAOpenGLProfile),
|
||||
UInt32(NSOpenGLProfileVersion3_2Core),
|
||||
UInt32(NSOpenGLPFABackingStore), UInt32(true),
|
||||
UInt32(NSOpenGLPFABackingStore), UInt32(truncating: true),
|
||||
UInt32(0)
|
||||
]
|
||||
|
||||
|
@ -65,7 +65,7 @@ class EmuGLView: NSOpenGLView, NSWindowDelegate {
|
|||
}
|
||||
|
||||
|
||||
func timerTick() {
|
||||
@objc func timerTick() {
|
||||
if (emu_frame_pending())
|
||||
{
|
||||
self.needsDisplay = true
|
||||
|
@ -75,13 +75,13 @@ class EmuGLView: NSOpenGLView, NSWindowDelegate {
|
|||
override func keyDown(with e: NSEvent) {
|
||||
if (!e.isARepeat)
|
||||
{
|
||||
emu_key_input(e.keyCode, true, UInt32(e.modifierFlags.rawValue & NSDeviceIndependentModifierFlagsMask.rawValue))
|
||||
emu_key_input(e.keyCode, true, UInt32(e.modifierFlags.rawValue & NSEvent.ModifierFlags.deviceIndependentFlagsMask.rawValue))
|
||||
}
|
||||
emu_character_input(e.characters)
|
||||
}
|
||||
|
||||
override func keyUp(with e: NSEvent) {
|
||||
emu_key_input(e.keyCode, false, UInt32(e.modifierFlags.rawValue & NSDeviceIndependentModifierFlagsMask.rawValue))
|
||||
emu_key_input(e.keyCode, false, UInt32(e.modifierFlags.rawValue & NSEvent.ModifierFlags.deviceIndependentFlagsMask.rawValue))
|
||||
}
|
||||
|
||||
private func setMousePos(_ event: NSEvent)
|
||||
|
|
|
@ -2583,6 +2583,7 @@
|
|||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
|
@ -3056,6 +3057,7 @@
|
|||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -3108,6 +3110,7 @@
|
|||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -3117,6 +3120,8 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
|
@ -3154,7 +3159,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.flyinghead.Flycast;
|
||||
PRODUCT_NAME = "$(REI_APP_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "emulator-osx/emulator-osx-Bridging-Header.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -3164,6 +3169,8 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
|
||||
"GCC_PREPROCESSOR_DEFINITIONS[arch=i386]" = (
|
||||
TARGET_OSX,
|
||||
|
@ -3196,8 +3203,9 @@
|
|||
);
|
||||
OTHER_LIBTOOLFLAGS = "";
|
||||
PRODUCT_NAME = "$(REI_APP_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "emulator-osx/emulator-osx-Bridging-Header.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -3207,6 +3215,7 @@
|
|||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
"$(inherited)",
|
||||
|
@ -3218,7 +3227,7 @@
|
|||
INFOPLIST_FILE = "emulator-osxTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_NAME = "reicast-osxTests";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reicast-osx.app/Contents/MacOS/reicast-osx";
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -3229,6 +3238,7 @@
|
|||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
"$(inherited)",
|
||||
|
@ -3236,7 +3246,7 @@
|
|||
INFOPLIST_FILE = "emulator-osxTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_NAME = "reicast-osxTests";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reicast-osx.app/Contents/MacOS/reicast-osx";
|
||||
};
|
||||
name = Release;
|
||||
|
@ -3291,6 +3301,7 @@
|
|||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = DebugNaomi;
|
||||
};
|
||||
|
@ -3300,6 +3311,8 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_HARDENED_RUNTIME = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
|
@ -3337,7 +3350,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.flyinghead.Flycast;
|
||||
PRODUCT_NAME = "$(REI_APP_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "emulator-osx/emulator-osx-Bridging-Header.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = DebugNaomi;
|
||||
};
|
||||
|
@ -3347,6 +3360,7 @@
|
|||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
"$(inherited)",
|
||||
|
@ -3358,7 +3372,7 @@
|
|||
INFOPLIST_FILE = "emulator-osxTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_NAME = "reicast-osxTests";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reicast-osx.app/Contents/MacOS/reicast-osx";
|
||||
};
|
||||
name = DebugNaomi;
|
||||
|
@ -3411,6 +3425,7 @@
|
|||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = ReleaseNaomi;
|
||||
};
|
||||
|
@ -3420,6 +3435,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
ENABLE_HARDENED_RUNTIME = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
|
||||
"GCC_PREPROCESSOR_DEFINITIONS[arch=i386]" = (
|
||||
TARGET_OSX,
|
||||
|
@ -3453,7 +3469,7 @@
|
|||
OTHER_LIBTOOLFLAGS = "";
|
||||
PRODUCT_NAME = "$(REI_APP_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "emulator-osx/emulator-osx-Bridging-Header.h";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = ReleaseNaomi;
|
||||
};
|
||||
|
@ -3463,6 +3479,7 @@
|
|||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
||||
"$(inherited)",
|
||||
|
@ -3470,7 +3487,7 @@
|
|||
INFOPLIST_FILE = "emulator-osxTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||
PRODUCT_NAME = "reicast-osxTests";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/reicast-osx.app/Contents/MacOS/reicast-osx";
|
||||
};
|
||||
name = ReleaseNaomi;
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0920"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "84A388B21B1CDD3E000166C0"
|
||||
BuildableName = "Flycast.app"
|
||||
BlueprintName = "reicast-osx"
|
||||
ReferencedContainer = "container:reicast-osx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "DebugNaomi"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "84A388B21B1CDD3E000166C0"
|
||||
BuildableName = "Flycast.app"
|
||||
BlueprintName = "reicast-osx"
|
||||
ReferencedContainer = "container:reicast-osx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "ReleaseNaomi"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "84A388B21B1CDD3E000166C0"
|
||||
BuildableName = "Flycast.app"
|
||||
BlueprintName = "reicast-osx"
|
||||
ReferencedContainer = "container:reicast-osx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "ReleaseNaomi"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "84A388B21B1CDD3E000166C0"
|
||||
BuildableName = "Flycast.app"
|
||||
BlueprintName = "reicast-osx"
|
||||
ReferencedContainer = "container:reicast-osx.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "DebugNaomi">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "ReleaseNaomi"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
Loading…
Reference in New Issue