diff --git a/EmulatorView.h b/EmulatorView.h index eedefb8..cb92efc 100644 --- a/EmulatorView.h +++ b/EmulatorView.h @@ -91,7 +91,8 @@ private: -(void)dataAvailable; -(void)invalidateIRect: (iRect)rect; --(void)resizeTo: (iSize)size; +//-(void)resizeTo: (iSize)size; +-(void)resizeTo: (iSize)size animated: (BOOL)animated; -(void)cursorTimer: (NSTimer *)timer; diff --git a/EmulatorView.mm b/EmulatorView.mm index aa587c2..5df02d4 100644 --- a/EmulatorView.mm +++ b/EmulatorView.mm @@ -463,7 +463,8 @@ } --(void)resizeTo: (iSize)size + +-(void)resizeTo: (iSize)size animated: (BOOL)animated { NSWindow *window = [self window]; NSRect bounds = [self bounds]; @@ -477,7 +478,7 @@ // best case -- no change. if (NSEqualSizes(newSize, bounds.size)) return; - + // ok, change needed. @@ -487,8 +488,13 @@ wframe.size.width += newSize.width - bounds.size.width; _inResizeTo = YES; - [window setFrame: wframe display: YES animate: YES]; - _inResizeTo = NO; + [window setFrame: wframe display: YES animate: animated]; + _inResizeTo = NO; +} + +-(void)resizeTo: (iSize)size +{ + [self resizeTo: size animated: YES]; } @@ -697,7 +703,7 @@ void ViewScreen::setSize(unsigned width, unsigned height, bool resizeView) if (resizeView) { - [_view resizeTo: iSize(width, height)]; + [_view resizeTo: iSize(width, height) animated: YES]; } }