Fixed a very slim chance that window will be white and empty after startup

There are a few quite specific steps to reproduce this issue:
* 640x480 video resolution
* -iwad ... -warp ... command line parameters
* OS X 10.4 or 10.5 PowerPC, maybe performance related
When all these requirements are met, content view doesn't show up sometimes
The simplest solution for this issue is to set initial window size to non-existent video resolution
This commit is contained in:
alexey.lysiuk 2015-01-07 14:49:07 +02:00
parent f71b1a8983
commit 83c6798651

View file

@ -355,7 +355,11 @@ cycle_t FlipCycles;
CocoaWindow* CreateCocoaWindow(const NSUInteger styleMask)
{
CocoaWindow* window = [[CocoaWindow alloc] initWithContentRect:NSMakeRect(0, 0, 640, 480)
static const CGFloat TEMP_WIDTH = VideoModes[0].width - 1;
static const CGFloat TEMP_HEIGHT = VideoModes[0].height - 1;
CocoaWindow* const window = [CocoaWindow alloc];
[window initWithContentRect:NSMakeRect(0, 0, TEMP_WIDTH, TEMP_HEIGHT)
styleMask:styleMask
backing:NSBackingStoreBuffered
defer:NO];