ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/main_x.h
(Generate patch)

Comparing Frodo4/Src/main_x.h (file contents):
Revision 1.5 by cebix, 2004-01-13T19:52:49Z vs.
Revision 1.9 by cebix, 2005-06-27T19:55:48Z

# Line 1 | Line 1
1   /*
2   *  main_x.h - Main program, Unix specific stuff
3   *
4 < *  Frodo (C) 1994-1997,2002-2004 Christian Bauer
4 > *  Frodo (C) 1994-1997,2002-2005 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 24 | Line 24
24   #include <gnome.h>
25   #endif
26  
27 + // Qtopia Windowing System
28 + #ifdef QWS
29 + extern "C" int main(int argc, char *argv[]);
30 + #include <SDL.h>
31 + #endif
32  
33   extern int init_graphics(void);
34  
# Line 47 | Line 52 | int main(int argc, char **argv)
52          gettimeofday(&tv, NULL);
53          srand(tv.tv_usec);
54  
55 <        printf("%s by Christian Bauer\n", VERSION_STRING);
55 > #ifndef HAVE_GLADE
56 >        printf(
57 >                "%s Copyright (C) 1994-1997,2002-2005 Christian Bauer\n"
58 >                "This is free software with ABSOLUTELY NO WARRANTY.\n"
59 >                , VERSION_STRING
60 >        );
61 > #endif
62          if (!init_graphics())
63                  return 1;
64          fflush(stdout);
# Line 102 | Line 113 | void Frodo::ReadyToRun(void)
113          ThePrefs.Load(prefs_path);
114  
115          // Show preferences editor
116 <        if (ThePrefs.ShowEditor(true, prefs_path)) {
116 > #ifdef HAVE_GLADE
117 >        if (!ThePrefs.ShowEditor(true, prefs_path))
118 >                return;
119 > #endif
120  
121 <                // Create and start C64
122 <                TheC64 = new C64;
123 <                load_rom_files();
124 <                TheC64->Run();
125 <                delete TheC64;
112 <        }
121 >        // Create and start C64
122 >        TheC64 = new C64;
123 >        load_rom_files();
124 >        TheC64->Run();
125 >        delete TheC64;
126   }
127  
128  
# Line 119 | Line 132 | Prefs *Frodo::reload_prefs(void)
132          newprefs.Load(prefs_path);
133          return &newprefs;
134   }
135 +
136 +
137 + /*
138 + *  Determine whether path name refers to a directory
139 + */
140 +
141 + bool IsDirectory(const char *path)
142 + {
143 +        struct stat st;
144 +        return stat(path, &st) == 0 && S_ISDIR(st.st_mode);
145 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines