[Scummvm-cvs-logs] CVS: scummvm/backends/dc DCLauncherDialog.h,NONE,1.1 dcmain.cpp,1.26,1.27

Marcus Comstedt marcus_c at users.sourceforge.net
Thu Aug 26 14:52:09 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/dc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6824/backends/dc

Modified Files:
	dcmain.cpp 
Added Files:
	DCLauncherDialog.h 
Log Message:
Run the DC launcher from inside the regular main() function.

--- NEW FILE: DCLauncherDialog.h ---
/* ScummVM - Scumm Interpreter
 * Dreamcast port
 * Copyright (C) 2002-2004  Marcus Comstedt
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/backends/dc/DCLauncherDialog.h,v 1.1 2004/08/26 21:51:26 marcus_c Exp $
 *
 */

class DCLauncherDialog {
 private:
  GameDetector &_detector;

 public:
  DCLauncherDialog(GameDetector &d) : _detector(d) {}
  int runModal();
};


Index: dcmain.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/dcmain.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- dcmain.cpp	14 Mar 2004 22:16:22 -0000	1.26
+++ dcmain.cpp	26 Aug 2004 21:51:26 -0000	1.27
@@ -30,6 +30,7 @@
 #include <base/plugins.h>
 #include "dc.h"
 #include "icon.h"
+#include "DCLauncherDialog.h"
 
 
 Icon icon;
@@ -202,20 +203,27 @@
 extern "C" int scummvm_main(int argc, char *argv[]);
 int main()
 {
-  static char *argv[] = { "scummvm", NULL, NULL, NULL };
-  static int argc = 3;
+  static char *argv[] = { "scummvm", NULL, };
+  static int argc = 1;
 
   dc_init_hardware();
   initSound();
 
-  PluginManager::instance().loadPlugins();
+  scummvm_main(argc, argv);
+
+  exit(0);
+}
+
+int DCLauncherDialog::runModal()
+{
+  static char *argv[] = { "scummvm", NULL, NULL, NULL };
+  static int argc = 3;
 
   if(!selectGame(argv[2], argv[1], icon))
     exit(0);
 
-  PluginManager::instance().unloadPlugins();
-
-  scummvm_main(argc, argv);
+  _detector.parseCommandLine(argc, argv);
 
-  exit(0);
+  return 0;
 }
+





More information about the Scummvm-git-logs mailing list