~ubuntu-branches/debian/sid/stella/sid

« back to all changes in this revision

Viewing changes to src/common/mainSDL.cxx

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2012-06-02 07:33:16 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120602073316-20r4hr32t4oj36u9
Tags: 3.7-1
* New upstream version.
* Update description and documentation with new features in 3.7, notably
  Blargg TV filters (replacing the filters available in versions 3.4.1
  and earlier).
* Switch to debhelper compatibility level 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
// See the file "License.txt" for information on usage and redistribution of
15
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
16
//
17
 
// $Id: mainSDL.cxx 2333 2012-01-04 14:54:21Z stephena $
 
17
// $Id: mainSDL.cxx 2477 2012-05-16 20:52:33Z stephena $
18
18
//============================================================================
19
19
 
20
20
#include <SDL.h>
66
66
int Cleanup()
67
67
{
68
68
  theOSystem->logMessage("Cleanup from mainSDL\n", 2);
 
69
  theOSystem->saveConfig();
69
70
 
70
71
  if(theOSystem)
71
72
    delete theOSystem;
103
104
  #error Unsupported platform!
104
105
#endif
105
106
 
106
 
  theOSystem->settings().loadConfig();
 
107
  theOSystem->loadConfig();
107
108
  theOSystem->logMessage("Loading config options ...\n", 2);
108
109
 
109
110
  // Take care of commandline arguments
137
138
  {
138
139
    theOSystem->logMessage("Showing output from 'rominfo' ...\n", 2);
139
140
    FilesystemNode romnode(romfile);
140
 
    if(argc > 1 && romnode.exists() && !romnode.isDirectory())
 
141
    if(argc > 1 && romnode.exists() && romnode.isFile())
141
142
      theOSystem->logMessage(theOSystem->getROMInfo(romfile), 0);
142
143
    else
143
144
      theOSystem->logMessage("ERROR: ROM doesn't exist\n", 0);
171
172
  if(romfile == "" || romnode.isDirectory())
172
173
  {
173
174
    theOSystem->logMessage("Attempting to use ROM launcher ...\n", 2);
174
 
    if(theOSystem->settings().getBool("uselauncher"))
175
 
    {
176
 
      bool launcherOpened = romfile != "" ?
177
 
        theOSystem->createLauncher(romnode.getPath()) : theOSystem->createLauncher();
178
 
      if(!launcherOpened)
179
 
        return Cleanup();
180
 
    }
181
 
    else
 
175
    bool launcherOpened = romfile != "" ?
 
176
      theOSystem->createLauncher(romnode.getPath()) : theOSystem->createLauncher();
 
177
    if(!launcherOpened)
182
178
    {
183
179
      theOSystem->logMessage("Launcher could not be started, showing usage\n", 2);
184
180
      theOSystem->settings().usage();