From edda6875ff51b858d0d0e38f6198512207492c1c Mon Sep 17 00:00:00 2001
From: Chad Powell <pxpx@usa.net>
Date: Wed, 21 Oct 1998 16:03:16 +0000
Subject: [PATCH] Added a default program option in wine.conf in section
 [programs] key Default.

---
 miscemu/main.c | 10 +++++++++-
 wine.ini       |  4 ++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/miscemu/main.c b/miscemu/main.c
index b77a34fdd16..4ff9b2db253 100644
--- a/miscemu/main.c
+++ b/miscemu/main.c
@@ -47,7 +47,7 @@ BOOL32 MAIN_EmulatorInit(void)
 int main( int argc, char *argv[] )
 {
     extern char * DEBUG_argv0;
-    char startProg[256];
+    char startProg[256], defProg[256];
     int i,loaded;
     HINSTANCE32 handle;
 
@@ -87,6 +87,14 @@ int main( int argc, char *argv[] )
 
     loaded=0;
     
+    /* Add the Default Program if no program on the command line */
+    if (!argv[1])
+    {
+        PROFILE_GetWineIniString( "programs", "Default", "",
+                                  defProg, sizeof(defProg) );
+        if (defProg[0]) argv[argc++] = defProg;
+    }
+    
     /* Add the Startup Program to the run list */
     PROFILE_GetWineIniString( "programs", "Startup", "", 
 			       startProg, sizeof(startProg) );
diff --git a/wine.ini b/wine.ini
index 60beafbef49..9c7a69fda7d 100644
--- a/wine.ini
+++ b/wine.ini
@@ -78,3 +78,7 @@ Exclude=WM_SIZE;WM_TIMER;
 [Tweak.Layout]
 ;; WineLook=xxx  (supported styles are 'Win31'(default), 'Win95', 'Win98')
 ;WineLook=Win95
+
+[programs]
+Default=
+Startup=
\ No newline at end of file
-- 
GitLab