View Single Post
Old 28 January 2017, 20:51   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,482
I'm obviously making some mistake here, since WinUAE did detect the duplicate card reader entries in the log above. But in hardfile_win32.cpp (line 1288, parts removed for clarity), you do:
Code:
// Strip all trailing : characters from udi->device_name
while (_tcslen(udi->device_name) > 0 && udi->device_name[_tcslen(udi->device_name) - 1] == ':')
    udi->device_name[_tcslen(udi->device_name) - 1] = 0;

// Replace all : characters with _ in udi->device_name
for (int i = 0; i < _tcslen(udi->device_name); i++) {
    if (udi->device_name[i] == ':')
        udi->device_name[i] = '_';
}

// Copy udi->device_name string to orgname, prepended with a : character
_stprintf (orgname, _T(":%s"), udi->device_name);

// Compare each device_name string with that string. How can they ever
// match, since orgname begins with : but the device_name string won't???
for (i = 0; i < hdf_getnumharddrives (); i++) {
    if (!_tcscmp (uae_drives[i].device_name, orgname)) {
        write_log (_T("duplicate device, ignored\n"));
        return -2;
    }
}
mark_k is offline  
 
Page generated in 0.04609 seconds with 9 queries