From: Toni Wilen Date: Tue, 4 Dec 2018 17:56:59 +0000 (+0200) Subject: cdimagex: empty string, "empty" and "." = eject. floppyx: "." = eject. X-Git-Tag: 4100~3 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1dffb6e37b84300e6185d3ed56a7165ceabd290e;p=francis%2Fwinuae.git cdimagex: empty string, "empty" and "." = eject. floppyx: "." = eject. --- diff --git a/cfgfile.cpp b/cfgfile.cpp index 4e0f7ad8..314729b2 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -3082,6 +3082,10 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) *next2++ = 0; cfgfile_intval (option, next, tmp, &unitnum, 1); } + if (value[0] == 0 || !_tcsicmp(value, _T("empty")) || !_tcscmp(value, _T("."))) { + value[0] = 0; + p->cdslots[i].name[0] = 0; + } if (_tcslen (value) > 0) { _tcsncpy (p->cdslots[i].name, value, sizeof p->cdslots[i].name / sizeof (TCHAR)); } @@ -5594,8 +5598,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH for (i = 0; i < 4; i++) { _stprintf (tmpbuf, _T("floppy%d"), i); - if (cfgfile_string(option, value, tmpbuf, p->floppyslots[i].df, sizeof p->floppyslots[i].df / sizeof(TCHAR))) + if (cfgfile_string(option, value, tmpbuf, p->floppyslots[i].df, sizeof p->floppyslots[i].df / sizeof(TCHAR))) { + if (!_tcscmp(p->floppyslots[i].df, _T("."))) + p->floppyslots[i].df[0] = 0; return 1; + } } if (cfgfile_intval (option, value, _T("chipmem_size"), &dummyint, 1)) {