--- BasiliskII/src/AmigaOS/prefs_editor_amiga.cpp 2000/08/20 14:08:42 1.11 +++ BasiliskII/src/AmigaOS/prefs_editor_amiga.cpp 2000/09/04 16:30:47 1.12 @@ -27,7 +27,7 @@ #include #include #include -#include // jl +#include #include #include #include @@ -38,7 +38,7 @@ #include #include #include -#include // jl +#include #include #include "sysdeps.h" @@ -533,7 +533,7 @@ quit: FreeAslRequest(dev_request); FreeAslRequest(file_request); - // Delete Menus jl + // Delete Menus LT_DisposeMenu(menu); // Delete handle @@ -1271,24 +1271,21 @@ static void screen_mode_req(struct Windo ULONG id; - if (CyberGfxBase) - { + // Try P96 first, because it also provides a (fake) cybergraphics.library + if (P96Base) { + id = p96RequestModeIDTags( + P96MA_MinDepth, 8, + P96MA_FormatsAllowed, RGBFF_CLUT | RGBFF_R5G5B5 | RGBFF_A8R8G8B8, + TAG_END + ); + } else { UWORD ModelArray[] = { PIXFMT_LUT8, PIXFMT_RGB15, PIXFMT_ARGB32, 0, ~0 }; - id = (ULONG) CModeRequestTags(NULL, CYBRMREQ_MinDepth, 8, CYBRMREQ_CModelArray, (ULONG) ModelArray, TAG_END - ); - } - else - { - id = p96RequestModeIDTags( - P96MA_MinDepth, 8, - P96MA_FormatsAllowed, RGBFF_CLUT | RGBFF_R5G5B5 | RGBFF_A8R8G8B8, - TAG_END ); - } + } LT_UnlockWindow(win); if (id != INVALID_ID) { @@ -1469,13 +1466,11 @@ static void parse_serial_prefs(void) ether_unit = 0; const char *str = PrefsFindString("ether"); - if (str) - { + if (str) { const char *FirstSlash = strchr(str, '/'); const char *LastSlash = strrchr(str, '/'); - if (FirstSlash && FirstSlash && FirstSlash != LastSlash) - { + if (FirstSlash && FirstSlash && FirstSlash != LastSlash) { // Device name contains path, i.e. "Networks/xyzzy.device" const char *lp = str; char *dp = ether_dev; @@ -1487,12 +1482,10 @@ static void parse_serial_prefs(void) sscanf(LastSlash, "/%ld", ðer_unit); // printf("dev=<%s> unit=%d\n", ether_dev, ether_unit); - } - else - { + } else { sscanf(str, "%[^/]/%ld", ether_dev, ðer_unit); - } } + } } // Set serial preference item