Indentation corrections in disk.cpp
This commit is contained in:
parent
d870c6cea4
commit
6c26fcf631
1 changed files with 144 additions and 136 deletions
20
src/disk.cpp
20
src/disk.cpp
|
@ -679,8 +679,6 @@ static void reset_drive(int num)
|
|||
/* code for track display */
|
||||
static void update_drive_gui(int num, bool force)
|
||||
{
|
||||
if (num >= currprefs.nr_floppies)
|
||||
return;
|
||||
drive* drv = floppy + num;
|
||||
bool writ = dskdmaen == DSKDMA_WRITE && drv->state && !((selected | disabled) & (1 << num));
|
||||
struct gui_info_drive* gid = &gui_data.drives[num];
|
||||
|
@ -998,6 +996,10 @@ static bool diskfile_iswriteprotect (struct uae_prefs *p, const TCHAR *fname_in,
|
|||
*needwritefile = 1;
|
||||
return wrprot2;
|
||||
}
|
||||
if (strncmp ((uae_char*) buffer, "SCP", 3) == 0) {
|
||||
*needwritefile = 1;
|
||||
return wrprot2;
|
||||
}
|
||||
if (strncmp((uae_char *)buffer, "Formatted Disk Image file", 25) == 0) {
|
||||
*needwritefile = 1;
|
||||
return wrprot2;
|
||||
|
@ -2297,6 +2299,8 @@ static void drive_write_data (drive * drv)
|
|||
return;
|
||||
case ADF_IPF:
|
||||
break;
|
||||
case ADF_SCP:
|
||||
break;
|
||||
case ADF_PCDOS:
|
||||
ret = drive_write_pcdos (drv, drv->diskfile, 0);
|
||||
if (ret < 0)
|
||||
|
@ -2707,7 +2711,8 @@ void DISK_select (uae_u8 data)
|
|||
if ((prev_data & 0x80) == 0 || (data & 0x80) == 0) {
|
||||
/* motor off: if motor bit = 0 in prevdata or data -> turn motor on */
|
||||
drive_motor(drv, 0);
|
||||
} else if (prev_data & 0x80) {
|
||||
}
|
||||
else if (prev_data & 0x80) {
|
||||
/* motor on: if motor bit = 1 in prevdata only (motor flag state in data has no effect)
|
||||
-> turn motor off */
|
||||
drive_motor(drv, 1);
|
||||
|
@ -2746,12 +2751,14 @@ uae_u8 DISK_status_ciaa(void)
|
|||
if (drive_running(drv)) {
|
||||
if (drv->dskready && !drv->indexhack && currprefs.floppyslots[dr].dfxtype != DRV_35_DD_ESCOM)
|
||||
st &= ~0x20;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (currprefs.cs_df0idhw || dr > 0) {
|
||||
/* report drive ID */
|
||||
if (drv->idbit && currprefs.floppyslots[dr].dfxtype != DRV_35_DD_ESCOM)
|
||||
st &= ~0x20;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* non-ID internal drive: mirror real dskready */
|
||||
if (drv->dskready)
|
||||
st &= ~0x20;
|
||||
|
@ -2767,7 +2774,8 @@ uae_u8 DISK_status_ciaa(void)
|
|||
if (drv->dskchange && currprefs.floppyslots[dr].dfxtype != DRV_525_SD) {
|
||||
st &= ~4;
|
||||
}
|
||||
} else if (!((selected | disabled) & (1 << dr))) {
|
||||
}
|
||||
else if (!((selected | disabled) & (1 << dr))) {
|
||||
if (drv->idbit)
|
||||
st &= ~0x20;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue