Remove OSPortabilityDefs.h

The macOS support that used it has been removed for a while
This commit is contained in:
Cameron Gutman 2020-11-01 16:50:02 -06:00
parent c3ba447372
commit 42f29c44e6
11 changed files with 13 additions and 41 deletions

View File

@ -21,12 +21,11 @@
// HACK: Avoid calling [UIApplication delegate] off the UI thread to keep
// Main Thread Checker happy.
if ([NSThread isMainThread]) {
_appDelegate = (AppDelegate *)[[OSApplication sharedApplication] delegate];
_appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
}
else {
dispatch_sync(dispatch_get_main_queue(), ^{
self->_appDelegate = (AppDelegate *)[[OSApplication sharedApplication] delegate];
self->_appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
});
}

View File

@ -25,9 +25,9 @@
@end
#if TARGET_OS_TV
@interface StreamView : OSView <X1KitMouseDelegate, UITextFieldDelegate>
@interface StreamView : UIView <X1KitMouseDelegate, UITextFieldDelegate>
#else
@interface StreamView : OSView <X1KitMouseDelegate, UITextFieldDelegate, UIPointerInteractionDelegate>
@interface StreamView : UIView <X1KitMouseDelegate, UITextFieldDelegate, UIPointerInteractionDelegate>
#endif
@property (nonatomic, retain) IBOutlet UITextField* keyInputField;

View File

@ -21,5 +21,4 @@
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "Logger.h"
#include "OSPortabilityDefs.h"
#endif

View File

@ -16,8 +16,8 @@
self.statusMessage = @"App asset has no status message";
self.statusCode = -1;
}
- (OSImage*) getImage {
return [[OSImage alloc] initWithData:self.data];
- (UIImage*) getImage {
return [[UIImage alloc] initWithData:self.data];
}
@end

View File

@ -1,24 +0,0 @@
//
// OSPortabilityDefs.h
// Moonlight
//
// Created by Cameron Gutman on 3/26/18.
// Copyright © 2018 Moonlight Stream. All rights reserved.
//
#ifndef OSPortabilityDefs_h
#define OSPortabilityDefs_h
#if TARGET_OS_IPHONE
#define OSImage UIImage
#define OSColor UIColor
#define OSView UIView
#define OSApplication UIApplication
#else
#define OSImage NSImage
#define OSColor NSColor
#define OSView NSView
#define OSApplication NSApplication
#endif
#endif /* OSPortabilityDefs_h */

View File

@ -11,7 +11,7 @@
@interface StreamManager : NSOperation
- (id) initWithConfig:(StreamConfiguration*)config renderView:(OSView*)view connectionCallbacks:(id<ConnectionCallbacks>)callback;
- (id) initWithConfig:(StreamConfiguration*)config renderView:(UIView*)view connectionCallbacks:(id<ConnectionCallbacks>)callback;
- (void) stopStream;

View File

@ -20,12 +20,12 @@
@implementation StreamManager {
StreamConfiguration* _config;
OSView* _renderView;
UIView* _renderView;
id<ConnectionCallbacks> _callbacks;
Connection* _connection;
}
- (id) initWithConfig:(StreamConfiguration*)config renderView:(OSView*)view connectionCallbacks:(id<ConnectionCallbacks>)callbacks {
- (id) initWithConfig:(StreamConfiguration*)config renderView:(UIView*)view connectionCallbacks:(id<ConnectionCallbacks>)callbacks {
self = [super init];
_config = config;
_renderView = view;

View File

@ -10,7 +10,7 @@
@interface VideoDecoderRenderer : NSObject
- (id)initWithView:(OSView*)view;
- (id)initWithView:(UIView*)view;
- (void)setupWithVideoFormat:(int)videoFormat refreshRate:(int)refreshRate;

View File

@ -30,7 +30,7 @@
displayLayer = [[AVSampleBufferDisplayLayer alloc] init];
displayLayer.bounds = _view.bounds;
displayLayer.backgroundColor = [OSColor blackColor].CGColor;
displayLayer.backgroundColor = [UIColor blackColor].CGColor;
displayLayer.position = CGPointMake(CGRectGetMidX(_view.bounds), CGRectGetMidY(_view.bounds));
displayLayer.videoGravity = AVLayerVideoGravityResizeAspect;

View File

@ -151,8 +151,8 @@
[_overlayView setTextAlignment:NSTextAlignmentCenter];
}
[_overlayView setTextColor:[OSColor lightGrayColor]];
[_overlayView setBackgroundColor:[OSColor blackColor]];
[_overlayView setTextColor:[UIColor lightGrayColor]];
[_overlayView setBackgroundColor:[UIColor blackColor]];
#if TARGET_OS_TV
[_overlayView setFont:[UIFont systemFontOfSize:24]];
#else

View File

@ -176,7 +176,6 @@
9865DC3B2132922E0005B9B9 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.4.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; };
986CCE6C2133E45300168291 /* Moonlight v1.2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.2.xcdatamodel"; sourceTree = "<group>"; };
98783FEA242EAC5D00F00EF4 /* Moonlight v1.5.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.5.xcdatamodel"; sourceTree = "<group>"; };
98878AE0206A226D00586E90 /* OSPortabilityDefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OSPortabilityDefs.h; sourceTree = "<group>"; };
9890CF6A203B7EE1006C4B06 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
9896219623D15C7000211983 /* X1Kit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = X1Kit.swift; path = X1Kit/Sources/X1Kit/X1Kit.swift; sourceTree = "<group>"; };
9897B6A0221260EF00966419 /* Controller.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = "<group>"; };
@ -502,7 +501,6 @@
FB1D59961BBCCB6400F482CA /* ComputerScrollView.m */,
FB1D59981BBCCD7E00F482CA /* AppCollectionView.h */,
FB1D59991BBCCD7E00F482CA /* AppCollectionView.m */,
98878AE0206A226D00586E90 /* OSPortabilityDefs.h */,
);
name = Moonlight;
path = Limelight;