}
pfd->GetOptions (&pfos);
pfos |= FOS_FORCEFILESYSTEM;
+ if (!(opn->Flags & OFN_FILEMUSTEXIST))
+ pfos &= ~FOS_FILEMUSTEXIST;
if (opn->Flags & OFN_ALLOWMULTISELECT)
pfos |= FOS_ALLOWMULTISELECT;
if (mode < 0)
defext = _T("uss");
break;
case 11:
+ case 19:
WIN32GUI_LoadUIString (IDS_SELECTFLASH, szTitle, MAX_DPATH);
WIN32GUI_LoadUIString (IDS_FLASH, szFormat, MAX_DPATH);
_stprintf (szFilter, _T("%s "), szFormat);
if (!(result = GetSaveFileName_2 (hDlg, &openFileName, guid)))
write_log (_T("GetSaveFileNameX() failed, err=%d.\n"), GetLastError ());
} else {
+ if (flag == 11 || flag == 19) {
+ openFileName.Flags &= ~OFN_FILEMUSTEXIST;
+ }
if (!(result = GetOpenFileName_2 (hDlg, &openFileName, guid)))
write_log (_T("GetOpenFileNameX() failed, err=%d.\n"), GetLastError ());
}
p += _tcslen(p) + 1;
}
int bits = 1;
- for (int i = 7; i >= 0; i--) {
- if (itemcnt & (1 << i)) {
+ for (int i = 0; i < 8; i++) {
+ if ((1 << i) >= itemcnt) {
bits = i;
break;
}
p += _tcslen(p) + 1;
}
int bits = 1;
- for (int i = 7; i >= 0; i--) {
- if (itemcnt & (1 << i)) {
+ for (int i = 0; i < 8; i++) {
+ if ((1 << i) >= itemcnt) {
bits = i;
break;
}
values_to_kickstartdlg (hDlg);
break;
case IDC_RTCCHOOSER:
- DiskSelection(hDlg, IDC_RTCFILE, 6, &workprefs, path);
+ DiskSelection(hDlg, IDC_RTCFILE, 19, &workprefs, path);
values_to_kickstartdlg (hDlg);
break;
case IDC_CARTCHOOSER:
ew (hDlg, f_enable, TRUE);
}
CheckDlgButton (hDlg, f_enable, state ? BST_CHECKED : BST_UNCHECKED);
+ TCHAR tmp[10];
+ if (n < 2 || nn - 1 < DRV_PC_ONLY_40) {
+ _stprintf(tmp, _T("DF%d:"), n);
+ } else {
+ int t = nn - 1 == DRV_PC_ONLY_40 ? 40 : 80;
+ _stprintf(tmp, _T("%c: (%d)"), n == 2 ? 'A' : 'B', t);
+ }
+ SetWindowText(GetDlgItem(hDlg, f_enable), tmp);
}
chk = !showcd && disk_getwriteprotect (&workprefs, text) && state == TRUE ? BST_CHECKED : 0;
if (f_wp >= 0)
SendDlgItemMessage (hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)ft35hd);
SendDlgItemMessage (hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)ft525sd);
SendDlgItemMessage (hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)ft35ddescom);
- if (i >= 2)
- SendDlgItemMessage(hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)_T("PC Bridge"));
+ if (i >= 2) {
+ SendDlgItemMessage(hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)_T("PC Bridge (40)"));
+ SendDlgItemMessage(hDlg, f_type, CB_ADDSTRING, 0, (LPARAM)_T("PC Bridge (80)"));
+ }
}
setmultiautocomplete (hDlg, df0texts);
}
return 0;
}
+static bool draghit(DWORD id, POINT pt)
+{
+ RECT r;
+ if (GetPanelRect(GetDlgItem(panelDlg, id), &r)) {
+ int extra = r.bottom - r.top;
+ r.top -= extra;
+ r.bottom += extra;
+ return PtInRect(&r, pt) != 0;
+ }
+ return false;
+}
+
int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage)
{
int cnt, i, drv, harddrive, drvdrag, firstdrv;
TCHAR file[MAX_DPATH];
TCHAR *filepart = NULL;
- int dfxtext[] = { IDC_DF0TEXT, IDC_DF0TEXTQ, IDC_DF1TEXT, IDC_DF1TEXTQ, IDC_DF2TEXT, -1, IDC_DF3TEXT, -1 };
+ const int dfxtext[] = { IDC_DF0TEXT, IDC_DF0TEXTQ, IDC_DF1TEXT, IDC_DF1TEXTQ, IDC_DF2TEXT, -1, IDC_DF3TEXT, -1 };
POINT pt;
RECT r, r2;
int ret = 0;
DWORD flags;
+ TCHAR *dragrompath = NULL;
DragQueryPoint (hd, &pt);
pt.y += GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER);
for (i = 0; i < 4; i++) {
int id = dfxtext[i * 2 + (currentpage == QUICKSTART_ID ? 1 : 0)];
if (workprefs.floppyslots[i].dfxtype >= 0 && id >= 0) {
- if (GetPanelRect (GetDlgItem (panelDlg, id), &r)) {
- if (PtInRect (&r, pt)) {
- drv = i;
- break;
- }
+ if (draghit(id, pt)) {
+ drv = i;
+ break;
}
}
}
+ } else if (currentpage == KICKSTART_ID) {
+ if (draghit(IDC_ROMFILE, pt)) {
+ dragrompath = prefs->romfile;
+ } else if (draghit(IDC_ROMFILE2, pt)) {
+ dragrompath = prefs->romextfile;
+ } else if (draghit(IDC_CARTFILE, pt)) {
+ dragrompath = prefs->cartfile;
+ } else if (draghit(IDC_FLASHFILE, pt)) {
+ dragrompath = prefs->flashfile;
+ } else if (draghit(IDC_RTCFILE, pt)) {
+ dragrompath = prefs->rtcfile;
+ }
+ } else if (currentpage == HARDDISK_ID) {
+ if (draghit(IDC_CD_TEXT, pt)) {
+ dragrompath = prefs->cdslots[0].name;
+ }
}
firstdrv = drv;
for (i = 0; i < cnt; i++) {
}
}
}
+ if (dragrompath && !(flags & FILE_ATTRIBUTE_DIRECTORY)) {
+ _tcscpy(dragrompath, file);
+ type = -2;
+ }
switch (type)
{
ret = 1;
break;
case ZFILE_CDIMAGE:
- _tcscpy (workprefs.cdslots[0].name, file);
+ _tcscpy (prefs->cdslots[0].name, file);
+ break;
+ case -2:
break;
default:
if (currentpage < 0 && !full_property_sheet) {
+Beta 5:
+
+- Added OMTI-Adapter HD controller, same as ALF1 but different hardware base address.
+- It was not possible to select HDF PCMCIA SRAM and IDE options.
+- Flash ROM file and RTC battery backed up RAM file dialog didn't allow creation of new files.
+- Made disk image dragndrop floppy drive hit box larger.
+- ROM panel drag drop over ROM paths will work as expected. Previously it was always autodetected
+ and "best" ROM path was selected. Now autodetection will be only used when dropped over empty space.
+- Harddrives panel CD path dragndrop update.
+- ProWizard written module files now include name of inserted disk in DF0: or CD image, like screenshot file names.
+
+x86 bridgeboard updates:
+- A2286 and A2386SX emulation implemented. CPU and FPU core, keyboard, interrupt controller and
+ more from DOSBox. A2386SX BIOS is still misdetecting things.
+- Floppy drive label is changed between DF2:<>A: and DF3:<>B: if configured as PC bridge drive.
+ (Note that if you don't configure any PC drives, you will get really slow BIOS floppy detection)
+- Added 40 track (5.25" 360k) and 80 track (all others) drive selection. This must match inserted image
+ or BIOS drive detection will get confused.
+- Always do full disk image size autodetection when disk is inserted in PC bridge drive. Without
+ it most dos disks was detected as undersized adf images.
+- A2286/A2386 CMOS RAM is stored to disk if ROM panel Flash RAM file path is set.
+- DOSBox CPU core type selectable in bridgeboard config GUI, also 8088-based bridgeboards
+ can be optinally configured to use DOSBox CPU core.
+
Beta 4:
- RTG<>chipset mode switching didn't check if modes have different filter type (forgot to add