Cocoa Port: Create new DisplayView objects in code instead of creating them implicitly through the nib.
This commit is contained in:
parent
c94f353f2a
commit
d33faecd12
File diff suppressed because it is too large
Load Diff
|
@ -92,7 +92,6 @@ class OGLVideoOutput;
|
|||
{
|
||||
NSObject *dummyObject;
|
||||
|
||||
DisplayView *view;
|
||||
ClientDisplayViewProperties _localViewProps;
|
||||
NSView *saveScreenshotPanelAccessoryView;
|
||||
NSView *outputVolumeControlView;
|
||||
|
@ -102,6 +101,7 @@ class OGLVideoOutput;
|
|||
NSSlider *microphoneGainSlider;
|
||||
NSButton *microphoneMuteButton;
|
||||
|
||||
DisplayView *view;
|
||||
EmuControllerDelegate *emuControl;
|
||||
CocoaDSDisplayVideo *cdsVideoOutput;
|
||||
NSScreen *assignedScreen;
|
||||
|
@ -123,7 +123,6 @@ class OGLVideoOutput;
|
|||
|
||||
@property (readonly) IBOutlet NSObject *dummyObject;
|
||||
|
||||
@property (readonly) IBOutlet DisplayView *view;
|
||||
@property (readonly) IBOutlet NSView *saveScreenshotPanelAccessoryView;
|
||||
@property (readonly) IBOutlet NSView *outputVolumeControlView;
|
||||
@property (readonly) IBOutlet NSView *microphoneGainControlView;
|
||||
|
@ -132,6 +131,7 @@ class OGLVideoOutput;
|
|||
@property (readonly) IBOutlet NSSlider *microphoneGainSlider;
|
||||
@property (readonly) IBOutlet NSButton *microphoneMuteButton;
|
||||
|
||||
@property (retain) DisplayView *view;
|
||||
@property (retain) EmuControllerDelegate *emuControl;
|
||||
@property (retain) CocoaDSDisplayVideo *cdsVideoOutput;
|
||||
@property (assign) NSScreen *assignedScreen;
|
||||
|
|
|
@ -94,6 +94,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
return self;
|
||||
}
|
||||
|
||||
view = nil;
|
||||
emuControl = [theEmuController retain];
|
||||
cdsVideoOutput = nil;
|
||||
assignedScreen = nil;
|
||||
|
@ -142,6 +143,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[self setEmuControl:nil];
|
||||
[self setAssignedScreen:nil];
|
||||
[self setView:nil];
|
||||
[self setMasterWindow:nil];
|
||||
[self setCdsVideoOutput:nil];
|
||||
|
||||
|
@ -1350,9 +1352,14 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
|
|||
|
||||
- (void)windowDidLoad
|
||||
{
|
||||
NSRect newViewFrameRect = NSMakeRect(0.0f, (CGFloat)_statusBarHeight, (CGFloat)_localViewProps.clientWidth, (CGFloat)_localViewProps.clientHeight);
|
||||
DisplayView *newView = [[[DisplayView alloc] initWithFrame:newViewFrameRect] autorelease];
|
||||
[self setView:newView];
|
||||
|
||||
// Set up the master window that is associated with this window controller.
|
||||
[self setMasterWindow:[self window]];
|
||||
[masterWindow setTitle:(NSString *)[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]];
|
||||
[[masterWindow contentView] addSubview:view];
|
||||
[masterWindow setInitialFirstResponder:view];
|
||||
[[emuControl windowList] addObject:self];
|
||||
[emuControl updateAllWindowTitles];
|
||||
|
|
Loading…
Reference in New Issue