cocoa: fix window size in certain circumstances

a combination of starting from bundle and fullscreen used the standard
window size (960x480) from the pseudo GUI instead of the wanted video
size.
This commit is contained in:
Akemi 2017-01-14 15:41:23 +01:00
parent 8cbb2b5e9a
commit 4fe45fb3a1
1 changed files with 2 additions and 8 deletions

View File

@ -332,11 +332,6 @@
display:NO];
}
- (void)updateWindowFrame:(NSSize)newSize
{
_unfs_content_frame = [self frameRect:_unfs_content_frame forCenteredContentSize:newSize];
}
- (void)tryDequeueSize
{
if (_queued_video_size.width <= 0.0 || _queued_video_size.height <= 0.0)
@ -349,9 +344,8 @@
- (void)queueNewVideoSize:(NSSize)newSize
{
if ([self.adapter isInFullScreenMode]) {
[self updateWindowFrame:newSize];
} else {
_unfs_content_frame = [self frameRect:_unfs_content_frame forCenteredContentSize:newSize];
if (![self.adapter isInFullScreenMode]) {
if (NSEqualSizes(_queued_video_size, newSize))
return;
_queued_video_size = newSize;