|
|
| version 1.2, 2005/02/26 03:59:50 | version 1.3, 2005/02/27 18:22:06 |
|---|---|
| Line 8 | Line 8 |
| #include "resource.h" | #include "resource.h" |
| #include "UFD.h" | #include "UFD.h" |
| #ifndef vfsVolumeAttrNonRemovable | |
| #define vfsVolumeAttrNonRemovable 0x00000008L | |
| #endif | |
| #define ByteSwap16(n) ( ((((unsigned int) n) << 8) & 0xFF00) | \ | #define ByteSwap16(n) ( ((((unsigned int) n) << 8) & 0xFF00) | \ |
| ((((unsigned int) n) >> 8) & 0x00FF) ) | ((((unsigned int) n) >> 8) & 0x00FF) ) |
| Line 613 UInt32 PilotMain(UInt16 cmd, void *cmdPB | Line 617 UInt32 PilotMain(UInt16 cmd, void *cmdPB |
| { | { |
| PealModule *m; | PealModule *m; |
| UInt32 volIterator = vfsIteratorStart; | UInt32 volIterator = vfsIteratorStart; |
| UInt16 vRef = vfsInvalidVolRef; | VolumeInfoType info; |
| FormType *frmP; | FormType *frmP; |
| Err err; | |
| int ret; | int ret; |
| const RGBColorType white = {0, 255, 255, 255}; | const RGBColorType white = {0, 255, 255, 255}; |
| Line 634 UInt32 PilotMain(UInt16 cmd, void *cmdPB | Line 637 UInt32 PilotMain(UInt16 cmd, void *cmdPB |
| WinSetBackColorRGB(&white, NULL); | WinSetBackColorRGB(&white, NULL); |
| while (volIterator != vfsIteratorStop) { | while (volIterator != vfsIteratorStop) { |
| err = VFSVolumeEnumerate(&volRefNum, &volIterator); | if (VFSVolumeEnumerate(&volRefNum, &volIterator) == errNone) { |
| if (err == errNone) { | if (VFSVolumeInfo(volRefNum, &info) == errNone) { |
| vRef = volRefNum; | if ((!info.attributes & vfsVolumeAttrHidden) && (!info.attributes & vfsVolumeAttrNonRemovable)) { |
| break; | |
| } | |
| } | |
| } | } |
| } | } |
| if ((volRefNum != vRef) && (vRef != vfsInvalidVolRef)) { | |
| volRefNum = vRef; | |
| } | |
| m = load(); | m = load(); |
| ret = setup(m); | ret = setup(m); |
| unload(m); | unload(m); |