mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
Remove OSPortabilityDefs.h
The macOS support that used it has been removed for a while
This commit is contained in:
@@ -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];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -21,5 +21,4 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
#import "Logger.h"
|
||||
#include "OSPortabilityDefs.h"
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
@interface VideoDecoderRenderer : NSObject
|
||||
|
||||
- (id)initWithView:(OSView*)view;
|
||||
- (id)initWithView:(UIView*)view;
|
||||
|
||||
- (void)setupWithVideoFormat:(int)videoFormat refreshRate:(int)refreshRate;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user