94 |
|
//[win setHasShadow: NO]; // This causes view & window to now be drawn correctly |
95 |
|
[win useOptimizedDrawing: YES]; |
96 |
|
|
97 |
– |
// [win center]; |
97 |
|
[win makeKeyAndOrderFront:self]; |
98 |
|
|
100 |
– |
// [self resizeWinToWidth:x Height:y]; |
101 |
– |
|
99 |
|
if ( redrawDelay ) |
100 |
|
[speed setFloatValue: 1.0 / redrawDelay]; |
101 |
|
else |
144 |
|
[self Resume: self]; |
145 |
|
} |
146 |
|
|
147 |
+ |
#ifdef NIGEL |
148 |
+ |
- (IBAction) EjectCD: (id)sender; |
149 |
+ |
{ |
150 |
+ |
NSString *path; |
151 |
+ |
const char *cdrom = PrefsFindString("cdrom"); |
152 |
+ |
|
153 |
+ |
if ( cdrom ) |
154 |
+ |
{ |
155 |
+ |
#include <sys/param.h> |
156 |
+ |
#define KERNEL |
157 |
+ |
#include <sys/mount.h> |
158 |
+ |
|
159 |
+ |
struct statfs buf; |
160 |
+ |
if ( fsstat(path, &buf) < 0 ) |
161 |
+ |
return; |
162 |
+ |
|
163 |
+ |
path = [NSString stringWithCString: cdrom]; |
164 |
+ |
|
165 |
+ |
[[NSWorkspace sharedWorkspace] unmountAndEjectDeviceAtPath: path]; |
166 |
+ |
// [path release]; |
167 |
+ |
} |
168 |
+ |
} |
169 |
+ |
#endif |
170 |
+ |
|
171 |
|
- (IBAction) Interrupt: (id)sender; |
172 |
|
{ |
173 |
|
WarningSheet (@"Interrupt action not yet supported", win); |
198 |
|
NSLog (@"%s - uae_cpu reset not yet supported, will try to fake it", |
199 |
|
__PRETTY_FUNCTION__); |
200 |
|
|
201 |
< |
// [screen blacken]; |
202 |
< |
[screen setNeedsDisplay: YES]; |
201 |
> |
[screen clear]; |
202 |
> |
[screen display]; |
203 |
|
|
204 |
|
[emul terminate]; QuitEmuNoExit(); |
205 |
|
|
206 |
+ |
|
207 |
+ |
// OK. We have killed & cleaned up. Now, start afresh: |
208 |
+ |
#include <sys.h> |
209 |
+ |
int argc = 0; |
210 |
+ |
char **argv; |
211 |
+ |
|
212 |
+ |
PrefsInit(argc, argv); |
213 |
+ |
SysInit(); |
214 |
+ |
|
215 |
|
emul = [NNThread new]; |
216 |
|
[emul perform:@selector(emulThread) of:self]; |
217 |
|
[emul start]; |
218 |
|
|
219 |
|
if ( display_type != DISPLAY_SCREEN ) |
220 |
|
[redraw resume]; |
191 |
– |
uaeCreated = YES; |
221 |
|
} |
222 |
|
} |
223 |
|
|
380 |
|
[redraw invalidate]; [redraw release]; redraw = nil; |
381 |
|
[RTC invalidate]; [RTC release]; RTC = nil; |
382 |
|
[xPRAM invalidate]; [xPRAM release]; xPRAM = nil; |
354 |
– |
if ( uaeCreated ) |
355 |
– |
QuitEmuNoExit(); |
383 |
|
} |
384 |
|
|
385 |
|
- (void) emulThread |
422 |
|
{ |
423 |
|
if ( display_type == DISPLAY_SCREEN ) |
424 |
|
{ |
425 |
< |
NSLog(@"Why was redrawScreen() called?"); |
425 |
> |
NSLog(@"We are in fullscreen mode - why was redrawScreen() called?"); |
426 |
|
return; |
427 |
|
} |
428 |
|
[barberPole animate:self]; // wobble the pole |
429 |
|
[screen setNeedsDisplay: YES]; // redisplay next time through runLoop |
430 |
|
// Or, use a direct method. e.g. |
431 |
< |
// [screen cgDrawInto: ...]; |
431 |
> |
// [screen display] or [screen cgDrawInto: ...]; |
432 |
|
} |
433 |
|
|
434 |
|
#include <main.h> // For #define INTFLAG_60HZ |