| version 1.13, 2005/03/20 13:12:50 | version 1.17, 2007/01/08 07:52:01 | 
| Line 42  static const TCHAR sasiui_filter[] = | Line 42  static const TCHAR sasiui_filter[] = | 
 | _T("*.thd;*.nhd;*.hdi\0"); | _T("*.thd;*.nhd;*.hdi\0"); | 
 | static const FILESEL sasiui = {sasiui_title, tchar_thd, sasiui_filter, 4}; | static const FILESEL sasiui = {sasiui_title, tchar_thd, sasiui_filter, 4}; | 
 |  |  | 
 |  | #if defined(SUPPORT_IDEIO) | 
 |  | static const TCHAR isoui_title[] = _T("Select ISO-9660 image"); | 
 |  | static const TCHAR tchar_iso[] = _T("iso"); | 
 |  | static const TCHAR isoui_filter[] =                                                                             \ | 
 |  | _T("Cue sheets\0")                                                                              \ | 
 |  | _T("*.cue\0")                                                   \ | 
 |  | _T("ISO-9660 image files\0")                                                    \ | 
 |  | _T("*.iso;*.img\0")                                             \ | 
 |  | _T("All supported Files\0")                                                             \ | 
 |  | _T("*.cue;*.iso;*.img\0")                               \ | 
 |  | _T("All Files\0")                                                                               \ | 
 |  | _T("*.*\0"); | 
 |  | static const FILESEL isoui = {isoui_title, tchar_iso, isoui_filter, 3}; | 
 |  | #endif | 
 |  |  | 
 | #if defined(SUPPORT_SCSI) | #if defined(SUPPORT_SCSI) | 
 | static const TCHAR scsiui_title[] = _T("Select SCSI HDD image"); | static const TCHAR scsiui_title[] = _T("Select SCSI HDD image"); | 
 | static const TCHAR scsiui_filter[] =                                                                    \ | static const TCHAR scsiui_filter[] =                                                                    \ | 
| Line 107  const OEMCHAR *p; | Line 122  const OEMCHAR *p; | 
 | const FILESEL   *hddui; | const FILESEL   *hddui; | 
 | OEMCHAR         path[MAX_PATH]; | OEMCHAR         path[MAX_PATH]; | 
 |  |  | 
 |  | p = diskdrv_getsxsi(drv); | 
 | num = drv & 0x0f; | num = drv & 0x0f; | 
 | p = NULL; |  | 
 | hddui = NULL; | hddui = NULL; | 
 | if (!(drv & 0x20)) {            // SASI/IDE | if (!(drv & 0x20)) {            // SASI/IDE | 
 | if (num < 2) { | if (num < 2) { | 
 | p = np2cfg.sasihdd[num]; |  | 
 | hddui = &sasiui; | hddui = &sasiui; | 
 | } | } | 
 |  | #if defined(SUPPORT_IDEIO) | 
 |  | else if (num == 2) { | 
 |  | hddui = &isoui; | 
 |  | } | 
 |  | #endif | 
 | } | } | 
 | #if defined(SUPPORT_SCSI) | #if defined(SUPPORT_SCSI) | 
 | else {                                          // SCSI | else {                                          // SCSI | 
 | if (num < 4) { | if (num < 4) { | 
 | p = np2cfg.scsihdd[num]; |  | 
 | hddui = &scsiui; | hddui = &scsiui; | 
 | } | } | 
 | } | } | 
| Line 127  const FILESEL *hddui; | Line 145  const FILESEL *hddui; | 
 | if (hddui == NULL) { | if (hddui == NULL) { | 
 | return; | return; | 
 | } | } | 
| if (p[0] == '\0') { | if ((p == NULL) || (p[0] == '\0')) { | 
 | p = hddfolder; | p = hddfolder; | 
 | } | } | 
 | file_cpyname(path, p, NELEMENTS(path)); | file_cpyname(path, p, NELEMENTS(path)); | 
| Line 333  const OEMCHAR *ext; | Line 351  const OEMCHAR *ext; | 
 | if (!dlgs_selectwritefile(hWnd, &newdiskui, path, NELEMENTS(path))) { | if (!dlgs_selectwritefile(hWnd, &newdiskui, path, NELEMENTS(path))) { | 
 | return; | return; | 
 | } | } | 
| hinst = (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE); | hinst = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE); | 
 | ext = file_getext(path); | ext = file_getext(path); | 
 | if (!file_cmpname(ext, str_thd)) { | if (!file_cmpname(ext, str_thd)) { | 
 | hddsize = 0; | hddsize = 0; |