Fixing UI bugs in the Cocoa debugger. Console windows now display the ROM file name
This commit is contained in:
parent
11c148c851
commit
1b049b8f75
@ -356,6 +356,9 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
|
||||
|
||||
[self.feedSaveButton removeFromSuperview];
|
||||
|
||||
self.consoleWindow.title = [NSString stringWithFormat:@"Debug Console – %@", [[self.fileURL path] lastPathComponent]];
|
||||
|
||||
/* contentView.superview.subviews.lastObject is the titlebar view */
|
||||
NSView *titleView = self.printerFeedWindow.contentView.superview.subviews.lastObject;
|
||||
[titleView addSubview: self.feedSaveButton];
|
||||
@ -587,7 +590,7 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
[textView.textStorage appendAttributedString:pending_console_output];
|
||||
[textView scrollToEndOfDocument:nil];
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DeveloperMode"]) {
|
||||
[self.consoleWindow orderBack:nil];
|
||||
[self.consoleWindow orderFront:nil];
|
||||
}
|
||||
pending_console_output = nil;
|
||||
}
|
||||
@ -631,7 +634,7 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
[pending_console_output appendAttributedString:attributed];
|
||||
}
|
||||
|
||||
if ([console_output_timer isValid]) {
|
||||
if (![console_output_timer isValid]) {
|
||||
console_output_timer = [NSTimer timerWithTimeInterval:(NSTimeInterval)0.05 repeats:NO block:^(NSTimer * _Nonnull timer) {
|
||||
[self appendPendingOutput];
|
||||
}];
|
||||
@ -1416,4 +1419,11 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setFileURL:(NSURL *)fileURL
|
||||
{
|
||||
[super setFileURL:fileURL];
|
||||
self.consoleWindow.title = [NSString stringWithFormat:@"Debug Console – %@", [[fileURL path] lastPathComponent]];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user