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

Comparing Frodo4/Src/Prefs.cpp (file contents):
Revision 1.3 by cebix, 2003-07-09T13:51:13Z vs.
Revision 1.7 by cebix, 2004-01-14T17:26:29Z

# Line 1 | Line 1
1   /*
2   *  Prefs.cpp - Global preferences
3   *
4 < *  Frodo (C) 1994-1997,2002-2003 Christian Bauer
4 > *  Frodo (C) 1994-1997,2002-2004 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 43 | Line 43 | Prefs::Prefs()
43          BadLineCycles = 23;
44          CIACycles = 63;
45          FloppyCycles = 64;
46 <        SkipFrames = 2;
46 >        SkipFrames = 1;
47          LatencyMin = 80;
48          LatencyMax = 120;
49          LatencyAvg = 280;
50          ScalingNumerator = 2;
51          ScalingDenominator = 2;
52  
53        for (int i=0; i<4; i++)
54                DriveType[i] = DRVTYPE_DIR;
55
53          strcpy(DrivePath[0], "64prgs");
54          strcpy(DrivePath[1], "");
55          strcpy(DrivePath[2], "");
# Line 61 | Line 58 | Prefs::Prefs()
58          strcpy(ViewPort, "Default");
59          strcpy(DisplayMode, "Default");
60  
61 <        SIDType = SIDTYPE_NONE;
61 >        SIDType = SIDTYPE_DIGITAL;
62          REUSize = REU_NONE;
63          DisplayType = DISPTYPE_WINDOW;
64          Joystick1Port = 0;
# Line 106 | Line 103 | bool Prefs::operator==(const Prefs &rhs)
103                  && LatencyAvg == rhs.LatencyAvg
104                  && ScalingNumerator == rhs.ScalingNumerator
105                  && ScalingDenominator == rhs.ScalingNumerator
109                && DriveType[0] == rhs.DriveType[0]
110                && DriveType[1] == rhs.DriveType[1]
111                && DriveType[2] == rhs.DriveType[2]
112                && DriveType[3] == rhs.DriveType[3]
106                  && strcmp(DrivePath[0], rhs.DrivePath[0]) == 0
107                  && strcmp(DrivePath[1], rhs.DrivePath[1]) == 0
108                  && strcmp(DrivePath[2], rhs.DrivePath[2]) == 0
# Line 165 | Line 158 | void Prefs::Check(void)
158  
159          if (DisplayType < DISPTYPE_WINDOW || DisplayType > DISPTYPE_SCREEN)
160                  DisplayType = DISPTYPE_WINDOW;
168
169        for (int i=0; i<4; i++)
170                if (DriveType[i] < DRVTYPE_DIR || DriveType[i] > DRVTYPE_T64)
171                        DriveType[i] = DRVTYPE_DIR;
161   }
162  
163  
# Line 204 | Line 193 | void Prefs::Load(char *filename)
193                                          ScalingNumerator = atoi(value);
194                                  else if (!strcmp(keyword, "ScalingDenominator"))
195                                          ScalingDenominator = atoi(value);
207                                else if (!strcmp(keyword, "DriveType8"))
208                                        if (!strcmp(value, "DIR"))
209                                                DriveType[0] = DRVTYPE_DIR;
210                                        else if (!strcmp(value, "D64"))
211                                                DriveType[0] = DRVTYPE_D64;
212                                        else
213                                                DriveType[0] = DRVTYPE_T64;
214                                else if (!strcmp(keyword, "DriveType9"))
215                                        if (!strcmp(value, "DIR"))
216                                                DriveType[1] = DRVTYPE_DIR;
217                                        else if (!strcmp(value, "D64"))
218                                                DriveType[1] = DRVTYPE_D64;
219                                        else
220                                                DriveType[1] = DRVTYPE_T64;
221                                else if (!strcmp(keyword, "DriveType10"))
222                                        if (!strcmp(value, "DIR"))
223                                                DriveType[2] = DRVTYPE_DIR;
224                                        else if (!strcmp(value, "D64"))
225                                                DriveType[2] = DRVTYPE_D64;
226                                        else
227                                                DriveType[2] = DRVTYPE_T64;
228                                else if (!strcmp(keyword, "DriveType11"))
229                                        if (!strcmp(value, "DIR"))
230                                                DriveType[3] = DRVTYPE_DIR;
231                                        else if (!strcmp(value, "D64"))
232                                                DriveType[3] = DRVTYPE_D64;
233                                        else
234                                                DriveType[3] = DRVTYPE_T64;
196                                  else if (!strcmp(keyword, "DrivePath8"))
197                                          strcpy(DrivePath[0], value);
198                                  else if (!strcmp(keyword, "DrivePath9"))
# Line 334 | Line 295 | bool Prefs::Save(char *filename)
295                  fprintf(file, "LatencyAvg = %d\n", LatencyAvg);
296                  fprintf(file, "ScalingNumerator = %d\n", ScalingNumerator);
297                  fprintf(file, "ScalingDenominator = %d\n", ScalingDenominator);
298 <                for (int i=0; i<4; i++) {
338 <                        fprintf(file, "DriveType%d = ", i+8);
339 <                        switch (DriveType[i]) {
340 <                                case DRVTYPE_DIR:
341 <                                        fprintf(file, "DIR\n");
342 <                                        break;
343 <                                case DRVTYPE_D64:
344 <                                        fprintf(file, "D64\n");
345 <                                        break;
346 <                                case DRVTYPE_T64:
347 <                                        fprintf(file, "T64\n");
348 <                                        break;
349 <                        }
298 >                for (int i=0; i<4; i++)
299                          fprintf(file, "DrivePath%d = %s\n", i+8, DrivePath[i]);
351                }
300                  fprintf(file, "ViewPort = %s\n", ViewPort);
301                  fprintf(file, "DisplayMode = %s\n", DisplayMode);
302                  fprintf(file, "SIDType = ");
# Line 419 | Line 367 | bool Prefs::Save(char *filename)
367   #ifdef WIN32
368   #include "Prefs_WIN32.h"
369   #endif
370 +
371 + #ifdef HAVE_GLADE
372 + #include "Prefs_glade.h"
373 + #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines