--- uae/src/disk.c 2018/04/24 17:03:40 1.1.1.13 +++ uae/src/disk.c 2018/04/24 17:08:56 1.1.1.16 @@ -731,10 +731,12 @@ void DISK_check_change (void) for (i = 0; i < 4; i++) { drive *drv = floppy + i; + gui_lock (); if (strcmp (currprefs.df[i], changed_prefs.df[i])) { strcpy (currprefs.df[i], changed_prefs.df[i]); disk_insert (i, currprefs.df[i]); } + gui_unlock (); /* emulate drive motor turn on time */ if (drv->dskready_time) { drv->dskready_time--; @@ -864,7 +866,7 @@ static uae_u32 dskpt; static void disk_dmafinished (void) { INTREQ (0x8002); - dskdmaen = 1; /* surprise, it isn't set to zero! */ + dskdmaen = 0; /* ??? */ #ifdef DISK_DEBUG write_log("disk dma finished %08.8X\n", dskpt); #endif @@ -1338,8 +1340,9 @@ uae_u8 *restore_disk(int num,uae_u8 *src drv->drive_id_scnt = restore_u8 (); drv->mfmpos = restore_u32 (); restore_u32 (); - strncpy(currprefs.df[num],src,255); - src+=strlen(src)+1; + strncpy(changed_prefs.df[num],src,255); + changed_prefs.df[num][255] = 0; + src += strlen(src) + 1; return src; }