summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/osx/debugwindowhandler.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/debugger/osx/debugwindowhandler.m')
-rw-r--r--src/osd/modules/debugger/osx/debugwindowhandler.m23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.m b/src/osd/modules/debugger/osx/debugwindowhandler.m
index 3b4ed3eb590..d26ca25979b 100644
--- a/src/osd/modules/debugger/osx/debugwindowhandler.m
+++ b/src/osd/modules/debugger/osx/debugwindowhandler.m
@@ -231,8 +231,9 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
- (void)showDebugger:(NSNotification *)notification {
- device_t *device = (device_t *) [[[notification userInfo] objectForKey:@"MAMEDebugDevice"] pointerValue];
- if (&device->machine() == machine) {
+ running_machine *m = (running_machine *)[[[notification userInfo] objectForKey:@"MAMEDebugMachine"] pointerValue];
+ if (m == machine)
+ {
if (![window isVisible] && ![window isMiniaturized])
[window orderFront:self];
}
@@ -240,7 +241,9 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
- (void)hideDebugger:(NSNotification *)notification {
- [window orderOut:self];
+ running_machine *m = (running_machine *)[[[notification userInfo] objectForKey:@"MAMEDebugMachine"] pointerValue];
+ if (m == machine)
+ [window orderOut:self];
}
@end
@@ -309,9 +312,9 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
desired.height -= current.height;
windowFrame.size.width += desired.width;
+ windowFrame.size.width = MIN(windowFrame.size.width, available.size.width);
windowFrame.size.height += desired.height;
windowFrame.size.height = MIN(MIN(windowFrame.size.height, 240), available.size.height);
- windowFrame.size.width = MIN(windowFrame.size.width, available.size.width);
windowFrame.origin.x = available.origin.x + available.size.width - windowFrame.size.width;
windowFrame.origin.y = available.origin.y;
[window setFrame:windowFrame display:YES];
@@ -352,6 +355,18 @@ NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification = @"MAMEAuxiliaryD
}
+- (NSString *)expression {
+ return [[self documentView] expression];
+}
+
+- (void)setExpression:(NSString *)expression {
+ [history add:expression];
+ [[self documentView] setExpression:expression];
+ [expressionField setStringValue:expression];
+ [expressionField selectText:self];
+}
+
+
- (IBAction)doExpression:(id)sender {
NSString *expr = [sender stringValue];
if ([expr length] > 0) {