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.11 by jlachmann, 2000-08-20T14:08:42Z vs.
Revision 1.14 by cebix, 2001-01-04T19:50:22Z

# Line 27 | Line 27
27   #include <libraries/asl.h>
28   #include <libraries/gtlayout.h>
29   #include <libraries/Picasso96.h>
30 < #include <cybergraphx/cybergraphics.h>  // jl
30 > #include <cybergraphics/cybergraphics.h>
31   #include <graphics/displayinfo.h>
32   #include <devices/ahi.h>
33   #include <proto/exec.h>
# Line 38 | Line 38
38   #include <proto/graphics.h>
39   #include <proto/asl.h>
40   #include <proto/Picasso96.h>
41 < #include <proto/cybergraphics.h>        // jl
41 > #include <proto/cybergraphics.h>
42   #include <proto/ahi.h>
43  
44   #include "sysdeps.h"
# Line 354 | Line 354 | bool PrefsEditor(void)
354                                                  case GAD_BOOTDRIVER:
355                                                          switch (code) {
356                                                                  case 0:
357 <                                                                        PrefsReplaceInt16("bootdriver", 0);
357 >                                                                        PrefsReplaceInt32("bootdriver", 0);
358                                                                          break;
359                                                                  case 1:
360 <                                                                        PrefsReplaceInt16("bootdriver", CDROMRefNum);
360 >                                                                        PrefsReplaceInt32("bootdriver", CDROMRefNum);
361                                                                          break;
362                                                          }
363                                                          break;
# Line 533 | Line 533 | quit:
533          FreeAslRequest(dev_request);
534          FreeAslRequest(file_request);
535  
536 <        // Delete Menus jl
536 >        // Delete Menus
537          LT_DisposeMenu(menu);
538  
539          // Delete handle
# Line 574 | Line 574 | static void parse_volumes_prefs(void)
574  
575          bootdriver_num = 0;
576  
577 <        int bootdriver = PrefsFindInt16("bootdriver");
577 >        int bootdriver = PrefsFindInt32("bootdriver");
578          switch (bootdriver) {
579                  case 0:
580                          bootdriver_num = 0;
# Line 1271 | Line 1271 | static void screen_mode_req(struct Windo
1271  
1272          ULONG id;
1273  
1274 <        if (CyberGfxBase)
1275 <                {
1274 >        // Try P96 first, because it also provides a (fake) cybergraphics.library
1275 >        if (P96Base) {
1276 >                id = p96RequestModeIDTags(
1277 >                        P96MA_MinDepth, 8,
1278 >                        P96MA_FormatsAllowed, RGBFF_CLUT | RGBFF_R5G5B5 | RGBFF_A8R8G8B8,
1279 >                        TAG_END
1280 >                );
1281 >        } else {
1282                  UWORD ModelArray[] = { PIXFMT_LUT8, PIXFMT_RGB15, PIXFMT_ARGB32, 0, ~0 };
1277
1283                  id = (ULONG) CModeRequestTags(NULL,
1284                          CYBRMREQ_MinDepth, 8,
1285                          CYBRMREQ_CModelArray, (ULONG) ModelArray,
1286                          TAG_END
1282                        );
1283                }
1284        else
1285                {
1286                id = p96RequestModeIDTags(
1287                        P96MA_MinDepth, 8,
1288                        P96MA_FormatsAllowed, RGBFF_CLUT | RGBFF_R5G5B5 | RGBFF_A8R8G8B8,
1289                        TAG_END
1287                  );
1288 <                }
1288 >        }
1289          LT_UnlockWindow(win);
1290  
1291          if (id != INVALID_ID) {
# Line 1469 | Line 1466 | static void parse_serial_prefs(void)
1466          ether_unit = 0;
1467  
1468          const char *str = PrefsFindString("ether");
1469 <        if (str)
1473 <                {
1469 >        if (str) {
1470                  const char *FirstSlash = strchr(str, '/');
1471                  const char *LastSlash = strrchr(str, '/');
1472  
1473 <                if (FirstSlash && FirstSlash && FirstSlash != LastSlash)
1478 <                        {
1473 >                if (FirstSlash && FirstSlash && FirstSlash != LastSlash) {
1474                          // Device name contains path, i.e. "Networks/xyzzy.device"
1475                          const char *lp = str;
1476                          char *dp = ether_dev;
# Line 1487 | Line 1482 | static void parse_serial_prefs(void)
1482                          sscanf(LastSlash, "/%ld", &ether_unit);
1483  
1484   //                      printf("dev=<%s> unit=%d\n", ether_dev, ether_unit);
1485 <                        }
1491 <                else
1492 <                        {
1485 >                } else {
1486                          sscanf(str, "%[^/]/%ld", ether_dev, &ether_unit);
1494                        }
1487                  }
1488 +        }
1489   }
1490  
1491   // Set serial preference item

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines