From cfe0e950c41ba3dfe3953be9236a14cf4d9af7b9 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 1 Sep 2020 23:52:58 -0400 Subject: [PATCH] set the current directory to the Application Support directory when launching mame. Eventually, application support directory will include bgfx, roms, etc. --- Ample/LaunchWindowController.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ample/LaunchWindowController.m b/Ample/LaunchWindowController.m index 22c5306..14b93f3 100644 --- a/Ample/LaunchWindowController.m +++ b/Ample/LaunchWindowController.m @@ -279,12 +279,12 @@ static NSString * JoinArguments(NSArray *argv) { NSTask *task = [NSTask new]; [task setExecutableURL: url]; [task setArguments: _args]; -#if 0 - // interferes w/ termination notification. - [task setTerminationHandler: ^(NSTask *t){ - - }]; -#endif + + if (![defaults boolForKey: kUseCustomMame]) { + // run in Application Support/Ample. + [task setCurrentDirectoryURL: SupportDirectory()]; + } + [LogWindowController controllerForTask: task]; }