mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-07 16:26:09 +00:00
view is now centered and rendering is flipped correctly
This commit is contained in:
@@ -18,14 +18,25 @@
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
StreamView* streamView = [[StreamView alloc] initWithFrame:self.view.frame];
|
||||
streamView.backgroundColor = [UIColor blackColor];
|
||||
|
||||
[self.view addSubview:streamView];
|
||||
|
||||
[streamView setNeedsDisplay];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
|
||||
|
||||
CGAffineTransform transform = CGAffineTransformMakeTranslation((streamView.frame.size.height/2) - (streamView.frame.size.width/2), (streamView.frame.size.width/2) - (streamView.frame.size.height/2));
|
||||
transform = CGAffineTransformRotate(transform, M_PI_2);
|
||||
transform = CGAffineTransformScale(transform, -1, -1);
|
||||
streamView.transform = transform;
|
||||
|
||||
// Repositions and resizes the view.
|
||||
CGRect contentRect = CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height);
|
||||
streamView.bounds = contentRect;
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
NSString* path = [[NSBundle mainBundle] pathForResource:@"notpadded"
|
||||
ofType:@"h264"];
|
||||
NSLog(@"Path: %@", path);
|
||||
|
||||
Reference in New Issue
Block a user