Remove macOS port
We now have a proper native PC port (Moonlight Qt) and if we wanted to bring the full iOS app over we can now use Catalyst.
@@ -6,19 +6,11 @@
|
|||||||
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
|
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||||
|
|
||||||
@property (strong, nonatomic) UIWindow *window;
|
@property (strong, nonatomic) UIWindow *window;
|
||||||
#else
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
|
||||||
|
|
||||||
@property (readonly, strong) NSPersistentContainer *persistentContainer;
|
|
||||||
@property (strong, nonatomic) NSWindow *window;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
|
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
|
||||||
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
|
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
|
||||||
|
|||||||
@@ -18,13 +18,10 @@ static NSOperationQueue* mainQueue;
|
|||||||
|
|
||||||
#if TARGET_OS_TV
|
#if TARGET_OS_TV
|
||||||
static NSString* DB_NAME = @"Moonlight_tvOS.bin";
|
static NSString* DB_NAME = @"Moonlight_tvOS.bin";
|
||||||
#elif TARGET_OS_IPHONE
|
|
||||||
static NSString* DB_NAME = @"Limelight_iOS.sqlite";
|
|
||||||
#else
|
#else
|
||||||
static NSString* DB_NAME = @"moonlight_mac.sqlite";
|
static NSString* DB_NAME = @"Limelight_iOS.sqlite";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -58,17 +55,6 @@ static NSString* DB_NAME = @"moonlight_mac.sqlite";
|
|||||||
// Saves changes in the application's managed object context before the application terminates.
|
// Saves changes in the application's managed object context before the application terminates.
|
||||||
[self saveContext];
|
[self saveContext];
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
|
||||||
// Insert code here to initialize your application
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
|
||||||
// Insert code here to tear down your application
|
|
||||||
[self saveContext];
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- (void)saveContext
|
- (void)saveContext
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,10 +6,6 @@
|
|||||||
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
|
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
// Swift
|
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
#import "Gamepad.h"
|
|
||||||
#endif
|
|
||||||
#import "StreamConfiguration.h"
|
#import "StreamConfiguration.h"
|
||||||
#import "Controller.h"
|
#import "Controller.h"
|
||||||
|
|
||||||
@@ -19,15 +15,9 @@
|
|||||||
|
|
||||||
-(id) initWithConfig:(StreamConfiguration*)streamConfig;
|
-(id) initWithConfig:(StreamConfiguration*)streamConfig;
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
-(void) initAutoOnScreenControlMode:(OnScreenControls*)osc;
|
-(void) initAutoOnScreenControlMode:(OnScreenControls*)osc;
|
||||||
-(void) cleanup;
|
-(void) cleanup;
|
||||||
-(Controller*) getOscController;
|
-(Controller*) getOscController;
|
||||||
#else
|
|
||||||
-(void) assignGamepad:(struct Gamepad_device *)gamepad;
|
|
||||||
-(void) removeGamepad:(struct Gamepad_device *)gamepad;
|
|
||||||
-(NSMutableDictionary*) getControllers;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-(void) updateLeftStick:(Controller*)controller x:(short)x y:(short)y;
|
-(void) updateLeftStick:(Controller*)controller x:(short)x y:(short)y;
|
||||||
-(void) updateRightStick:(Controller*)controller x:(short)x y:(short)y;
|
-(void) updateRightStick:(Controller*)controller x:(short)x y:(short)y;
|
||||||
|
|||||||
@@ -10,10 +10,6 @@
|
|||||||
#import "Controller.h"
|
#import "Controller.h"
|
||||||
|
|
||||||
#import "OnScreenControls.h"
|
#import "OnScreenControls.h"
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
#import "Gamepad.h"
|
|
||||||
#import "Control.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#import "DataManager.h"
|
#import "DataManager.h"
|
||||||
#include "Limelight.h"
|
#include "Limelight.h"
|
||||||
@@ -364,9 +360,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
[_osc setLevel:level];
|
[_osc setLevel:level];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) initAutoOnScreenControlMode:(OnScreenControls*)osc
|
-(void) initAutoOnScreenControlMode:(OnScreenControls*)osc
|
||||||
@@ -402,40 +396,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
-(Controller*) getOscController {
|
-(Controller*) getOscController {
|
||||||
return _player0osc;
|
return _player0osc;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
-(NSMutableDictionary*) getControllers {
|
|
||||||
return _controllers;
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void) assignGamepad:(struct Gamepad_device *)gamepad {
|
|
||||||
for (int i = 0; i < 4; i++) {
|
|
||||||
if (!(_controllerNumbers & (1 << i))) {
|
|
||||||
_controllerNumbers |= (1 << i);
|
|
||||||
gamepad->deviceID = i;
|
|
||||||
NSLog(@"Gamepad device id: %u assigned", gamepad->deviceID);
|
|
||||||
Controller* limeController;
|
|
||||||
limeController = [[Controller alloc] init];
|
|
||||||
limeController.playerIndex = i;
|
|
||||||
|
|
||||||
[_controllers setObject:limeController forKey:[NSNumber numberWithInteger:i]];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void) removeGamepad:(struct Gamepad_device *)gamepad {
|
|
||||||
_controllerNumbers &= ~(1 << gamepad->deviceID);
|
|
||||||
Log(LOG_I, @"Unassigning controller index: %ld", (long)gamepad->deviceID);
|
|
||||||
|
|
||||||
// Inform the server of the updated active gamepads before removing this controller
|
|
||||||
[self updateFinished:[_controllers objectForKey:[NSNumber numberWithInteger:gamepad->deviceID]]];
|
|
||||||
[_controllers removeObjectForKey:[NSNumber numberWithInteger:gamepad->deviceID]];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+(bool) isSupportedGamepad:(GCController*) controller {
|
+(bool) isSupportedGamepad:(GCController*) controller {
|
||||||
return controller.extendedGamepad != nil || controller.gamepad != nil;
|
return controller.extendedGamepad != nil || controller.gamepad != nil;
|
||||||
@@ -472,7 +435,6 @@
|
|||||||
mask = 0x1;
|
mask = 0x1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
DataManager* dataMan = [[DataManager alloc] init];
|
DataManager* dataMan = [[DataManager alloc] init];
|
||||||
OnScreenControlsLevel level = (OnScreenControlsLevel)[[dataMan getSettings].onscreenControls integerValue];
|
OnScreenControlsLevel level = (OnScreenControlsLevel)[[dataMan getSettings].onscreenControls integerValue];
|
||||||
|
|
||||||
@@ -481,7 +443,6 @@
|
|||||||
if (level != OnScreenControlsLevelOff) {
|
if (level != OnScreenControlsLevelOff) {
|
||||||
mask |= 0x1;
|
mask |= 0x1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
@@ -515,14 +476,8 @@
|
|||||||
_player0osc = [[Controller alloc] init];
|
_player0osc = [[Controller alloc] init];
|
||||||
_player0osc.playerIndex = 0;
|
_player0osc.playerIndex = 0;
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
DataManager* dataMan = [[DataManager alloc] init];
|
DataManager* dataMan = [[DataManager alloc] init];
|
||||||
_oscEnabled = (OnScreenControlsLevel)[[dataMan getSettings].onscreenControls integerValue] != OnScreenControlsLevelOff;
|
_oscEnabled = (OnScreenControlsLevel)[[dataMan getSettings].onscreenControls integerValue] != OnScreenControlsLevelOff;
|
||||||
#else
|
|
||||||
_oscEnabled = false;
|
|
||||||
initGamepad(self);
|
|
||||||
Gamepad_detectDevices();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_rumbleTimer = [NSTimer scheduledTimerWithTimeInterval:0.20
|
_rumbleTimer = [NSTimer scheduledTimerWithTimeInterval:0.20
|
||||||
target:self
|
target:self
|
||||||
|
|||||||
@@ -25,12 +25,10 @@ typedef NS_ENUM(NSInteger, OnScreenControlsLevel) {
|
|||||||
OnScreenControlsLevelAutoGCExtendedGamepadWithStickButtons
|
OnScreenControlsLevelAutoGCExtendedGamepadWithStickButtons
|
||||||
};
|
};
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
- (id) initWithView:(UIView*)view controllerSup:(ControllerSupport*)controllerSupport swipeDelegate:(id<EdgeDetectionDelegate>)edgeDelegate;
|
- (id) initWithView:(UIView*)view controllerSup:(ControllerSupport*)controllerSupport swipeDelegate:(id<EdgeDetectionDelegate>)edgeDelegate;
|
||||||
- (BOOL) handleTouchDownEvent:(NSSet*)touches;
|
- (BOOL) handleTouchDownEvent:(NSSet*)touches;
|
||||||
- (BOOL) handleTouchUpEvent:(NSSet*)touches;
|
- (BOOL) handleTouchUpEvent:(NSSet*)touches;
|
||||||
- (BOOL) handleTouchMovedEvent:(NSSet*)touches;
|
- (BOOL) handleTouchMovedEvent:(NSSet*)touches;
|
||||||
- (void) setLevel:(OnScreenControlsLevel)level;
|
- (void) setLevel:(OnScreenControlsLevel)level;
|
||||||
#endif
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -17,12 +17,7 @@
|
|||||||
self.statusCode = -1;
|
self.statusCode = -1;
|
||||||
}
|
}
|
||||||
- (OSImage*) getImage {
|
- (OSImage*) getImage {
|
||||||
#if TARGET_OS_IPHONE
|
return [[OSImage alloc] initWithData:self.data];
|
||||||
OSImage* appImage = [[OSImage alloc] initWithData:self.data];
|
|
||||||
#else
|
|
||||||
OSImage* appImage = nil;
|
|
||||||
#endif
|
|
||||||
return appImage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -24,16 +24,12 @@ static const int MAX_ATTEMPTS = 5;
|
|||||||
AppAssetResponse* appAssetResp = [[AppAssetResponse alloc] init];
|
AppAssetResponse* appAssetResp = [[AppAssetResponse alloc] init];
|
||||||
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:appAssetResp withUrlRequest:[hMan newAppAssetRequestWithAppId:self.app.id]]];
|
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:appAssetResp withUrlRequest:[hMan newAppAssetRequestWithAppId:self.app.id]]];
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
if (appAssetResp.data != nil) {
|
if (appAssetResp.data != nil) {
|
||||||
NSString* boxArtPath = [AppAssetManager boxArtPathForApp:self.app];
|
NSString* boxArtPath = [AppAssetManager boxArtPathForApp:self.app];
|
||||||
[[NSFileManager defaultManager] createDirectoryAtPath:[boxArtPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil];
|
[[NSFileManager defaultManager] createDirectoryAtPath:[boxArtPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil];
|
||||||
[appAssetResp.data writeToFile:boxArtPath atomically:NO];
|
[appAssetResp.data writeToFile:boxArtPath atomically:NO];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (![self isCancelled]) {
|
if (![self isCancelled]) {
|
||||||
[NSThread sleepForTimeInterval:RETRY_DELAY];
|
[NSThread sleepForTimeInterval:RETRY_DELAY];
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ int ArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, v
|
|||||||
opusConfig->mapping,
|
opusConfig->mapping,
|
||||||
&err);
|
&err);
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
// Configure the audio session for our app
|
// Configure the audio session for our app
|
||||||
NSError *audioSessionError = nil;
|
NSError *audioSessionError = nil;
|
||||||
AVAudioSession* audioSession = [AVAudioSession sharedInstance];
|
AVAudioSession* audioSession = [AVAudioSession sharedInstance];
|
||||||
@@ -122,7 +121,6 @@ int ArInit(int audioConfiguration, POPUS_MULTISTREAM_CONFIGURATION opusConfig, v
|
|||||||
|
|
||||||
// FIXME: Calling this breaks surround audio for some reason
|
// FIXME: Calling this breaks surround audio for some reason
|
||||||
//[audioSession setPreferredOutputNumberOfChannels:opusConfig->channelCount error:&audioSessionError];
|
//[audioSession setPreferredOutputNumberOfChannels:opusConfig->channelCount error:&audioSessionError];
|
||||||
#endif
|
|
||||||
|
|
||||||
OSStatus status;
|
OSStatus status;
|
||||||
|
|
||||||
@@ -203,10 +201,8 @@ void ArCleanup(void)
|
|||||||
audioCircularBuffer = NULL;
|
audioCircularBuffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
// Audio session is now inactive
|
// Audio session is now inactive
|
||||||
[[AVAudioSession sharedInstance] setActive: NO error: nil];
|
[[AVAudioSession sharedInstance] setActive: NO error: nil];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArDecodeAndPlaySample(char* sampleData, int sampleLength)
|
void ArDecodeAndPlaySample(char* sampleData, int sampleLength)
|
||||||
@@ -358,7 +354,6 @@ void ClConnectionStatusUpdate(int status)
|
|||||||
config.allowHevc = YES;
|
config.allowHevc = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
// On iOS 11, we can use HEVC if the server supports encoding it
|
// On iOS 11, we can use HEVC if the server supports encoding it
|
||||||
// and this device has hardware decode for it (A9 and later).
|
// and this device has hardware decode for it (A9 and later).
|
||||||
// Additionally, iPhone X had a bug which would cause video
|
// Additionally, iPhone X had a bug which would cause video
|
||||||
@@ -367,13 +362,6 @@ void ClConnectionStatusUpdate(int status)
|
|||||||
if (@available(iOS 11.3, tvOS 11.3, *)) {
|
if (@available(iOS 11.3, tvOS 11.3, *)) {
|
||||||
_streamConfig.supportsHevc = config.allowHevc && VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
|
_streamConfig.supportsHevc = config.allowHevc && VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (@available(macOS 10.13, *)) {
|
|
||||||
// Streaming with limited bandwidth will result in better quality with HEVC
|
|
||||||
if (VTIsHardwareDecodeSupported(kCMVideoCodecType_HEVC) || _streamConfig.streamingRemotely != 0)
|
|
||||||
_streamConfig.supportsHevc = config.allowHevc;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// HEVC must be supported when HDR is enabled
|
// HEVC must be supported when HDR is enabled
|
||||||
assert(!_streamConfig.enableHdr || _streamConfig.supportsHevc);
|
assert(!_streamConfig.enableHdr || _streamConfig.supportsHevc);
|
||||||
|
|||||||
@@ -78,14 +78,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
// Set mouse delta factors from the screen resolution and stream size
|
// Set mouse delta factors from the screen resolution and stream size
|
||||||
CGFloat screenScale = [[UIScreen mainScreen] scale];
|
CGFloat screenScale = [[UIScreen mainScreen] scale];
|
||||||
CGRect screenBounds = [[UIScreen mainScreen] bounds];
|
CGRect screenBounds = [[UIScreen mainScreen] bounds];
|
||||||
CGSize screenSize = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale);
|
CGSize screenSize = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale);
|
||||||
[((StreamView*)_renderView) setMouseDeltaFactors:_config.width / screenSize.width
|
[((StreamView*)_renderView) setMouseDeltaFactors:_config.width / screenSize.width
|
||||||
y:_config.height / screenSize.height];
|
y:_config.height / screenSize.height];
|
||||||
#endif
|
|
||||||
|
|
||||||
// Populate the config's version fields from serverinfo
|
// Populate the config's version fields from serverinfo
|
||||||
_config.appVersion = appversion;
|
_config.appVersion = appversion;
|
||||||
|
|||||||
@@ -75,9 +75,6 @@
|
|||||||
- (void)setupWithVideoFormat:(int)videoFormat refreshRate:(int)refreshRate
|
- (void)setupWithVideoFormat:(int)videoFormat refreshRate:(int)refreshRate
|
||||||
{
|
{
|
||||||
self->videoFormat = videoFormat;
|
self->videoFormat = videoFormat;
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
_view.codec = videoFormat;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (refreshRate > 60) {
|
if (refreshRate > 60) {
|
||||||
// HACK: We seem to just get 60 Hz screen updates even with a 120 FPS stream if
|
// HACK: We seem to just get 60 Hz screen updates even with a 120 FPS stream if
|
||||||
@@ -255,11 +252,7 @@
|
|||||||
|
|
||||||
Log(LOG_I, @"Constructing new HEVC format description");
|
Log(LOG_I, @"Constructing new HEVC format description");
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
|
||||||
if (@available(iOS 11.0, *)) {
|
if (@available(iOS 11.0, *)) {
|
||||||
#else
|
|
||||||
if (@available(macOS 10.13, *)) {
|
|
||||||
#endif
|
|
||||||
status = CMVideoFormatDescriptionCreateFromHEVCParameterSets(kCFAllocatorDefault,
|
status = CMVideoFormatDescriptionCreateFromHEVCParameterSets(kCFAllocatorDefault,
|
||||||
3, /* count of parameter sets */
|
3, /* count of parameter sets */
|
||||||
parameterSetPointers,
|
parameterSetPointers,
|
||||||
@@ -370,10 +363,6 @@
|
|||||||
CFDictionarySetValue(dict, kCMSampleAttachmentKey_DependsOnOthers, kCFBooleanFalse);
|
CFDictionarySetValue(dict, kCMSampleAttachmentKey_DependsOnOthers, kCFBooleanFalse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
_view.frameCount++;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Enqueue video samples on the main thread
|
// Enqueue video samples on the main thread
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
// Enqueue the next frame
|
// Enqueue the next frame
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "self:Moonlight macOS.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>IDEDidComputeMac32BitWarning</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -1,68 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"size" : "16x16",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "16x icon.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "16x16",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "32x icon-1.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "32x32",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "32x icon.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "32x32",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "64x icon.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "128x128",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "128x icon.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "128x128",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "256x icon-1.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "256x256",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "256x icon.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "256x256",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "512x icon-1.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "512x512",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "512x icon.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "512x512",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "1024x icon-1.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>$(PRODUCT_NAME)</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
<key>LSApplicationCategoryType</key>
|
|
||||||
<string>public.app-category.entertainment</string>
|
|
||||||
<key>LSMinimumSystemVersion</key>
|
|
||||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
|
||||||
<key>NSAppTransportSecurity</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
<key>NSHighResolutionCapable</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>Copyright © 2018 Moonlight Game Streaming Project. All rights reserved.</string>
|
|
||||||
<key>NSMainStoryboardFile</key>
|
|
||||||
<string>Mac</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
//
|
|
||||||
// Control.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 15.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef Control_h
|
|
||||||
#define Control_h
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#import "ControllerSupport.h"
|
|
||||||
|
|
||||||
extern void initGamepad(ControllerSupport* controllerSupport);
|
|
||||||
|
|
||||||
#endif /* Control_h */
|
|
||||||
@@ -1,223 +0,0 @@
|
|||||||
//
|
|
||||||
// Control.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 15.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
#include "Gamepad.h"
|
|
||||||
#include "Control.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include "Limelight.h"
|
|
||||||
|
|
||||||
#import "Moonlight-Swift.h"
|
|
||||||
@class Controller;
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define snprintf _snprintf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Controller* _controller;
|
|
||||||
ControllerSupport* _controllerSupport;
|
|
||||||
NSMutableDictionary* _controllers;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
SELECT,
|
|
||||||
L3,
|
|
||||||
R3,
|
|
||||||
START,
|
|
||||||
UP,
|
|
||||||
RIGHT,
|
|
||||||
DOWN,
|
|
||||||
LEFT,
|
|
||||||
LB = 10,
|
|
||||||
RB,
|
|
||||||
Y,
|
|
||||||
B,
|
|
||||||
A,
|
|
||||||
X,
|
|
||||||
} ControllerKeys;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
LEFT_X,
|
|
||||||
LEFT_Y,
|
|
||||||
RIGHT_X,
|
|
||||||
RIGHT_Y,
|
|
||||||
LT = 14,
|
|
||||||
RT,
|
|
||||||
} ControllerAxis;
|
|
||||||
|
|
||||||
|
|
||||||
void onButtonDown(struct Gamepad_device * device, unsigned int buttonID, double timestamp, void * context) {
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
switch (buttonID) {
|
|
||||||
case SELECT:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:BACK_FLAG];
|
|
||||||
break;
|
|
||||||
case L3:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:LS_CLK_FLAG];
|
|
||||||
break;
|
|
||||||
case R3:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:RS_CLK_FLAG];
|
|
||||||
break;
|
|
||||||
case START:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:PLAY_FLAG];
|
|
||||||
break;
|
|
||||||
case UP:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:UP_FLAG];
|
|
||||||
break;
|
|
||||||
case RIGHT:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:RIGHT_FLAG];
|
|
||||||
break;
|
|
||||||
case DOWN:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:DOWN_FLAG];
|
|
||||||
break;
|
|
||||||
case LEFT:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:LEFT_FLAG];
|
|
||||||
break;
|
|
||||||
case LB:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:LB_FLAG];
|
|
||||||
break;
|
|
||||||
case RB:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:RB_FLAG];
|
|
||||||
break;
|
|
||||||
case Y:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:Y_FLAG];
|
|
||||||
break;
|
|
||||||
case B:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:B_FLAG];
|
|
||||||
break;
|
|
||||||
case A:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:A_FLAG];
|
|
||||||
break;
|
|
||||||
case X:
|
|
||||||
[_controllerSupport setButtonFlag:_controller flags:X_FLAG];
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
}
|
|
||||||
|
|
||||||
void onButtonUp(struct Gamepad_device * device, unsigned int buttonID, double timestamp, void * context) {
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
switch (buttonID) {
|
|
||||||
case SELECT:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:BACK_FLAG];
|
|
||||||
break;
|
|
||||||
case L3:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:LS_CLK_FLAG];
|
|
||||||
break;
|
|
||||||
case R3:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:RS_CLK_FLAG];
|
|
||||||
break;
|
|
||||||
case START:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:PLAY_FLAG];
|
|
||||||
break;
|
|
||||||
case UP:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:UP_FLAG];
|
|
||||||
break;
|
|
||||||
case RIGHT:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:RIGHT_FLAG];
|
|
||||||
break;
|
|
||||||
case DOWN:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:DOWN_FLAG];
|
|
||||||
break;
|
|
||||||
case LEFT:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:LEFT_FLAG];
|
|
||||||
break;
|
|
||||||
case LB:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:LB_FLAG];
|
|
||||||
break;
|
|
||||||
case RB:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:RB_FLAG];
|
|
||||||
break;
|
|
||||||
case Y:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:Y_FLAG];
|
|
||||||
break;
|
|
||||||
case B:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:B_FLAG];
|
|
||||||
break;
|
|
||||||
case A:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:A_FLAG];
|
|
||||||
break;
|
|
||||||
case X:
|
|
||||||
[_controllerSupport clearButtonFlag:_controller flags:X_FLAG];
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
}
|
|
||||||
|
|
||||||
void onAxisMoved(struct Gamepad_device * device, unsigned int axisID, float value, float lastValue, double timestamp, void * context) {
|
|
||||||
if (fabsf(lastValue - value) > 0.01) {
|
|
||||||
// The dualshock controller has much more than these axis because of the motion axis, so it
|
|
||||||
// is better to call the updateFinished in the cases, because otherwise all of these
|
|
||||||
// motion axis will also trigger an updateFinished event.
|
|
||||||
switch (axisID) {
|
|
||||||
case LEFT_X:
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
_controller.lastLeftStickX = value * 0X7FFE;
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
break;
|
|
||||||
case LEFT_Y:
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
_controller.lastLeftStickY = -value * 0X7FFE;
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
break;
|
|
||||||
case RIGHT_X:
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
_controller.lastRightStickX = value * 0X7FFE;
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
break;
|
|
||||||
case RIGHT_Y:
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
_controller.lastRightStickY = -value * 0X7FFE;
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
break;
|
|
||||||
case LT:
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
_controller.lastLeftTrigger = value * 0xFF;
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
break;
|
|
||||||
case RT:
|
|
||||||
_controller = [_controllers objectForKey:[NSNumber numberWithInteger:device->deviceID]];
|
|
||||||
_controller.lastRightTrigger = value * 0xFF;
|
|
||||||
[_controllerSupport updateFinished:_controller];
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void onDeviceAttached(struct Gamepad_device * device, void * context) {
|
|
||||||
[_controllerSupport assignGamepad:device];
|
|
||||||
_controllers = [_controllerSupport getControllers];
|
|
||||||
}
|
|
||||||
|
|
||||||
void onDeviceRemoved(struct Gamepad_device * device, void * context) {
|
|
||||||
[_controllerSupport removeGamepad:device];
|
|
||||||
_controllers = [_controllerSupport getControllers];
|
|
||||||
}
|
|
||||||
|
|
||||||
void initGamepad(ControllerSupport* controllerSupport) {
|
|
||||||
_controllerSupport = controllerSupport;
|
|
||||||
_controller = [[Controller alloc] init];
|
|
||||||
Gamepad_deviceAttachFunc(onDeviceAttached, NULL);
|
|
||||||
Gamepad_deviceRemoveFunc(onDeviceRemoved, NULL);
|
|
||||||
Gamepad_buttonDownFunc(onButtonDown, NULL);
|
|
||||||
Gamepad_buttonUpFunc(onButtonUp, NULL);
|
|
||||||
Gamepad_axisMoveFunc(onAxisMoved, NULL);
|
|
||||||
Gamepad_init();
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
//
|
|
||||||
// Use this file to import your target's public headers that you would like to expose to Swift.
|
|
||||||
//
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
//
|
|
||||||
// OverlayView.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 01.04.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
@interface OverlayView : NSView
|
|
||||||
|
|
||||||
- (id)initWithFrame:(NSRect)frame sender:(StreamView*)sender;
|
|
||||||
- (void)toggleOverlay:(int)codec;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
//
|
|
||||||
// OverlayView.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 01.04.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "StreamView.h"
|
|
||||||
#import "OverlayView.h"
|
|
||||||
#import "NetworkTraffic.h"
|
|
||||||
|
|
||||||
@implementation OverlayView {
|
|
||||||
StreamView* _streamView;
|
|
||||||
bool statsDisplayed;
|
|
||||||
unsigned long lastNetworkDown;
|
|
||||||
unsigned long lastNetworkUp;
|
|
||||||
NSTextField* _textFieldIncomingBitrate;
|
|
||||||
NSTextField* _textFieldOutgoingBitrate;
|
|
||||||
NSTextField* _textFieldCodec;
|
|
||||||
NSTextField* _textFieldFramerate;
|
|
||||||
NSTextField* _stageLabel;
|
|
||||||
|
|
||||||
NSTimer* _statTimer;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id)initWithFrame:(NSRect)frame sender:(StreamView*)sender
|
|
||||||
{
|
|
||||||
self = [super initWithFrame:frame];
|
|
||||||
if (self) {
|
|
||||||
_streamView = sender;
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)initStats {
|
|
||||||
_textFieldCodec = [[NSTextField alloc] initWithFrame:NSMakeRect(5, NSScreen.mainScreen.frame.size.height - 22, 200, 17)];
|
|
||||||
_textFieldIncomingBitrate = [[NSTextField alloc] initWithFrame:NSMakeRect(5, 5, 250, 17)];
|
|
||||||
_textFieldOutgoingBitrate = [[NSTextField alloc] initWithFrame:NSMakeRect(5, 5 + 20, 250, 17)];
|
|
||||||
_textFieldFramerate = [[NSTextField alloc] initWithFrame:NSMakeRect(NSScreen.mainScreen.frame.size.width - 50, NSScreen.mainScreen.frame.size.height - 22, 50, 17)];
|
|
||||||
|
|
||||||
[self setupTextField:_textFieldOutgoingBitrate];
|
|
||||||
[self setupTextField:_textFieldIncomingBitrate];
|
|
||||||
[self setupTextField:_textFieldCodec];
|
|
||||||
[self setupTextField:_textFieldFramerate];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setupTextField:(NSTextField*)textField {
|
|
||||||
textField.drawsBackground = false;
|
|
||||||
textField.bordered = false;
|
|
||||||
textField.editable = false;
|
|
||||||
textField.alignment = NSTextAlignmentLeft;
|
|
||||||
textField.textColor = [NSColor whiteColor];
|
|
||||||
[self addSubview:textField];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)toggleOverlay:(int)codec {
|
|
||||||
statsDisplayed = !statsDisplayed;
|
|
||||||
if (statsDisplayed) {
|
|
||||||
_streamView.frameCount = 0;
|
|
||||||
if (_textFieldIncomingBitrate == nil || _textFieldCodec == nil || _textFieldOutgoingBitrate == nil || _textFieldFramerate == nil) {
|
|
||||||
[self initStats];
|
|
||||||
}
|
|
||||||
_statTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(statTimerTick) userInfo:nil repeats:true];
|
|
||||||
NSLog(@"display stats");
|
|
||||||
if (codec == 1) {
|
|
||||||
_textFieldCodec.stringValue = @"Codec: H.264";
|
|
||||||
}
|
|
||||||
else if (codec == 256) {
|
|
||||||
_textFieldCodec.stringValue = @"Codec: HEVC/H.265";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
_textFieldCodec.stringValue = @"Codec: Unknown";
|
|
||||||
}
|
|
||||||
[self statTimerTick];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[_statTimer invalidate];
|
|
||||||
_textFieldCodec.stringValue = @"";
|
|
||||||
_textFieldIncomingBitrate.stringValue = @"";
|
|
||||||
_textFieldOutgoingBitrate.stringValue = @"";
|
|
||||||
_textFieldFramerate.stringValue = @"";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)statTimerTick {
|
|
||||||
_textFieldFramerate.stringValue = [NSString stringWithFormat:@"%i fps", _streamView.frameCount];
|
|
||||||
_streamView.frameCount = 0;
|
|
||||||
|
|
||||||
unsigned long currentNetworkDown = getBytesDown();
|
|
||||||
_textFieldIncomingBitrate.stringValue = [NSString stringWithFormat:@"Incoming Bitrate (System): %lu kbps", (currentNetworkDown - lastNetworkDown)*8 / 1000];
|
|
||||||
lastNetworkDown = currentNetworkDown;
|
|
||||||
|
|
||||||
unsigned long currentNetworkUp = getBytesUp();
|
|
||||||
_textFieldOutgoingBitrate.stringValue = [NSString stringWithFormat:@"Outgoing Bitrate (System): %lu kbps", (currentNetworkUp - lastNetworkUp)*8 / 1000];
|
|
||||||
lastNetworkUp = currentNetworkUp;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
//
|
|
||||||
// StreamView.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 10.03.18.
|
|
||||||
// Copyright (c) 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
@interface StreamView : NSView
|
|
||||||
|
|
||||||
- (void)drawMessage:(NSString*)message;
|
|
||||||
|
|
||||||
@property int codec;
|
|
||||||
@property unsigned short frameCount;
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
//
|
|
||||||
// StreamView.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 10.3.18.
|
|
||||||
// Copyright (c) 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "StreamView.h"
|
|
||||||
#include <Limelight.h>
|
|
||||||
#import "DataManager.h"
|
|
||||||
#include <ApplicationServices/ApplicationServices.h>
|
|
||||||
#include "keyboardTranslation.h"
|
|
||||||
#import "OverlayView.h"
|
|
||||||
|
|
||||||
@implementation StreamView {
|
|
||||||
bool isDragging;
|
|
||||||
NSTrackingArea* _trackingArea;
|
|
||||||
OverlayView* _overlay;
|
|
||||||
NSTextField* _stageLabel;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) updateTrackingAreas {
|
|
||||||
if (_trackingArea != nil) {
|
|
||||||
[self removeTrackingArea:_trackingArea];
|
|
||||||
}
|
|
||||||
NSTrackingAreaOptions options = (NSTrackingActiveAlways | NSTrackingInVisibleRect |
|
|
||||||
NSTrackingMouseEnteredAndExited | NSTrackingMouseMoved);
|
|
||||||
|
|
||||||
_trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]
|
|
||||||
options:options
|
|
||||||
owner:self
|
|
||||||
userInfo:nil];
|
|
||||||
[self addTrackingArea:_trackingArea];
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)mouseDragged:(NSEvent *)event {
|
|
||||||
if (isDragging) {
|
|
||||||
[self mouseMoved:event];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[self mouseDown:event];
|
|
||||||
isDragging = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)rightMouseDragged:(NSEvent *)event {
|
|
||||||
if (isDragging) {
|
|
||||||
[self mouseMoved:event];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[self rightMouseDown:event];
|
|
||||||
isDragging = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)scrollWheel:(NSEvent *)event {
|
|
||||||
LiSendScrollEvent(event.scrollingDeltaY);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)mouseDown:(NSEvent *)mouseEvent {
|
|
||||||
LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_LEFT);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)mouseUp:(NSEvent *)mouseEvent {
|
|
||||||
isDragging = false;
|
|
||||||
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)rightMouseUp:(NSEvent *)mouseEvent {
|
|
||||||
isDragging = false;
|
|
||||||
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_RIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)rightMouseDown:(NSEvent *)mouseEvent {
|
|
||||||
LiSendMouseButtonEvent(BUTTON_ACTION_PRESS, BUTTON_RIGHT);
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)mouseMoved:(NSEvent *)mouseEvent {
|
|
||||||
LiSendMouseMoveEvent(mouseEvent.deltaX, mouseEvent.deltaY);
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)keyDown:(NSEvent *)event {
|
|
||||||
unsigned char keyChar = keyCharFromKeyCode(event.keyCode);
|
|
||||||
NSLog(@"DOWN: KeyCode: %hu, keyChar: %d, keyModifier: %lu \n", event.keyCode, keyChar, event.modifierFlags);
|
|
||||||
|
|
||||||
LiSendKeyboardEvent(keyChar, KEY_ACTION_DOWN, modifierFlagForKeyModifier(event.modifierFlags));
|
|
||||||
if (event.modifierFlags & kCGEventFlagMaskCommand && event.keyCode == kVK_ANSI_I) {
|
|
||||||
[self toggleStats];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)keyUp:(NSEvent *)event {
|
|
||||||
unsigned char keyChar = keyCharFromKeyCode(event.keyCode);
|
|
||||||
NSLog(@"UP: KeyChar: %d \n‚", keyChar);
|
|
||||||
LiSendKeyboardEvent(keyChar, KEY_ACTION_UP, modifierFlagForKeyModifier(event.modifierFlags));
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)flagsChanged:(NSEvent *)event {
|
|
||||||
unsigned char keyChar = keyCodeFromModifierKey(event.modifierFlags);
|
|
||||||
if(keyChar) {
|
|
||||||
NSLog(@"DOWN: FlagChanged: %hhu \n", keyChar);
|
|
||||||
LiSendKeyboardEvent(keyChar, KEY_ACTION_DOWN, 0x00);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LiSendKeyboardEvent(58, KEY_ACTION_UP, 0x00);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)initStageLabel {
|
|
||||||
_stageLabel = [[NSTextField alloc] initWithFrame:NSMakeRect(NSScreen.mainScreen.frame.size.width/2 - 100, NSScreen.mainScreen.frame.size.height/2 - 8, 200, 17)];
|
|
||||||
_stageLabel.drawsBackground = false;
|
|
||||||
_stageLabel.bordered = false;
|
|
||||||
_stageLabel.alignment = NSTextAlignmentCenter;
|
|
||||||
_stageLabel.textColor = [NSColor blackColor];
|
|
||||||
|
|
||||||
[self addSubview:_stageLabel];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)toggleStats {
|
|
||||||
if (_overlay == nil) {
|
|
||||||
_overlay = [[OverlayView alloc] initWithFrame:self.frame sender:self];
|
|
||||||
[self addSubview:_overlay];
|
|
||||||
}
|
|
||||||
[_overlay toggleOverlay:_codec];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)drawMessage:(NSString*)message {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
if (self->_stageLabel == nil) {
|
|
||||||
[self initStageLabel];
|
|
||||||
}
|
|
||||||
self->_stageLabel.stringValue = message;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)acceptsFirstResponder {
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>com.apple.security.app-sandbox</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.device.bluetooth</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.device.usb</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.files.user-selected.read-only</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.network.client</key>
|
|
||||||
<true/>
|
|
||||||
<key>com.apple.security.network.server</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
//
|
|
||||||
// NetworkTraffic.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 28.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef NetworkTraffic_h
|
|
||||||
#define NetworkTraffic_h
|
|
||||||
|
|
||||||
unsigned long getBytesDown(void);
|
|
||||||
unsigned long getBytesUp(void);
|
|
||||||
|
|
||||||
#endif /* NetworkTraffic_h */
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
//
|
|
||||||
// NetworkTraffic.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 28.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "NetworkTraffic.h"
|
|
||||||
#include <ifaddrs.h>
|
|
||||||
#include <net/if.h>
|
|
||||||
|
|
||||||
struct ifaddrs *ifap, *ifa;
|
|
||||||
unsigned long da;
|
|
||||||
|
|
||||||
unsigned long getBytesDown() {
|
|
||||||
da = 0;
|
|
||||||
getifaddrs (&ifap);
|
|
||||||
ifa = ifap;
|
|
||||||
while (ifa != NULL) {
|
|
||||||
if (ifa->ifa_addr->sa_family == AF_LINK) {
|
|
||||||
const struct if_data *ifa_data = (struct if_data *)ifa->ifa_data;
|
|
||||||
if (ifa_data != NULL) {
|
|
||||||
da += ifa_data->ifi_ibytes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ifa = ifa->ifa_next;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeifaddrs(ifap);
|
|
||||||
return da;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long getBytesUp() {
|
|
||||||
da = 0;
|
|
||||||
getifaddrs (&ifap);
|
|
||||||
ifa = ifap;
|
|
||||||
while (ifa != NULL) {
|
|
||||||
if (ifa->ifa_addr->sa_family == AF_LINK) {
|
|
||||||
const struct if_data *ifa_data = (struct if_data *)ifa->ifa_data;
|
|
||||||
if (ifa_data != NULL) {
|
|
||||||
da += ifa_data->ifi_obytes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ifa = ifa->ifa_next;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeifaddrs(ifap);
|
|
||||||
return da;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
//
|
|
||||||
// keepAlive.h
|
|
||||||
// LittleHelper
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 31.10.17.
|
|
||||||
// Copyright © 2017 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
#ifndef keepAlive_h
|
|
||||||
#define keepAlive_h
|
|
||||||
|
|
||||||
@interface keepAlive : NSObject
|
|
||||||
|
|
||||||
+(void) keepSystemAlive;
|
|
||||||
+(void) allowSleep;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
#endif /* keepAlive_h */
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
//
|
|
||||||
// keepAlive.m
|
|
||||||
// LittleHelper
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 31.10.17.
|
|
||||||
// Copyright © 2017 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <IOKit/pwr_mgt/IOPMLib.h>
|
|
||||||
#import "keepAlive.h"
|
|
||||||
|
|
||||||
|
|
||||||
@implementation keepAlive
|
|
||||||
|
|
||||||
CFStringRef reasonForActivity= CFSTR("Moonlight keeps the system awake");
|
|
||||||
IOPMAssertionID assertionID;
|
|
||||||
|
|
||||||
+(void) keepSystemAlive
|
|
||||||
{
|
|
||||||
|
|
||||||
IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep,
|
|
||||||
kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
|
|
||||||
}
|
|
||||||
|
|
||||||
+(void) allowSleep
|
|
||||||
{
|
|
||||||
IOPMAssertionRelease(assertionID);
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
//
|
|
||||||
// keyboardTranslation.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 10.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
|
||||||
#include <Carbon/Carbon.h>
|
|
||||||
|
|
||||||
#ifndef keyboardTranslation_h
|
|
||||||
#define keyboardTranslation_h
|
|
||||||
|
|
||||||
CGKeyCode keyCharFromKeyCode(CGKeyCode keyCode);
|
|
||||||
CGKeyCode keyCodeFromModifierKey(NSEventModifierFlags keyModifier);
|
|
||||||
char modifierFlagForKeyModifier(NSEventModifierFlags keyModifier);
|
|
||||||
|
|
||||||
#endif /* keyboardTranslation_h */
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
//
|
|
||||||
// keyboardTranslation.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 10.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "keyboardTranslation.h"
|
|
||||||
#import <Limelight.h>
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
NOKEY,
|
|
||||||
VK_BACKSPACE = 0x08,
|
|
||||||
VK_TAB = 0x09,
|
|
||||||
VK_ENTER = 0x0D,
|
|
||||||
VK_SPACE = 0x20,
|
|
||||||
VK_LEFT = 0x25,
|
|
||||||
VK_UP,
|
|
||||||
VK_RIGHT,
|
|
||||||
VK_DOWN,
|
|
||||||
VK_SHIFT = 0xA0,
|
|
||||||
VK_CTRL = 0xA2,
|
|
||||||
VK_ALT = 0xA4,
|
|
||||||
VK_COMMA = 0xBC,
|
|
||||||
VK_MINUS = 0xBD,
|
|
||||||
VK_PERIOD = 0xBE,
|
|
||||||
VK_ESC = 0x1B,
|
|
||||||
VK_F1 = 0x70,
|
|
||||||
VK_F2,
|
|
||||||
VK_F3,
|
|
||||||
VK_F4,
|
|
||||||
VK_F5,
|
|
||||||
VK_F6,
|
|
||||||
VK_F7,
|
|
||||||
VK_F8,
|
|
||||||
VK_F9,
|
|
||||||
VK_F10,
|
|
||||||
VK_F11,
|
|
||||||
VK_F12,
|
|
||||||
VK_F13,
|
|
||||||
VK_F14,
|
|
||||||
VK_F15,
|
|
||||||
VK_DEL = 0x7F,
|
|
||||||
} SpecialKeyCodes;
|
|
||||||
|
|
||||||
CGKeyCode keyCodeFromModifierKey(NSEventModifierFlags keyModifier) {
|
|
||||||
if (keyModifier & kCGEventFlagMaskShift) {
|
|
||||||
return VK_SHIFT;
|
|
||||||
}
|
|
||||||
if (keyModifier & kCGEventFlagMaskAlternate) {
|
|
||||||
return VK_ALT;
|
|
||||||
}
|
|
||||||
if (keyModifier & kCGEventFlagMaskControl) {
|
|
||||||
return VK_CTRL;
|
|
||||||
}
|
|
||||||
return NOKEY;
|
|
||||||
}
|
|
||||||
|
|
||||||
char modifierFlagForKeyModifier(NSEventModifierFlags keyModifier) {
|
|
||||||
if (keyModifier & kCGEventFlagMaskShift) {
|
|
||||||
return MODIFIER_SHIFT;
|
|
||||||
}
|
|
||||||
if (keyModifier & kCGEventFlagMaskAlternate) {
|
|
||||||
return MODIFIER_ALT;
|
|
||||||
}
|
|
||||||
if (keyModifier & kCGEventFlagMaskControl) {
|
|
||||||
return MODIFIER_CTRL;
|
|
||||||
}
|
|
||||||
return NOKEY;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGKeyCode keyCharFromKeyCode(CGKeyCode keyCode) {
|
|
||||||
switch (keyCode) {
|
|
||||||
case kVK_ANSI_A: return 'A';
|
|
||||||
case kVK_ANSI_S: return 'S';
|
|
||||||
case kVK_ANSI_D: return 'D';
|
|
||||||
case kVK_ANSI_F: return 'F';
|
|
||||||
case kVK_ANSI_H: return 'H';
|
|
||||||
case kVK_ANSI_G: return 'G';
|
|
||||||
case kVK_ANSI_Y: return 'Y';
|
|
||||||
case kVK_ANSI_X: return 'X';
|
|
||||||
case kVK_ANSI_C: return 'C';
|
|
||||||
case kVK_ANSI_V: return 'V';
|
|
||||||
case kVK_ANSI_B: return 'B';
|
|
||||||
case kVK_ANSI_Q: return 'Q';
|
|
||||||
case kVK_ANSI_W: return 'W';
|
|
||||||
case kVK_ANSI_E: return 'E';
|
|
||||||
case kVK_ANSI_R: return 'R';
|
|
||||||
case kVK_ANSI_Z: return 'Z';
|
|
||||||
case kVK_ANSI_T: return 'T';
|
|
||||||
case kVK_ANSI_1: return '1';
|
|
||||||
case kVK_ANSI_2: return '2';
|
|
||||||
case kVK_ANSI_3: return '3';
|
|
||||||
case kVK_ANSI_4: return '4';
|
|
||||||
case kVK_ANSI_6: return '6';
|
|
||||||
case kVK_ANSI_5: return '5';
|
|
||||||
case kVK_ANSI_9: return '9';
|
|
||||||
case kVK_ANSI_7: return '7';
|
|
||||||
case kVK_ANSI_8: return '8';
|
|
||||||
case kVK_ANSI_0: return '0';
|
|
||||||
case kVK_ANSI_O: return 'O';
|
|
||||||
case kVK_ANSI_U: return 'U';
|
|
||||||
case kVK_ANSI_I: return 'I';
|
|
||||||
case kVK_ANSI_P: return 'P';
|
|
||||||
case kVK_ANSI_L: return 'L';
|
|
||||||
case kVK_ANSI_J: return 'J';
|
|
||||||
case kVK_ANSI_K: return 'K';
|
|
||||||
case kVK_ANSI_N: return 'N';
|
|
||||||
case kVK_ANSI_M: return 'M';
|
|
||||||
case kVK_Return: return VK_ENTER;
|
|
||||||
case kVK_ANSI_Period: return VK_PERIOD;
|
|
||||||
case kVK_ANSI_Comma: return VK_COMMA;
|
|
||||||
case kVK_ANSI_Minus: return VK_MINUS;
|
|
||||||
case kVK_Tab: return VK_TAB;
|
|
||||||
case kVK_Space: return VK_SPACE;
|
|
||||||
case kVK_Delete: return VK_BACKSPACE;
|
|
||||||
case kVK_Escape: return VK_ESC;
|
|
||||||
case kVK_F1: return VK_F1;
|
|
||||||
case kVK_F2: return VK_F2;
|
|
||||||
case kVK_F3: return VK_F3;
|
|
||||||
case kVK_F4: return VK_F4;
|
|
||||||
case kVK_F5: return VK_F5;
|
|
||||||
case kVK_F6: return VK_F6;
|
|
||||||
case kVK_F7: return VK_F7;
|
|
||||||
case kVK_F8: return VK_F8;
|
|
||||||
case kVK_F9: return VK_F9;
|
|
||||||
case kVK_F10: return VK_F10;
|
|
||||||
case kVK_F11: return VK_F11;
|
|
||||||
case kVK_F12: return VK_F12;
|
|
||||||
case kVK_F13: return VK_F13;
|
|
||||||
case kVK_F14: return VK_F14;
|
|
||||||
case kVK_F15: return VK_F15;
|
|
||||||
case kVK_LeftArrow: return VK_LEFT;
|
|
||||||
case kVK_RightArrow: return VK_RIGHT;
|
|
||||||
case kVK_DownArrow: return VK_DOWN;
|
|
||||||
case kVK_UpArrow: return VK_UP;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return NOKEY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
//
|
|
||||||
// SettingsViewController.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 11.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
@interface SettingsViewController : NSViewController
|
|
||||||
@property (weak) IBOutlet NSTextField *textFieldResolutionHeight;
|
|
||||||
@property (weak) IBOutlet NSTextField *textFieldResolutionWidth;
|
|
||||||
@property (weak) IBOutlet NSTextField *textFieldBitrate;
|
|
||||||
@property (weak) IBOutlet NSTextField *textFieldFPS;
|
|
||||||
@property (weak) IBOutlet NSButton *buttonStreamingRemotelyToggle;
|
|
||||||
- (NSString*) getCurrentHost;
|
|
||||||
- (NSInteger) getChosenBitrate;
|
|
||||||
- (NSInteger) getChosenStreamWidth;
|
|
||||||
- (NSInteger) getChosenStreamHeight;
|
|
||||||
- (NSInteger) getChosenFrameRate;
|
|
||||||
- (NSInteger) getRemoteOptions;
|
|
||||||
@end
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
//
|
|
||||||
// SettingsViewController.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 11.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "SettingsViewController.h"
|
|
||||||
#import "DataManager.h"
|
|
||||||
|
|
||||||
@interface SettingsViewController ()
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation SettingsViewController
|
|
||||||
|
|
||||||
NSString* host;
|
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
|
||||||
[super viewDidLoad];
|
|
||||||
[self loadSettings];
|
|
||||||
// Do view setup here.
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) controlTextDidChange:(NSNotification *)obj {
|
|
||||||
//[self saveSettings];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger) getRemoteOptions {
|
|
||||||
return _buttonStreamingRemotelyToggle.state == NSOnState ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger) getChosenFrameRate {
|
|
||||||
return _textFieldFPS.integerValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger) getChosenStreamHeight {
|
|
||||||
return _textFieldResolutionHeight.integerValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger) getChosenStreamWidth {
|
|
||||||
return _textFieldResolutionWidth.integerValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger) getChosenBitrate {
|
|
||||||
return _textFieldBitrate.integerValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) loadSettings {
|
|
||||||
DataManager* dataMan = [[DataManager alloc] init];
|
|
||||||
TemporarySettings* currentSettings = [dataMan getSettings];
|
|
||||||
|
|
||||||
// Bitrate is persisted in kbps
|
|
||||||
_textFieldBitrate.integerValue = [currentSettings.bitrate integerValue];
|
|
||||||
_textFieldFPS.integerValue = [currentSettings.framerate integerValue];
|
|
||||||
_textFieldResolutionHeight.integerValue = [currentSettings.height integerValue];
|
|
||||||
_textFieldResolutionWidth.integerValue = [currentSettings.width integerValue];
|
|
||||||
_buttonStreamingRemotelyToggle.state = [currentSettings.streamingRemotely integerValue] == 0 ? NSOffState: NSOnState;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)didReceiveMemoryWarning {
|
|
||||||
// Dispose of any resources that can be recreated.
|
|
||||||
}
|
|
||||||
|
|
||||||
-(NSString*) getCurrentHost {
|
|
||||||
return host;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
//
|
|
||||||
// StreamFrameViewController.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 09.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "Connection.h"
|
|
||||||
#import "StreamConfiguration.h"
|
|
||||||
#import "StreamView.h"
|
|
||||||
#import "ViewController.h"
|
|
||||||
|
|
||||||
@interface StreamFrameViewController : NSViewController <ConnectionCallbacks>
|
|
||||||
|
|
||||||
- (ViewController*) _origin;
|
|
||||||
|
|
||||||
- (void)setOrigin: (ViewController*) viewController;
|
|
||||||
|
|
||||||
@property (nonatomic) StreamConfiguration* streamConfig;
|
|
||||||
@property (strong) IBOutlet StreamView *streamView;
|
|
||||||
@property (weak) IBOutlet NSProgressIndicator *progressIndicator;
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
//
|
|
||||||
// StreamFrameViewController.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 09.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "StreamFrameViewController.h"
|
|
||||||
#import "VideoDecoderRenderer.h"
|
|
||||||
#import "StreamManager.h"
|
|
||||||
#import "Gamepad.h"
|
|
||||||
#import "keepAlive.h"
|
|
||||||
#import "ControllerSupport.h"
|
|
||||||
#import "StreamView.h"
|
|
||||||
|
|
||||||
@interface StreamFrameViewController ()
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation StreamFrameViewController {
|
|
||||||
StreamManager *_streamMan;
|
|
||||||
StreamConfiguration *_streamConfig;
|
|
||||||
NSTimer* _eventTimer;
|
|
||||||
NSTimer* _searchTimer;
|
|
||||||
ViewController* _origin;
|
|
||||||
ControllerSupport* _controllerSupport;
|
|
||||||
}
|
|
||||||
|
|
||||||
-(ViewController*) _origin {
|
|
||||||
return _origin;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
|
||||||
[super viewDidLoad];
|
|
||||||
[keepAlive keepSystemAlive];
|
|
||||||
self.streamConfig = _streamConfig;
|
|
||||||
|
|
||||||
_streamMan = [[StreamManager alloc] initWithConfig:self.streamConfig
|
|
||||||
renderView:self.view
|
|
||||||
connectionCallbacks:self];
|
|
||||||
NSOperationQueue* opQueue = [[NSOperationQueue alloc] init];
|
|
||||||
[opQueue addOperation:_streamMan];
|
|
||||||
|
|
||||||
// Initialize the controllers (GC and IOHID)
|
|
||||||
// I have not tested it, but i think there will be a bug, when mixing GC and IOHID Controllers, because all GCControllers also register as IOHID Controllers.
|
|
||||||
// To fix this, we need to get the IOHIDDeviceRef for the GCController and compare it with every IOHID Controller.
|
|
||||||
// This shouldn't be a problem as long as this will not be put on the mac app store, as the IOHIDDeviceRef is a private field.
|
|
||||||
// The other "fix" would be to disable explicit GC support for the mac version for now.
|
|
||||||
// Can someone test this?
|
|
||||||
_controllerSupport = [[ControllerSupport alloc] init];
|
|
||||||
|
|
||||||
// The gamepad currently gets polled at 1/Framerate.
|
|
||||||
_eventTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/_streamConfig.frameRate target:self selector:@selector(eventTimerTick) userInfo:nil repeats:true];
|
|
||||||
|
|
||||||
// We search for new devices every 2 seconds.
|
|
||||||
_searchTimer = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(searchTimerTick) userInfo:nil repeats:true];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)eventTimerTick {
|
|
||||||
Gamepad_processEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)searchTimerTick {
|
|
||||||
Gamepad_detectDevices();
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) viewDidAppear {
|
|
||||||
[super viewDidAppear];
|
|
||||||
|
|
||||||
// Hide the cursor and disconnect it from the mouse movement
|
|
||||||
[NSCursor hide];
|
|
||||||
CGAssociateMouseAndMouseCursorPosition(false);
|
|
||||||
|
|
||||||
//During the setup the window should not be resizable, but to use the fullscreen feature of macOS it has to be resizable.
|
|
||||||
[self.view.window setStyleMask:[self.view.window styleMask] | NSWindowStyleMaskResizable];
|
|
||||||
|
|
||||||
if (self.view.bounds.size.height != NSScreen.mainScreen.frame.size.height || self.view.bounds.size.width != NSScreen.mainScreen.frame.size.width) {
|
|
||||||
[self.view.window toggleFullScreen:self];
|
|
||||||
}
|
|
||||||
[_progressIndicator startAnimation:nil];
|
|
||||||
[_origin dismissController:nil];
|
|
||||||
_origin = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)viewWillDisappear {
|
|
||||||
[NSCursor unhide];
|
|
||||||
[keepAlive allowSleep];
|
|
||||||
[_streamMan stopStream];
|
|
||||||
CGAssociateMouseAndMouseCursorPosition(true);
|
|
||||||
if (self.view.bounds.size.height == NSScreen.mainScreen.frame.size.height && self.view.bounds.size.width == NSScreen.mainScreen.frame.size.width) {
|
|
||||||
[self.view.window toggleFullScreen:self];
|
|
||||||
[self.view.window setStyleMask:[self.view.window styleMask] & ~NSWindowStyleMaskResizable];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)connectionStarted {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
[self->_progressIndicator stopAnimation:nil];
|
|
||||||
self->_progressIndicator.hidden = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)connectionTerminated:(long)errorCode {
|
|
||||||
[_streamMan stopStream];
|
|
||||||
[self transitionToSetupView:1];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)transitionToSetupView:(long)errorCode {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
NSStoryboard *storyBoard = [NSStoryboard storyboardWithName:@"Mac" bundle:nil];
|
|
||||||
ViewController* view = (ViewController*)[storyBoard instantiateControllerWithIdentifier :@"setupFrameVC"];
|
|
||||||
[view setError:errorCode];
|
|
||||||
self.view.window.contentViewController = view;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setOrigin: (ViewController*) viewController {
|
|
||||||
_origin = viewController;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)displayMessage:(const char *)message {
|
|
||||||
//[_streamView drawMessage:[NSString stringWithFormat:@"%s", message]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)displayTransientMessage:(const char *)message {
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)launchFailed:(NSString *)message {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)stageComplete:(const char *)stageName {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)stageFailed:(const char *)stageName withError:(long)errorCode {
|
|
||||||
//[_streamView drawMessage:[NSString stringWithFormat:@"Stage: %s failed with code: %li", stageName, errorCode]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)stageStarting:(const char *)stageName {
|
|
||||||
//[_streamView drawMessage:[NSString stringWithFormat:@"%s", stageName]];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
//
|
|
||||||
// ViewController.h
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 09.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PairManager.h"
|
|
||||||
#import "StreamConfiguration.h"
|
|
||||||
|
|
||||||
@interface ViewController : NSViewController <PairCallback, NSURLConnectionDelegate>
|
|
||||||
|
|
||||||
- (IBAction)buttonLaunchPressed:(id)sender;
|
|
||||||
- (IBAction)textFieldAction:(id)sender;
|
|
||||||
- (IBAction)buttonConnectPressed:(id)sender;
|
|
||||||
- (IBAction)buttonSettingsPressed:(id)sender;
|
|
||||||
- (IBAction)popupButtonSelectionPressed:(id)sender;
|
|
||||||
|
|
||||||
- (void)setError:(long)errorCode;
|
|
||||||
- (long) error;
|
|
||||||
|
|
||||||
@property (weak) IBOutlet NSLayoutConstraint *layoutConstraintSetupFrame;
|
|
||||||
@property (weak) IBOutlet NSButton *buttonConnect;
|
|
||||||
@property (weak) IBOutlet NSTextField *textFieldHost;
|
|
||||||
@property (weak) IBOutlet NSButton *buttonSettings;
|
|
||||||
@property (weak) IBOutlet NSButton *buttonLaunch;
|
|
||||||
@property (weak) IBOutlet NSPopUpButton *popupButtonSelection;
|
|
||||||
@property (weak) IBOutlet NSView *containerViewController;
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@@ -1,236 +0,0 @@
|
|||||||
//
|
|
||||||
// ViewController.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix Kratz on 09.03.18.
|
|
||||||
// Copyright © 2018 Felix Kratz. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "ViewController.h"
|
|
||||||
|
|
||||||
#import "CryptoManager.h"
|
|
||||||
#import "HttpManager.h"
|
|
||||||
#import "Connection.h"
|
|
||||||
#import "StreamManager.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
#import "DataManager.h"
|
|
||||||
#import "TemporarySettings.h"
|
|
||||||
#import "WakeOnLanManager.h"
|
|
||||||
#import "AppListResponse.h"
|
|
||||||
#import "ServerInfoResponse.h"
|
|
||||||
#import "StreamFrameViewController.h"
|
|
||||||
#import "TemporaryApp.h"
|
|
||||||
#import "IdManager.h"
|
|
||||||
#import "SettingsViewController.h"
|
|
||||||
#import "ConnectionHelper.h"
|
|
||||||
|
|
||||||
@implementation ViewController{
|
|
||||||
NSOperationQueue* _opQueue;
|
|
||||||
TemporaryHost* _selectedHost;
|
|
||||||
NSString* _uniqueId;
|
|
||||||
NSData* _cert;
|
|
||||||
StreamConfiguration* _streamConfig;
|
|
||||||
NSArray* _sortedAppList;
|
|
||||||
NSSet* _appList;
|
|
||||||
NSString* _host;
|
|
||||||
SettingsViewController *_settingsView;
|
|
||||||
CGFloat settingsFrameHeight;
|
|
||||||
bool showSettings;
|
|
||||||
NSAlert* _alert;
|
|
||||||
long error;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (long)error {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setError:(long)errorCode {
|
|
||||||
error = errorCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
|
||||||
[super viewDidLoad];
|
|
||||||
[CryptoManager generateKeyPairUsingSSl];
|
|
||||||
_uniqueId = [IdManager getUniqueId];
|
|
||||||
_cert = [CryptoManager readCertFromFile];
|
|
||||||
|
|
||||||
_opQueue = [[NSOperationQueue alloc] init];
|
|
||||||
|
|
||||||
// Do any additional setup after loading the view.
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)viewWillAppear {
|
|
||||||
[super viewWillAppear];
|
|
||||||
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"] isEqual: @"Dark"]) {
|
|
||||||
[self.view.window setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameVibrantDark]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)viewDidAppear {
|
|
||||||
[super viewDidAppear];
|
|
||||||
|
|
||||||
if (self.view.bounds.size.height == NSScreen.mainScreen.frame.size.height && self.view.bounds.size.width == NSScreen.mainScreen.frame.size.width)
|
|
||||||
{
|
|
||||||
[self.view.window toggleFullScreen:self];
|
|
||||||
[self.view.window setStyleMask:[self.view.window styleMask] & ~NSWindowStyleMaskResizable];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
[_buttonLaunch setEnabled:false];
|
|
||||||
[_popupButtonSelection removeAllItems];
|
|
||||||
_settingsView = [self.childViewControllers lastObject];
|
|
||||||
|
|
||||||
if (_settingsView.getCurrentHost != nil)
|
|
||||||
_textFieldHost.stringValue = _settingsView.getCurrentHost;
|
|
||||||
settingsFrameHeight = _layoutConstraintSetupFrame.constant;
|
|
||||||
_layoutConstraintSetupFrame.constant = 0;
|
|
||||||
showSettings = false;
|
|
||||||
|
|
||||||
if (error != 0) {
|
|
||||||
[self showAlert:[NSString stringWithFormat: @"The connection terminated."]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void) showAlert:(NSString*) message {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
self->_alert = [NSAlert new];
|
|
||||||
self->_alert.messageText = message;
|
|
||||||
[self->_alert beginSheetModalForWindow:[self.view window] completionHandler:^(NSInteger result) {
|
|
||||||
NSLog(@"Success");
|
|
||||||
}];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)setRepresentedObject:(id)representedObject {
|
|
||||||
[super setRepresentedObject:representedObject];
|
|
||||||
|
|
||||||
// Update the view, if already loaded.
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) saveSettings {
|
|
||||||
DataManager* dataMan = [[DataManager alloc] init];
|
|
||||||
NSInteger framerate = [_settingsView getChosenFrameRate];
|
|
||||||
NSInteger height = [_settingsView getChosenStreamHeight];
|
|
||||||
NSInteger width = [_settingsView getChosenStreamWidth];
|
|
||||||
NSInteger streamingRemotely = [_settingsView getRemoteOptions];
|
|
||||||
NSInteger bitrate = [_settingsView getChosenBitrate];
|
|
||||||
[dataMan saveSettingsWithBitrate:bitrate framerate:framerate height:height width:width
|
|
||||||
onscreenControls:0 remote:streamingRemotely];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)controlTextDidChange:(NSNotification *)obj {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)buttonLaunchPressed:(id)sender {
|
|
||||||
[self saveSettings];
|
|
||||||
DataManager* dataMan = [[DataManager alloc] init];
|
|
||||||
TemporarySettings* streamSettings = [dataMan getSettings];
|
|
||||||
_streamConfig = [[StreamConfiguration alloc] init];
|
|
||||||
_streamConfig.frameRate = [streamSettings.framerate intValue];
|
|
||||||
_streamConfig.bitRate = [streamSettings.bitrate intValue];
|
|
||||||
_streamConfig.height = [streamSettings.height intValue];
|
|
||||||
_streamConfig.width = [streamSettings.width intValue];
|
|
||||||
_streamConfig.streamingRemotely = [streamSettings.streamingRemotely intValue];
|
|
||||||
_streamConfig.host = _textFieldHost.stringValue;
|
|
||||||
_streamConfig.appID = [_sortedAppList[_popupButtonSelection.indexOfSelectedItem] id];
|
|
||||||
[self transitionToStreamView];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)textFieldAction:(id)sender {
|
|
||||||
[self buttonConnectPressed:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)buttonConnectPressed:(id)sender {
|
|
||||||
_host = _textFieldHost.stringValue;
|
|
||||||
HttpManager* hMan = [[HttpManager alloc] initWithHost:_textFieldHost.stringValue
|
|
||||||
uniqueId:_uniqueId
|
|
||||||
deviceName:deviceName
|
|
||||||
cert:_cert];
|
|
||||||
|
|
||||||
ServerInfoResponse* serverInfoResp = [[ServerInfoResponse alloc] init];
|
|
||||||
[hMan executeRequestSynchronously:[HttpRequest requestForResponse:serverInfoResp withUrlRequest:[hMan newServerInfoRequest]
|
|
||||||
fallbackError:401 fallbackRequest:[hMan newHttpServerInfoRequest]]];
|
|
||||||
|
|
||||||
if ([[serverInfoResp getStringTag:@"PairStatus"] isEqualToString:@"1"]) {
|
|
||||||
NSLog(@"alreadyPaired");
|
|
||||||
[self alreadyPaired];
|
|
||||||
} else {
|
|
||||||
// Polling the server while pairing causes the server to screw up
|
|
||||||
NSLog(@"Pairing");
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
||||||
HttpManager* hMan = [[HttpManager alloc] initWithHost:self->_host uniqueId:self->_uniqueId deviceName:deviceName cert:self->_cert];
|
|
||||||
PairManager* pMan = [[PairManager alloc] initWithManager:hMan andCert:self->_cert callback:self];
|
|
||||||
[self->_opQueue addOperation:pMan];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)buttonSettingsPressed:(id)sender {
|
|
||||||
showSettings = !showSettings;
|
|
||||||
if(showSettings) {
|
|
||||||
_layoutConstraintSetupFrame.constant = settingsFrameHeight;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
_layoutConstraintSetupFrame.constant = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)popupButtonSelectionPressed:(id)sender {
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)alreadyPaired {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
[self->_popupButtonSelection setEnabled:true];
|
|
||||||
[self->_popupButtonSelection setHidden:false];
|
|
||||||
[self->_buttonConnect setEnabled:false];
|
|
||||||
[self->_buttonConnect setHidden:true];
|
|
||||||
[self->_buttonLaunch setEnabled:true];
|
|
||||||
[self->_textFieldHost setEnabled:false];
|
|
||||||
});
|
|
||||||
[self searchForHost:_host];
|
|
||||||
[self updateAppsForHost];
|
|
||||||
[self populatePopupButton];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)searchForHost:(NSString*) hostAddress {
|
|
||||||
_appList = [ConnectionHelper getAppListForHostWithHostIP:_textFieldHost.stringValue deviceName:deviceName cert:_cert uniqueID:_uniqueId].getAppList;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)populatePopupButton {
|
|
||||||
for (int i = 0; i < _appList.count; i++) {
|
|
||||||
[_popupButtonSelection addItemWithTitle:[_sortedAppList[i] name]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)pairFailed:(NSString *)message {
|
|
||||||
[self showAlert:[NSString stringWithFormat: @"%@", message]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)pairSuccessful {
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
[self.view.window endSheet:self->_alert.window];
|
|
||||||
self->_alert = nil;
|
|
||||||
[self alreadyPaired];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)showPIN:(NSString *)PIN {
|
|
||||||
[self showAlert:[NSString stringWithFormat: @"PIN: %@", PIN]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) updateAppsForHost {
|
|
||||||
_sortedAppList = [_appList allObjects];
|
|
||||||
_sortedAppList = [_sortedAppList sortedArrayUsingSelector:@selector(compareName:)];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)transitionToStreamView {
|
|
||||||
NSStoryboard *storyBoard = [NSStoryboard storyboardWithName:@"Mac" bundle:nil];
|
|
||||||
StreamFrameViewController* streamFrame = (StreamFrameViewController*)[storyBoard instantiateControllerWithIdentifier :@"streamFrameVC"];
|
|
||||||
streamFrame.streamConfig = _streamConfig;
|
|
||||||
[streamFrame setOrigin:self];
|
|
||||||
self.view.window.contentViewController = streamFrame;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
//
|
|
||||||
// main.m
|
|
||||||
// Moonlight macOS
|
|
||||||
//
|
|
||||||
// Created by Felix on 09.03.18.
|
|
||||||
// Copyright © 2018 Felix. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
int main(int argc, const char * argv[]) {
|
|
||||||
return NSApplicationMain(argc, argv);
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Tim Caswell
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2014 Alex Diener
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute it
|
|
||||||
freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
|
||||||
claim that you wrote the original software. If you use this software
|
|
||||||
in a product, an acknowledgment in the product documentation would be
|
|
||||||
appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
|
||||||
|
|
||||||
Alex Diener alex@ludobloom.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GAMEPAD_H__
|
|
||||||
#define __GAMEPAD_H__
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _MSC_VER && _MSC_VER <= 1600
|
|
||||||
#define bool int
|
|
||||||
#define true 1
|
|
||||||
#define false 0
|
|
||||||
#else
|
|
||||||
#include <stdbool.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct Gamepad_device {
|
|
||||||
// Unique device identifier for application session, starting at 0 for the first device attached and
|
|
||||||
// incrementing by 1 for each additional device. If a device is removed and subsequently reattached
|
|
||||||
// during the same application session, it will have a new deviceID.
|
|
||||||
unsigned int deviceID;
|
|
||||||
|
|
||||||
// Human-readable device name
|
|
||||||
const char * description;
|
|
||||||
|
|
||||||
// USB vendor/product IDs as returned by the driver. Can be used to determine the particular model of device represented.
|
|
||||||
int vendorID;
|
|
||||||
int productID;
|
|
||||||
|
|
||||||
// Number of axis elements belonging to the device
|
|
||||||
unsigned int numAxes;
|
|
||||||
|
|
||||||
// Number of button elements belonging to the device
|
|
||||||
unsigned int numButtons;
|
|
||||||
|
|
||||||
// Array[numAxes] of values representing the current state of each axis, in the range [-1..1]
|
|
||||||
float * axisStates;
|
|
||||||
|
|
||||||
// Array[numButtons] of values representing the current state of each button
|
|
||||||
bool * buttonStates;
|
|
||||||
|
|
||||||
// Platform-specific device data storage. Don't touch unless you know what you're doing and don't
|
|
||||||
// mind your code breaking in future versions of this library.
|
|
||||||
void * privateData;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Initializes gamepad library and detects initial devices. Call this before any other Gamepad_*()
|
|
||||||
function, other than callback registration functions. If you want to receive deviceAttachFunc
|
|
||||||
callbacks from devices detected in Gamepad_init(), you must call Gamepad_deviceAttachFunc()
|
|
||||||
before calling Gamepad_init().
|
|
||||||
|
|
||||||
This function must be called from the same thread that will be calling Gamepad_processEvents()
|
|
||||||
and Gamepad_detectDevices(). */
|
|
||||||
void Gamepad_init(void);
|
|
||||||
|
|
||||||
/* Tears down all data structures created by the gamepad library and releases any memory that was
|
|
||||||
allocated. It is not necessary to call this function at application termination, but it's
|
|
||||||
provided in case you want to free memory associated with gamepads at some earlier time. */
|
|
||||||
void Gamepad_shutdown(void);
|
|
||||||
|
|
||||||
/* Returns the number of currently attached gamepad devices. */
|
|
||||||
unsigned int Gamepad_numDevices(void);
|
|
||||||
|
|
||||||
/* Returns the specified Gamepad_device struct, or NULL if deviceIndex is out of bounds. */
|
|
||||||
struct Gamepad_device * Gamepad_deviceAtIndex(unsigned int deviceIndex);
|
|
||||||
|
|
||||||
/* Polls for any devices that have been attached since the last call to Gamepad_detectDevices() or
|
|
||||||
Gamepad_init(). If any new devices are found, the callback registered with
|
|
||||||
Gamepad_deviceAttachFunc() (if any) will be called once per newly detected device.
|
|
||||||
|
|
||||||
Note that depending on implementation, you may receive button and axis event callbacks for
|
|
||||||
devices that have not yet been detected with Gamepad_detectDevices(). You can safely ignore
|
|
||||||
these events, but be aware that your callbacks might receive a device ID that hasn't been seen
|
|
||||||
by your deviceAttachFunc. */
|
|
||||||
void Gamepad_detectDevices(void);
|
|
||||||
|
|
||||||
/* Reads pending input from all attached devices and calls the appropriate input callbacks, if any
|
|
||||||
have been registered. */
|
|
||||||
void Gamepad_processEvents(void);
|
|
||||||
|
|
||||||
/* Registers a function to be called whenever a device is attached. The specified function will be
|
|
||||||
called only during calls to Gamepad_init() and Gamepad_detectDevices(), in the thread from
|
|
||||||
which those functions were called. Calling this function with a NULL argument will stop any
|
|
||||||
previously registered callback from being called subsequently. */
|
|
||||||
void Gamepad_deviceAttachFunc(void (* callback)(struct Gamepad_device * device, void * context), void * context);
|
|
||||||
|
|
||||||
/* Registers a function to be called whenever a device is detached. The specified function can be
|
|
||||||
called at any time, and will not necessarily be called from the main thread. Calling this
|
|
||||||
function with a NULL argument will stop any previously registered callback from being called
|
|
||||||
subsequently. */
|
|
||||||
void Gamepad_deviceRemoveFunc(void (* callback)(struct Gamepad_device * device, void * context), void * context);
|
|
||||||
|
|
||||||
/* Registers a function to be called whenever a button on any attached device is pressed. The
|
|
||||||
specified function will be called only during calls to Gamepad_processEvents(), in the
|
|
||||||
thread from which Gamepad_processEvents() was called. Calling this function with a NULL
|
|
||||||
argument will stop any previously registered callback from being called subsequently. */
|
|
||||||
void Gamepad_buttonDownFunc(void (* callback)(struct Gamepad_device * device, unsigned int buttonID, double timestamp, void * context), void * context);
|
|
||||||
|
|
||||||
/* Registers a function to be called whenever a button on any attached device is released. The
|
|
||||||
specified function will be called only during calls to Gamepad_processEvents(), in the
|
|
||||||
thread from which Gamepad_processEvents() was called. Calling this function with a NULL
|
|
||||||
argument will stop any previously registered callback from being called subsequently. */
|
|
||||||
void Gamepad_buttonUpFunc(void (* callback)(struct Gamepad_device * device, unsigned int buttonID, double timestamp, void * context), void * context);
|
|
||||||
|
|
||||||
/* Registers a function to be called whenever an axis on any attached device is moved. The
|
|
||||||
specified function will be called only during calls to Gamepad_processEvents(), in the
|
|
||||||
thread from which Gamepad_processEvents() was called. Calling this function with a NULL
|
|
||||||
argument will stop any previously registered callback from being called subsequently. */
|
|
||||||
void Gamepad_axisMoveFunc(void (* callback)(struct Gamepad_device * device, unsigned int axisID, float value, float lastValue, double timestamp, void * context), void * context);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
@@ -1,514 +0,0 @@
|
|||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 48;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
9857AEEA1EBE85A20084F99E /* RtpFecQueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 9857AEE91EBE85A20084F99E /* RtpFecQueue.c */; };
|
|
||||||
9857AEF01EBE85E10084F99E /* rs.c in Sources */ = {isa = PBXBuildFile; fileRef = 9857AEEE1EBE85E10084F99E /* rs.c */; };
|
|
||||||
98AB2E401CAD425A0089BB98 /* AudioStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E1A1CAD423B0089BB98 /* AudioStream.c */; };
|
|
||||||
98AB2E411CAD425A0089BB98 /* ByteBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E1B1CAD423B0089BB98 /* ByteBuffer.c */; };
|
|
||||||
98AB2E421CAD425A0089BB98 /* Connection.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E1D1CAD423B0089BB98 /* Connection.c */; };
|
|
||||||
98AB2E431CAD425A0089BB98 /* ControlStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E1E1CAD423B0089BB98 /* ControlStream.c */; };
|
|
||||||
98AB2E441CAD425A0089BB98 /* FakeCallbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E1F1CAD423B0089BB98 /* FakeCallbacks.c */; };
|
|
||||||
98AB2E451CAD425A0089BB98 /* InputStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E211CAD423B0089BB98 /* InputStream.c */; };
|
|
||||||
98AB2E461CAD425A0089BB98 /* LinkedBlockingQueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E241CAD423B0089BB98 /* LinkedBlockingQueue.c */; };
|
|
||||||
98AB2E471CAD425A0089BB98 /* Misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E261CAD423B0089BB98 /* Misc.c */; };
|
|
||||||
98AB2E481CAD425A0089BB98 /* Platform.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E311CAD423B0089BB98 /* Platform.c */; };
|
|
||||||
98AB2E491CAD425A0089BB98 /* PlatformSockets.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E331CAD423B0089BB98 /* PlatformSockets.c */; };
|
|
||||||
98AB2E4A1CAD425A0089BB98 /* RtpReorderQueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E361CAD423B0089BB98 /* RtpReorderQueue.c */; };
|
|
||||||
98AB2E4B1CAD425A0089BB98 /* RtspConnection.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E391CAD423B0089BB98 /* RtspConnection.c */; };
|
|
||||||
98AB2E4C1CAD425A0089BB98 /* RtspParser.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E3A1CAD423B0089BB98 /* RtspParser.c */; };
|
|
||||||
98AB2E4D1CAD425A0089BB98 /* SdpGenerator.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E3B1CAD423B0089BB98 /* SdpGenerator.c */; };
|
|
||||||
98AB2E4E1CAD425A0089BB98 /* VideoDepacketizer.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E3D1CAD423B0089BB98 /* VideoDepacketizer.c */; };
|
|
||||||
98AB2E4F1CAD425A0089BB98 /* VideoStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E3E1CAD423B0089BB98 /* VideoStream.c */; };
|
|
||||||
98AB2E501CAD427A0089BB98 /* callbacks.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2DF01CAD422B0089BB98 /* callbacks.c */; };
|
|
||||||
98AB2E511CAD427A0089BB98 /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2DF31CAD422B0089BB98 /* compress.c */; };
|
|
||||||
98AB2E521CAD427A0089BB98 /* host.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E001CAD422B0089BB98 /* host.c */; };
|
|
||||||
98AB2E531CAD427A0089BB98 /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E0E1CAD422B0089BB98 /* list.c */; };
|
|
||||||
98AB2E541CAD427A0089BB98 /* packet.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E121CAD422B0089BB98 /* packet.c */; };
|
|
||||||
98AB2E551CAD427A0089BB98 /* peer.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E131CAD422B0089BB98 /* peer.c */; };
|
|
||||||
98AB2E561CAD427A0089BB98 /* protocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E151CAD422B0089BB98 /* protocol.c */; };
|
|
||||||
98AB2E571CAD427A0089BB98 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E171CAD422B0089BB98 /* unix.c */; };
|
|
||||||
98AB2E581CAD427A0089BB98 /* win32.c in Sources */ = {isa = PBXBuildFile; fileRef = 98AB2E181CAD422B0089BB98 /* win32.c */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
9857AEE91EBE85A20084F99E /* RtpFecQueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = RtpFecQueue.c; sourceTree = "<group>"; };
|
|
||||||
9857AEEB1EBE85AB0084F99E /* RtpFecQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RtpFecQueue.h; sourceTree = "<group>"; };
|
|
||||||
9857AEEE1EBE85E10084F99E /* rs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rs.c; path = "moonlight-common-c/reedsolomon/rs.c"; sourceTree = "<group>"; };
|
|
||||||
9857AEEF1EBE85E10084F99E /* rs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rs.h; path = "moonlight-common-c/reedsolomon/rs.h"; sourceTree = "<group>"; };
|
|
||||||
98AB2DF01CAD422B0089BB98 /* callbacks.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = callbacks.c; sourceTree = "<group>"; };
|
|
||||||
98AB2DF11CAD422B0089BB98 /* ChangeLog */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; };
|
|
||||||
98AB2DF21CAD422B0089BB98 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
|
|
||||||
98AB2DF31CAD422B0089BB98 /* compress.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = "<group>"; };
|
|
||||||
98AB2DF41CAD422B0089BB98 /* configure.ac */ = {isa = PBXFileReference; lastKnownFileType = text; path = configure.ac; sourceTree = "<group>"; };
|
|
||||||
98AB2DF61CAD422B0089BB98 /* design.dox */ = {isa = PBXFileReference; lastKnownFileType = text; path = design.dox; sourceTree = "<group>"; };
|
|
||||||
98AB2DF71CAD422B0089BB98 /* FAQ.dox */ = {isa = PBXFileReference; lastKnownFileType = text; path = FAQ.dox; sourceTree = "<group>"; };
|
|
||||||
98AB2DF81CAD422B0089BB98 /* install.dox */ = {isa = PBXFileReference; lastKnownFileType = text; path = install.dox; sourceTree = "<group>"; };
|
|
||||||
98AB2DF91CAD422B0089BB98 /* license.dox */ = {isa = PBXFileReference; lastKnownFileType = text; path = license.dox; sourceTree = "<group>"; };
|
|
||||||
98AB2DFA1CAD422B0089BB98 /* mainpage.dox */ = {isa = PBXFileReference; lastKnownFileType = text; path = mainpage.dox; sourceTree = "<group>"; };
|
|
||||||
98AB2DFB1CAD422B0089BB98 /* tutorial.dox */ = {isa = PBXFileReference; lastKnownFileType = text; path = tutorial.dox; sourceTree = "<group>"; };
|
|
||||||
98AB2DFC1CAD422B0089BB98 /* Doxyfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; };
|
|
||||||
98AB2DFD1CAD422B0089BB98 /* DoxygenLayout.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = DoxygenLayout.xml; sourceTree = "<group>"; };
|
|
||||||
98AB2DFE1CAD422B0089BB98 /* enet.dsp */ = {isa = PBXFileReference; lastKnownFileType = text; path = enet.dsp; sourceTree = "<group>"; };
|
|
||||||
98AB2DFF1CAD422B0089BB98 /* enet_dll.cbp */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = enet_dll.cbp; sourceTree = "<group>"; };
|
|
||||||
98AB2E001CAD422B0089BB98 /* host.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = host.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E031CAD422B0089BB98 /* callbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = callbacks.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E041CAD422B0089BB98 /* enet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = enet.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E051CAD422B0089BB98 /* list.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = list.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E061CAD422B0089BB98 /* protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = protocol.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E071CAD422B0089BB98 /* time.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = time.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E081CAD422B0089BB98 /* types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E091CAD422B0089BB98 /* unix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E0A1CAD422B0089BB98 /* utility.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = utility.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E0B1CAD422B0089BB98 /* win32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = win32.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E0C1CAD422B0089BB98 /* libenet.pc.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = libenet.pc.in; sourceTree = "<group>"; };
|
|
||||||
98AB2E0D1CAD422B0089BB98 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
|
|
||||||
98AB2E0E1CAD422B0089BB98 /* list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = list.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E101CAD422B0089BB98 /* .keep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .keep; sourceTree = "<group>"; };
|
|
||||||
98AB2E111CAD422B0089BB98 /* Makefile.am */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
|
|
||||||
98AB2E121CAD422B0089BB98 /* packet.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = packet.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E131CAD422B0089BB98 /* peer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = peer.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E141CAD422B0089BB98 /* premake4.lua */ = {isa = PBXFileReference; lastKnownFileType = text; path = premake4.lua; sourceTree = "<group>"; };
|
|
||||||
98AB2E151CAD422B0089BB98 /* protocol.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = protocol.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E161CAD422B0089BB98 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
|
|
||||||
98AB2E171CAD422B0089BB98 /* unix.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E181CAD422B0089BB98 /* win32.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = win32.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E1A1CAD423B0089BB98 /* AudioStream.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = AudioStream.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E1B1CAD423B0089BB98 /* ByteBuffer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ByteBuffer.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E1C1CAD423B0089BB98 /* ByteBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ByteBuffer.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E1D1CAD423B0089BB98 /* Connection.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Connection.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E1E1CAD423B0089BB98 /* ControlStream.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ControlStream.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E1F1CAD423B0089BB98 /* FakeCallbacks.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = FakeCallbacks.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E201CAD423B0089BB98 /* Input.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Input.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E211CAD423B0089BB98 /* InputStream.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = InputStream.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E221CAD423B0089BB98 /* Limelight-internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Limelight-internal.h"; sourceTree = "<group>"; };
|
|
||||||
98AB2E231CAD423B0089BB98 /* Limelight.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Limelight.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E241CAD423B0089BB98 /* LinkedBlockingQueue.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = LinkedBlockingQueue.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E251CAD423B0089BB98 /* LinkedBlockingQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LinkedBlockingQueue.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E261CAD423B0089BB98 /* Misc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Misc.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E311CAD423B0089BB98 /* Platform.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Platform.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E321CAD423B0089BB98 /* Platform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Platform.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E331CAD423B0089BB98 /* PlatformSockets.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = PlatformSockets.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E341CAD423B0089BB98 /* PlatformSockets.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformSockets.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E351CAD423B0089BB98 /* PlatformThreads.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformThreads.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E361CAD423B0089BB98 /* RtpReorderQueue.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = RtpReorderQueue.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E371CAD423B0089BB98 /* RtpReorderQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RtpReorderQueue.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E381CAD423B0089BB98 /* Rtsp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Rtsp.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E391CAD423B0089BB98 /* RtspConnection.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = RtspConnection.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E3A1CAD423B0089BB98 /* RtspParser.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = RtspParser.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E3B1CAD423B0089BB98 /* SdpGenerator.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SdpGenerator.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E3C1CAD423B0089BB98 /* Video.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Video.h; sourceTree = "<group>"; };
|
|
||||||
98AB2E3D1CAD423B0089BB98 /* VideoDepacketizer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = VideoDepacketizer.c; sourceTree = "<group>"; };
|
|
||||||
98AB2E3E1CAD423B0089BB98 /* VideoStream.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = VideoStream.c; sourceTree = "<group>"; };
|
|
||||||
FB290E2E19B37A4E004C83CF /* libmoonlight-common.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libmoonlight-common.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
FB290E2B19B37A4E004C83CF /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
9857AEED1EBE85D50084F99E /* reedsolomon */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
9857AEEE1EBE85E10084F99E /* rs.c */,
|
|
||||||
9857AEEF1EBE85E10084F99E /* rs.h */,
|
|
||||||
);
|
|
||||||
name = reedsolomon;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
98AB2DEF1CAD422B0089BB98 /* enet */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
98AB2DF01CAD422B0089BB98 /* callbacks.c */,
|
|
||||||
98AB2DF11CAD422B0089BB98 /* ChangeLog */,
|
|
||||||
98AB2DF21CAD422B0089BB98 /* CMakeLists.txt */,
|
|
||||||
98AB2DF31CAD422B0089BB98 /* compress.c */,
|
|
||||||
98AB2DF41CAD422B0089BB98 /* configure.ac */,
|
|
||||||
98AB2DF51CAD422B0089BB98 /* docs */,
|
|
||||||
98AB2DFC1CAD422B0089BB98 /* Doxyfile */,
|
|
||||||
98AB2DFD1CAD422B0089BB98 /* DoxygenLayout.xml */,
|
|
||||||
98AB2DFE1CAD422B0089BB98 /* enet.dsp */,
|
|
||||||
98AB2DFF1CAD422B0089BB98 /* enet_dll.cbp */,
|
|
||||||
98AB2E001CAD422B0089BB98 /* host.c */,
|
|
||||||
98AB2E011CAD422B0089BB98 /* include */,
|
|
||||||
98AB2E0C1CAD422B0089BB98 /* libenet.pc.in */,
|
|
||||||
98AB2E0D1CAD422B0089BB98 /* LICENSE */,
|
|
||||||
98AB2E0E1CAD422B0089BB98 /* list.c */,
|
|
||||||
98AB2E0F1CAD422B0089BB98 /* m4 */,
|
|
||||||
98AB2E111CAD422B0089BB98 /* Makefile.am */,
|
|
||||||
98AB2E121CAD422B0089BB98 /* packet.c */,
|
|
||||||
98AB2E131CAD422B0089BB98 /* peer.c */,
|
|
||||||
98AB2E141CAD422B0089BB98 /* premake4.lua */,
|
|
||||||
98AB2E151CAD422B0089BB98 /* protocol.c */,
|
|
||||||
98AB2E161CAD422B0089BB98 /* README */,
|
|
||||||
98AB2E171CAD422B0089BB98 /* unix.c */,
|
|
||||||
98AB2E181CAD422B0089BB98 /* win32.c */,
|
|
||||||
);
|
|
||||||
name = enet;
|
|
||||||
path = "moonlight-common-c/enet";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
98AB2DF51CAD422B0089BB98 /* docs */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
98AB2DF61CAD422B0089BB98 /* design.dox */,
|
|
||||||
98AB2DF71CAD422B0089BB98 /* FAQ.dox */,
|
|
||||||
98AB2DF81CAD422B0089BB98 /* install.dox */,
|
|
||||||
98AB2DF91CAD422B0089BB98 /* license.dox */,
|
|
||||||
98AB2DFA1CAD422B0089BB98 /* mainpage.dox */,
|
|
||||||
98AB2DFB1CAD422B0089BB98 /* tutorial.dox */,
|
|
||||||
);
|
|
||||||
path = docs;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
98AB2E011CAD422B0089BB98 /* include */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
98AB2E021CAD422B0089BB98 /* enet */,
|
|
||||||
);
|
|
||||||
path = include;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
98AB2E021CAD422B0089BB98 /* enet */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
98AB2E031CAD422B0089BB98 /* callbacks.h */,
|
|
||||||
98AB2E041CAD422B0089BB98 /* enet.h */,
|
|
||||||
98AB2E051CAD422B0089BB98 /* list.h */,
|
|
||||||
98AB2E061CAD422B0089BB98 /* protocol.h */,
|
|
||||||
98AB2E071CAD422B0089BB98 /* time.h */,
|
|
||||||
98AB2E081CAD422B0089BB98 /* types.h */,
|
|
||||||
98AB2E091CAD422B0089BB98 /* unix.h */,
|
|
||||||
98AB2E0A1CAD422B0089BB98 /* utility.h */,
|
|
||||||
98AB2E0B1CAD422B0089BB98 /* win32.h */,
|
|
||||||
);
|
|
||||||
path = enet;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
98AB2E0F1CAD422B0089BB98 /* m4 */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
98AB2E101CAD422B0089BB98 /* .keep */,
|
|
||||||
);
|
|
||||||
path = m4;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
98AB2E191CAD423B0089BB98 /* src */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
9857AEEB1EBE85AB0084F99E /* RtpFecQueue.h */,
|
|
||||||
9857AEE91EBE85A20084F99E /* RtpFecQueue.c */,
|
|
||||||
98AB2E1A1CAD423B0089BB98 /* AudioStream.c */,
|
|
||||||
98AB2E1B1CAD423B0089BB98 /* ByteBuffer.c */,
|
|
||||||
98AB2E1C1CAD423B0089BB98 /* ByteBuffer.h */,
|
|
||||||
98AB2E1D1CAD423B0089BB98 /* Connection.c */,
|
|
||||||
98AB2E1E1CAD423B0089BB98 /* ControlStream.c */,
|
|
||||||
98AB2E1F1CAD423B0089BB98 /* FakeCallbacks.c */,
|
|
||||||
98AB2E201CAD423B0089BB98 /* Input.h */,
|
|
||||||
98AB2E211CAD423B0089BB98 /* InputStream.c */,
|
|
||||||
98AB2E221CAD423B0089BB98 /* Limelight-internal.h */,
|
|
||||||
98AB2E231CAD423B0089BB98 /* Limelight.h */,
|
|
||||||
98AB2E241CAD423B0089BB98 /* LinkedBlockingQueue.c */,
|
|
||||||
98AB2E251CAD423B0089BB98 /* LinkedBlockingQueue.h */,
|
|
||||||
98AB2E261CAD423B0089BB98 /* Misc.c */,
|
|
||||||
98AB2E311CAD423B0089BB98 /* Platform.c */,
|
|
||||||
98AB2E321CAD423B0089BB98 /* Platform.h */,
|
|
||||||
98AB2E331CAD423B0089BB98 /* PlatformSockets.c */,
|
|
||||||
98AB2E341CAD423B0089BB98 /* PlatformSockets.h */,
|
|
||||||
98AB2E351CAD423B0089BB98 /* PlatformThreads.h */,
|
|
||||||
98AB2E361CAD423B0089BB98 /* RtpReorderQueue.c */,
|
|
||||||
98AB2E371CAD423B0089BB98 /* RtpReorderQueue.h */,
|
|
||||||
98AB2E381CAD423B0089BB98 /* Rtsp.h */,
|
|
||||||
98AB2E391CAD423B0089BB98 /* RtspConnection.c */,
|
|
||||||
98AB2E3A1CAD423B0089BB98 /* RtspParser.c */,
|
|
||||||
98AB2E3B1CAD423B0089BB98 /* SdpGenerator.c */,
|
|
||||||
98AB2E3C1CAD423B0089BB98 /* Video.h */,
|
|
||||||
98AB2E3D1CAD423B0089BB98 /* VideoDepacketizer.c */,
|
|
||||||
98AB2E3E1CAD423B0089BB98 /* VideoStream.c */,
|
|
||||||
);
|
|
||||||
name = src;
|
|
||||||
path = "moonlight-common-c/src";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
FB290E2519B37A4E004C83CF = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
9857AEED1EBE85D50084F99E /* reedsolomon */,
|
|
||||||
98AB2E191CAD423B0089BB98 /* src */,
|
|
||||||
98AB2DEF1CAD422B0089BB98 /* enet */,
|
|
||||||
FB290E2F19B37A4E004C83CF /* Products */,
|
|
||||||
);
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
FB290E2F19B37A4E004C83CF /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
FB290E2E19B37A4E004C83CF /* libmoonlight-common.a */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
FB290E2D19B37A4E004C83CF /* moonlight-common */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = FB290E3219B37A4E004C83CF /* Build configuration list for PBXNativeTarget "moonlight-common" */;
|
|
||||||
buildPhases = (
|
|
||||||
FB290E2A19B37A4E004C83CF /* Sources */,
|
|
||||||
FB290E2B19B37A4E004C83CF /* Frameworks */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = "moonlight-common";
|
|
||||||
productName = "limelight-common";
|
|
||||||
productReference = FB290E2E19B37A4E004C83CF /* libmoonlight-common.a */;
|
|
||||||
productType = "com.apple.product-type.library.static";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
FB290E2619B37A4E004C83CF /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
attributes = {
|
|
||||||
LastUpgradeCheck = 0930;
|
|
||||||
ORGANIZATIONNAME = "Moonlight Stream";
|
|
||||||
};
|
|
||||||
buildConfigurationList = FB290E2919B37A4E004C83CF /* Build configuration list for PBXProject "moonlight-common_mac" */;
|
|
||||||
compatibilityVersion = "Xcode 8.0";
|
|
||||||
developmentRegion = English;
|
|
||||||
hasScannedForEncodings = 0;
|
|
||||||
knownRegions = (
|
|
||||||
en,
|
|
||||||
);
|
|
||||||
mainGroup = FB290E2519B37A4E004C83CF;
|
|
||||||
productRefGroup = FB290E2F19B37A4E004C83CF /* Products */;
|
|
||||||
projectDirPath = "";
|
|
||||||
projectRoot = "";
|
|
||||||
targets = (
|
|
||||||
FB290E2D19B37A4E004C83CF /* moonlight-common */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
FB290E2A19B37A4E004C83CF /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
98AB2E401CAD425A0089BB98 /* AudioStream.c in Sources */,
|
|
||||||
98AB2E411CAD425A0089BB98 /* ByteBuffer.c in Sources */,
|
|
||||||
98AB2E421CAD425A0089BB98 /* Connection.c in Sources */,
|
|
||||||
98AB2E431CAD425A0089BB98 /* ControlStream.c in Sources */,
|
|
||||||
98AB2E441CAD425A0089BB98 /* FakeCallbacks.c in Sources */,
|
|
||||||
98AB2E451CAD425A0089BB98 /* InputStream.c in Sources */,
|
|
||||||
98AB2E461CAD425A0089BB98 /* LinkedBlockingQueue.c in Sources */,
|
|
||||||
98AB2E471CAD425A0089BB98 /* Misc.c in Sources */,
|
|
||||||
98AB2E481CAD425A0089BB98 /* Platform.c in Sources */,
|
|
||||||
98AB2E491CAD425A0089BB98 /* PlatformSockets.c in Sources */,
|
|
||||||
98AB2E4A1CAD425A0089BB98 /* RtpReorderQueue.c in Sources */,
|
|
||||||
98AB2E4B1CAD425A0089BB98 /* RtspConnection.c in Sources */,
|
|
||||||
98AB2E4C1CAD425A0089BB98 /* RtspParser.c in Sources */,
|
|
||||||
98AB2E4D1CAD425A0089BB98 /* SdpGenerator.c in Sources */,
|
|
||||||
98AB2E4E1CAD425A0089BB98 /* VideoDepacketizer.c in Sources */,
|
|
||||||
9857AEEA1EBE85A20084F99E /* RtpFecQueue.c in Sources */,
|
|
||||||
98AB2E4F1CAD425A0089BB98 /* VideoStream.c in Sources */,
|
|
||||||
98AB2E501CAD427A0089BB98 /* callbacks.c in Sources */,
|
|
||||||
98AB2E511CAD427A0089BB98 /* compress.c in Sources */,
|
|
||||||
98AB2E521CAD427A0089BB98 /* host.c in Sources */,
|
|
||||||
98AB2E531CAD427A0089BB98 /* list.c in Sources */,
|
|
||||||
98AB2E541CAD427A0089BB98 /* packet.c in Sources */,
|
|
||||||
98AB2E551CAD427A0089BB98 /* peer.c in Sources */,
|
|
||||||
98AB2E561CAD427A0089BB98 /* protocol.c in Sources */,
|
|
||||||
9857AEF01EBE85E10084F99E /* rs.c in Sources */,
|
|
||||||
98AB2E571CAD427A0089BB98 /* unix.c in Sources */,
|
|
||||||
98AB2E581CAD427A0089BB98 /* win32.c in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
FB290E3019B37A4E004C83CF /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEFINES_MODULE = YES;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_TESTABILITY = YES;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
||||||
LC_DEBUG,
|
|
||||||
"DEBUG=1",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
SDKROOT = macosx;
|
|
||||||
SKIP_INSTALL = YES;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
FB290E3119B37A4E004C83CF /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";
|
|
||||||
COPY_PHASE_STRIP = YES;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
DEFINES_MODULE = YES;
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
|
||||||
PROVISIONING_PROFILE = "";
|
|
||||||
SDKROOT = macosx;
|
|
||||||
SKIP_INSTALL = YES;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
FB290E3319B37A4E004C83CF /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
|
||||||
EXECUTABLE_PREFIX = lib;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"moonlight-common-c/enet/include",
|
|
||||||
"../libs/**",
|
|
||||||
);
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
|
||||||
ONLY_ACTIVE_ARCH = NO;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SDKROOT = macosx;
|
|
||||||
SUPPORTED_PLATFORMS = macosx;
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
FB290E3419B37A4E004C83CF /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
|
||||||
EXECUTABLE_PREFIX = lib;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
HEADER_SEARCH_PATHS = (
|
|
||||||
"moonlight-common-c/enet/include",
|
|
||||||
"../libs/**",
|
|
||||||
);
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
|
||||||
ONLY_ACTIVE_ARCH = NO;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SDKROOT = macosx;
|
|
||||||
SUPPORTED_PLATFORMS = macosx;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
FB290E2919B37A4E004C83CF /* Build configuration list for PBXProject "moonlight-common_mac" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
FB290E3019B37A4E004C83CF /* Debug */,
|
|
||||||
FB290E3119B37A4E004C83CF /* Release */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
FB290E3219B37A4E004C83CF /* Build configuration list for PBXNativeTarget "moonlight-common" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
FB290E3319B37A4E004C83CF /* Debug */,
|
|
||||||
FB290E3419B37A4E004C83CF /* Release */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = FB290E2619B37A4E004C83CF /* Project object */;
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
|
|
||||||
<false/>
|
|
||||||
<key>IDESourceControlProjectIdentifier</key>
|
|
||||||
<string>662F3EBE-A540-4F33-A434-3BBB22ECCB12</string>
|
|
||||||
<key>IDESourceControlProjectName</key>
|
|
||||||
<string>limelight-common</string>
|
|
||||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
|
||||||
<dict>
|
|
||||||
<key>151E8452-E928-4FE9-BF31-5F5C490B9DD4</key>
|
|
||||||
<string>ssh://github.com/limelight-stream/limelight-common-c.git</string>
|
|
||||||
</dict>
|
|
||||||
<key>IDESourceControlProjectPath</key>
|
|
||||||
<string>limelight-common.xcodeproj/project.xcworkspace</string>
|
|
||||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
|
||||||
<dict>
|
|
||||||
<key>151E8452-E928-4FE9-BF31-5F5C490B9DD4</key>
|
|
||||||
<string>../..</string>
|
|
||||||
</dict>
|
|
||||||
<key>IDESourceControlProjectURL</key>
|
|
||||||
<string>ssh://github.com/limelight-stream/limelight-common-c.git</string>
|
|
||||||
<key>IDESourceControlProjectVersion</key>
|
|
||||||
<integer>110</integer>
|
|
||||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
|
||||||
<string>151E8452-E928-4FE9-BF31-5F5C490B9DD4</string>
|
|
||||||
<key>IDESourceControlProjectWCConfigurations</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
|
||||||
<string>public.vcs.git</string>
|
|
||||||
<key>IDESourceControlWCCIdentifierKey</key>
|
|
||||||
<string>151E8452-E928-4FE9-BF31-5F5C490B9DD4</string>
|
|
||||||
<key>IDESourceControlWCCName</key>
|
|
||||||
<string>limelight-common-c</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "A4B0849259F9566B0CBA84A6D3D4A0F895C03123",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
|
|
||||||
|
|
||||||
},
|
|
||||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
|
|
||||||
"584110FE5ABD5BCB5065B76A98D3F8000D0644EC" : 0,
|
|
||||||
"A4B0849259F9566B0CBA84A6D3D4A0F895C03123" : 0,
|
|
||||||
"EB99D631D5149240E91F8D168F0F298D7A5BAA89" : 0
|
|
||||||
},
|
|
||||||
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "40250820-914C-4FB3-9CF1-3DB8A02E7012",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
|
|
||||||
"584110FE5ABD5BCB5065B76A98D3F8000D0644EC" : "moonlight-ios\/moonlight-common\/moonlight-common-c\/enet\/",
|
|
||||||
"A4B0849259F9566B0CBA84A6D3D4A0F895C03123" : "moonlight-ios\/",
|
|
||||||
"EB99D631D5149240E91F8D168F0F298D7A5BAA89" : "moonlight-ios\/moonlight-common\/moonlight-common-c\/"
|
|
||||||
},
|
|
||||||
"DVTSourceControlWorkspaceBlueprintNameKey" : "moonlight-common",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "moonlight-common\/moonlight-common.xcodeproj",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
|
|
||||||
{
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/cgutman\/enet.git",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "584110FE5ABD5BCB5065B76A98D3F8000D0644EC"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:moonlight-stream\/moonlight-ios.git",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "A4B0849259F9566B0CBA84A6D3D4A0F895C03123"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/moonlight-stream\/moonlight-common-c.git",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
|
||||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "EB99D631D5149240E91F8D168F0F298D7A5BAA89"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||