ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/AmigaOS/prefs_editor_amiga.cpp
(Generate patch)

Comparing BasiliskII/src/AmigaOS/prefs_editor_amiga.cpp (file contents):
Revision 1.14 by cebix, 2001-01-04T19:50:22Z vs.
Revision 1.16 by cebix, 2001-05-24T14:31:07Z

# Line 1 | Line 1
1   /*
2   *  prefs_editor_amiga.cpp - Preferences editor, AmigaOS implementation (using gtlayout.library)
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2001 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 94 | Line 94 | const int GAD_SCSI3_UNIT = 0x0413;
94   const int GAD_SCSI4_UNIT = 0x0414;
95   const int GAD_SCSI5_UNIT = 0x0415;
96   const int GAD_SCSI6_UNIT = 0x0416;
97 + const int GAD_SCSI_MEMTYPE = 0x0420;
98  
99   const int GAD_VIDEO_TYPE = 0x0500;                      // "Graphics/Sound" pane
100   const int GAD_DISPLAY_X = 0x0501;
# Line 362 | Line 363 | bool PrefsEditor(void)
363                                                          }
364                                                          break;
365  
366 +                                                case GAD_SCSI_MEMTYPE:
367 +                                                        PrefsReplaceInt32("scsimemtype", code);
368 +                                                        break;
369 +
370                                                  case GAD_VIDEO_TYPE:
371                                                          ghost_graphics_gadgets(h);
372                                                          break;
# Line 1087 | Line 1092 | static void create_volumes_pane(struct L
1092  
1093   static char scsi_dev[6][256];
1094   static LONG scsi_unit[6];
1095 + static LONG scsi_memtype;
1096  
1097   // Read SCSI preferences
1098   static void parse_scsi_prefs(void)
# Line 1101 | Line 1107 | static void parse_scsi_prefs(void)
1107                  if (str)
1108                          sscanf(str, "%[^/]/%ld", scsi_dev[i], &scsi_unit[i]);
1109          }
1110 +
1111 +        scsi_memtype = PrefsFindInt32("scsimemtype");
1112   }
1113  
1114   // Read settings from gadgets and set preferences
# Line 1125 | Line 1133 | static void create_scsi_pane(struct Layo
1133          parse_scsi_prefs();
1134  
1135          VGROUP;
1136 <                for (int i=0; i<7; i++) {
1137 <                        HGROUP;
1138 <                                LT_New(h, LA_Type, TEXT_KIND,
1139 <                                        LA_LabelID, STR_SCSI_ID_0 + i,
1140 <                                        TAG_END
1141 <                                );
1142 <                                LT_New(h, LA_Type, STRING_KIND,
1143 <                                        LA_LabelID, STR_DEVICE_CTRL,
1144 <                                        LA_ID, GAD_SCSI0_DEVICE + i,
1145 <                                        LA_Chars, 20,
1146 <                                        LA_STRPTR, (ULONG)scsi_dev[i],
1147 <                                        GTST_MaxChars, sizeof(scsi_dev[i]) - 1,
1148 <                                        LAST_Picker, TRUE,
1149 <                                        TAG_END
1150 <                                );
1151 <                                LT_New(h, LA_Type, INTEGER_KIND,
1152 <                                        LA_LabelID, STR_UNIT_CTRL,
1153 <                                        LA_ID, GAD_SCSI0_UNIT + i,
1154 <                                        LA_Chars, 4,
1155 <                                        LA_LONG, (ULONG)&scsi_unit[i],
1156 <                                        LAIN_UseIncrementers, TRUE,
1157 <                                        GTIN_MaxChars, 8,
1158 <                                        TAG_END
1159 <                                );
1160 <                        ENDGROUP;
1161 <                }
1136 >                LT_New(h, LA_Type, VERTICAL_KIND,
1137 >                        LA_LabelID, STR_SCSI_DEVICES_CTRL,
1138 >                        TAG_END
1139 >                );
1140 >                        for (int i=0; i<7; i++) {
1141 >                                HGROUP;
1142 >                                        LT_New(h, LA_Type, TEXT_KIND,
1143 >                                                LA_LabelID, STR_SCSI_ID_0 + i,
1144 >                                                TAG_END
1145 >                                        );
1146 >                                        LT_New(h, LA_Type, STRING_KIND,
1147 >                                                LA_LabelID, STR_DEVICE_CTRL,
1148 >                                                LA_ID, GAD_SCSI0_DEVICE + i,
1149 >                                                LA_Chars, 20,
1150 >                                                LA_STRPTR, (ULONG)scsi_dev[i],
1151 >                                                GTST_MaxChars, sizeof(scsi_dev[i]) - 1,
1152 >                                                LAST_Picker, TRUE,
1153 >                                                TAG_END
1154 >                                        );
1155 >                                        LT_New(h, LA_Type, INTEGER_KIND,
1156 >                                                LA_LabelID, STR_UNIT_CTRL,
1157 >                                                LA_ID, GAD_SCSI0_UNIT + i,
1158 >                                                LA_Chars, 4,
1159 >                                                LA_LONG, (ULONG)&scsi_unit[i],
1160 >                                                LAIN_UseIncrementers, TRUE,
1161 >                                                GTIN_MaxChars, 8,
1162 >                                                TAG_END
1163 >                                        );
1164 >                                ENDGROUP;
1165 >                        }
1166 >                ENDGROUP;
1167 >                VGROUP;
1168 >                        LT_New(h, LA_Type, CYCLE_KIND,
1169 >                                LA_LabelID, STR_SCSI_MEMTYPE_CTRL,
1170 >                                LA_ID, GAD_SCSI_MEMTYPE,
1171 >                                LACY_FirstLabel, STR_MEMTYPE_CHIP_LAB,
1172 >                                LACY_LastLabel, STR_MEMTYPE_ANY_LAB,
1173 >                                LA_LONG, (ULONG)&scsi_memtype,
1174 >                                TAG_END
1175 >                        );
1176 >                ENDGROUP;
1177          ENDGROUP;
1178   }
1179  
# Line 1166 | Line 1189 | enum {
1189          DISPLAY_SCREEN
1190   };
1191  
1192 < static BYTE display_type;
1192 > static LONG display_type;
1193   static LONG dis_width, dis_height;
1194   static ULONG mode_id;
1195   static BYTE frameskip_num;
# Line 1210 | Line 1233 | static void parse_graphics_prefs(void)
1233  
1234          const char *str = PrefsFindString("screen");
1235          if (str) {
1236 <                if (sscanf(str, "win/%d/%d", &dis_width, &dis_height) == 2)
1236 >                if (sscanf(str, "win/%ld/%ld", &dis_width, &dis_height) == 2)
1237                          display_type = DISPLAY_WINDOW;
1238 <                else if (sscanf(str, "pip/%d/%d", &dis_width, &dis_height) == 2)
1238 >                else if (sscanf(str, "pip/%ld/%ld", &dis_width, &dis_height) == 2)
1239                          display_type = DISPLAY_PIP;
1240                  else if (sscanf(str, "scr/%08lx", &mode_id) == 1)
1241                          display_type = DISPLAY_SCREEN;
# Line 1368 | Line 1391 | static void create_graphics_pane(struct
1391                                  LA_LabelID, STR_VIDEO_TYPE_CTRL,
1392                                  LA_ID, GAD_VIDEO_TYPE,
1393                                  LACY_LabelTable, (ULONG)labels,
1394 <                                LA_BYTE, (ULONG)&display_type,
1394 >                                LA_LONG, (ULONG)&display_type,
1395                                  TAG_END
1396                          );
1397                          LT_New(h, LA_Type, INTEGER_KIND,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines