--- hatari/src/gui-osx/SDLMain.m 2019/04/01 07:13:04 1.1 +++ hatari/src/gui-osx/SDLMain.m 2019/04/09 08:47:12 1.1.1.5 @@ -97,8 +97,9 @@ static BOOL gFinderLaunch; size_t cbPath = strlen(constSzPath) + 1; char szPath[cbPath]; strncpy(szPath, constSzPath, cbPath); - - Floppy_InsertDiskIntoDrive(0, szPath); + + Floppy_SetDiskFileName(0, szPath, NULL); + Floppy_InsertDiskIntoDrive(0); } } @@ -121,7 +122,8 @@ static BOOL gFinderLaunch; char szPath[cbPath]; strncpy(szPath, constSzPath, cbPath); - Floppy_InsertDiskIntoDrive(1, szPath); + Floppy_SetDiskFileName(1, szPath, NULL); + Floppy_InsertDiskIntoDrive(1); } } @@ -153,28 +155,28 @@ static BOOL gFinderLaunch; - (IBAction)captureScreen:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); + GuiOsx_Pause(); ScreenSnapShot_SaveScreen(); - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Resume(); } - (IBAction)captureAnimation:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); - ScreenSnapShot_BeginRecording(DialogParams.Screen.bCaptureChange, 25); - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Pause(); + ScreenSnapShot_BeginRecording(ConfigureParams.Screen.bCaptureChange); + GuiOsx_Resume(); } - (IBAction)endCaptureAnimation:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); + GuiOsx_Pause(); ScreenSnapShot_EndRecording(); - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Resume(); } - (IBAction)captureSound:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); + GuiOsx_Pause(); // Get the path from the user settings NSString *preferredPath = [[NSString stringWithCString:(ConfigureParams.Sound.szYMCaptureFileName)] stringByAbbreviatingWithTildeInPath]; @@ -214,19 +216,19 @@ static BOOL gFinderLaunch; Sound_BeginRecording(ConfigureParams.Sound.szYMCaptureFileName); } - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Resume(); } - (IBAction)endCaptureSound:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); + GuiOsx_Pause(); Sound_EndRecording(); - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Resume(); } - (IBAction)saveMemorySnap:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); + GuiOsx_Pause(); // Get the path from the user settings NSString *preferredPath = [[NSString stringWithCString:(ConfigureParams.Memory.szMemoryCaptureFileName)] stringByAbbreviatingWithTildeInPath]; @@ -261,15 +263,15 @@ static BOOL gFinderLaunch; GuiOsx_ExportPathString(path, ConfigureParams.Memory.szMemoryCaptureFileName, sizeof(ConfigureParams.Memory.szMemoryCaptureFileName)); // Perform the memory snapshot save - MemorySnapShot_Capture(ConfigureParams.Memory.szMemoryCaptureFileName); + MemorySnapShot_Capture(ConfigureParams.Memory.szMemoryCaptureFileName, TRUE); } - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Resume(); } - (IBAction)restoreMemorySnap:(id)sender { - GuiOsx_PauseAndSwitchToCocoaUI(); + GuiOsx_Pause(); // Create and configure an OpenPanel NSOpenPanel *openPanel = [NSOpenPanel openPanel]; @@ -301,10 +303,10 @@ static BOOL gFinderLaunch; NSString *path = [[openPanel filenames] objectAtIndex:0]; // Perform the memory snapshot load - MemorySnapShot_Restore([path cString]); + MemorySnapShot_Restore([path cString], TRUE); } - GuiOsx_ResumeFromCocoaUI(); + GuiOsx_Resume(); } - (IBAction)doFullScreen:(id)sender @@ -325,12 +327,7 @@ static BOOL gFinderLaunch; - (IBAction)help:(id)sender { - [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://hatari.sourceforge.net/"]]; - /* - NSRunAlertPanel (@"Help", - @"Sorry, there is no built-in help available.\n\nPlease visit http://hatari.sourceforge.net/ for more information.\n\n", - @"OK", nil, nil); - */ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://hatari.berlios.de/"]]; }