File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -1293,16 +1293,21 @@ bool Disk::StartStop(const DWORD *cdb)
1293
1293
SetStopped (!start);
1294
1294
}
1295
1295
1296
- // Look at the eject bit and eject if necessary
1297
- if (load && !start) {
1298
- if (IsLocked ()) {
1299
- // Cannot be ejected because it is locked
1300
- SetStatusCode (STATUS_PREVENT);
1301
- return false ;
1302
- }
1296
+ if (!start) {
1297
+ // Flush the cache when stopping
1298
+ disk.dcache ->Save ();
1303
1299
1304
- // Eject
1305
- return Eject (false );
1300
+ // Look at the eject bit and eject if necessary
1301
+ if (load) {
1302
+ if (IsLocked ()) {
1303
+ // Cannot be ejected because it is locked
1304
+ SetStatusCode (STATUS_PREVENT);
1305
+ return false ;
1306
+ }
1307
+
1308
+ // Eject
1309
+ return Eject (false );
1310
+ }
1306
1311
}
1307
1312
1308
1313
return true ;
You can’t perform that action at this time.
0 commit comments