mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 10:31:02 +00:00
Merge branch 'master' of github.com:limelight-stream/limelight-ios
Conflicts: Limelight/ViewControllers/StreamFrameViewController.m
This commit is contained in:
@@ -50,10 +50,12 @@
|
||||
- (void) retrieveAssetForApp:(App*)app useCache:(BOOL)useCache {
|
||||
UIImage* appImage = nil;
|
||||
if (useCache) {
|
||||
UIImage* cachedImage = [_imageCache objectForKey:app.appId];
|
||||
if (cachedImage != nil) {
|
||||
appImage = cachedImage;
|
||||
app.appImage = appImage;
|
||||
@synchronized(_imageCache) {
|
||||
UIImage* cachedImage = [_imageCache objectForKey:app.appId];
|
||||
if (cachedImage != nil) {
|
||||
appImage = cachedImage;
|
||||
app.appImage = appImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (appImage == nil) {
|
||||
@@ -62,7 +64,9 @@
|
||||
appImage = [UIImage imageWithData:appAsset];
|
||||
app.appImage = appImage;
|
||||
if (appImage != nil) {
|
||||
[_imageCache setObject:appImage forKey:app.appId];
|
||||
@synchronized(_imageCache) {
|
||||
[_imageCache setObject:appImage forKey:app.appId];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self performSelectorOnMainThread:@selector(sendCallBackForApp:) withObject:app waitUntilDone:NO];
|
||||
|
||||
@@ -57,14 +57,26 @@
|
||||
[self returnToMainFrame];
|
||||
}
|
||||
|
||||
- (void)edgeSwiped {
|
||||
[_streamMan stopStream];
|
||||
[self returnToMainFrame];
|
||||
}
|
||||
|
||||
- (void) connectionStarted {
|
||||
NSLog(@"Connection started");
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.spinner stopAnimating];
|
||||
[self.stageLabel setText:@"Waiting for first frame..."];
|
||||
[self.stageLabel sizeToFit];
|
||||
[(StreamView*)self.view setupOnScreenControls: _controllerSupport];
|
||||
UIScreenEdgePanGestureRecognizer* swipeGesture = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(edgeSwiped)];
|
||||
swipeGesture.edges = UIRectEdgeLeft;
|
||||
if (swipeGesture == nil) {
|
||||
NSLog(@"An error occured trying to create UIScreenEdgePanGestureRecognizer");
|
||||
} else {
|
||||
[self.view addGestureRecognizer:swipeGesture];
|
||||
}
|
||||
});
|
||||
[(StreamView*)self.view setupOnScreenControls: _controllerSupport];
|
||||
}
|
||||
|
||||
- (void)connectionTerminated:(long)errorCode {
|
||||
|
||||
Reference in New Issue
Block a user