From e739eeab8e1a9e2a3de57bb38691316ebd6d8c5d Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 3 Jul 2007 17:32:14 +0000 Subject: [PATCH] Autobooting of IMG and IMA files when given as first parameter (or dropped on the executable) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2912 --- src/shell/shell.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 2eccad01..4328a5f3 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell.cpp,v 1.85 2007-06-14 08:23:46 qbix79 Exp $ */ +/* $Id: shell.cpp,v 1.86 2007-07-03 17:32:14 qbix79 Exp $ */ #include #include @@ -400,12 +400,16 @@ public: autoexec[12].Install(std::string("MOUNT C \"") + buffer + "\""); autoexec[13].Install("C:"); upcase(name); - if(strstr(name,".BAT") == 0) { - autoexec[14].Install(name); - } else { + if(strstr(name,".BAT") != 0) { /* BATch files are called else exit will not work */ autoexec[14].Install(std::string("CALL ") + name); + } else if((strstr(name,".IMG") != 0) || (strstr(name,".IMA") !=0)) { + /* Boot image files */ + autoexec[14].Install(std::string("BOOT ") + name); + } else { + autoexec[14].Install(name); } + if(addexit) autoexec[15].Install("exit"); } }