summaryrefslogtreecommitdiff
path: root/pkg/osx
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/osx')
-rw-r--r--pkg/osx/Execute.m11
-rw-r--r--pkg/osx/LauncherManager.h1
-rw-r--r--pkg/osx/LauncherManager.m1
-rw-r--r--pkg/osx/Resources/launcher.nib/classes.nib1
-rw-r--r--pkg/osx/Resources/launcher.nib/info.nib2
-rw-r--r--pkg/osx/Resources/launcher.nib/keyedobjects.nibbin19494 -> 19616 bytes
6 files changed, 15 insertions, 1 deletions
diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m
index bb4eed45..608443e2 100644
--- a/pkg/osx/Execute.m
+++ b/pkg/osx/Execute.m
@@ -100,6 +100,7 @@ static void DoExec(const char *executable, const char *iwad, const char *args)
void ExecuteProgram(const char *executable, const char *iwad, const char *args)
{
pid_t childpid;
+ char *homedir;
childpid = fork();
@@ -107,6 +108,16 @@ void ExecuteProgram(const char *executable, const char *iwad, const char *args)
{
signal(SIGCHLD, SIG_DFL);
+ // Change directory to home dir before launch, so that any demos
+ // are saved somewhere sensible.
+
+ homedir = getenv("HOME");
+
+ if (homedir != NULL)
+ {
+ chdir(homedir);
+ }
+
DoExec(executable, iwad, args);
}
else
diff --git a/pkg/osx/LauncherManager.h b/pkg/osx/LauncherManager.h
index 76c74624..e454ab4f 100644
--- a/pkg/osx/LauncherManager.h
+++ b/pkg/osx/LauncherManager.h
@@ -32,6 +32,7 @@
IWADController *iwadController;
id launcherWindow;
+ id launchButton;
id commandLineArguments;
id packageLabel;
diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m
index ee7ed3dc..ae91ef4d 100644
--- a/pkg/osx/LauncherManager.m
+++ b/pkg/osx/LauncherManager.m
@@ -330,6 +330,7 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName)
[self->packageLabel setStringValue: @PACKAGE_STRING];
[self->launcherWindow setTitle: @PACKAGE_NAME " Launcher"];
[self->launcherWindow center];
+ [self->launcherWindow setDefaultButtonCell: [self->launchButton cell]];
[self setConfig];
}
diff --git a/pkg/osx/Resources/launcher.nib/classes.nib b/pkg/osx/Resources/launcher.nib/classes.nib
index 236f6b67..7efc837a 100644
--- a/pkg/osx/Resources/launcher.nib/classes.nib
+++ b/pkg/osx/Resources/launcher.nib/classes.nib
@@ -36,6 +36,7 @@
OUTLETS = {
commandLineArguments = id;
iwadController = id;
+ launchButton = id;
launcherWindow = id;
packageLabel = id;
};
diff --git a/pkg/osx/Resources/launcher.nib/info.nib b/pkg/osx/Resources/launcher.nib/info.nib
index 32b331f5..512ee6dd 100644
--- a/pkg/osx/Resources/launcher.nib/info.nib
+++ b/pkg/osx/Resources/launcher.nib/info.nib
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>484 105 612 260 0 0 1440 878 </string>
+ <string>325 73 612 260 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
diff --git a/pkg/osx/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/Resources/launcher.nib/keyedobjects.nib
index 4f078d7c..cc763056 100644
--- a/pkg/osx/Resources/launcher.nib/keyedobjects.nib
+++ b/pkg/osx/Resources/launcher.nib/keyedobjects.nib
Binary files differ