| 506 | } |
| 507 | |
| 508 | int sys_command_open (int unitnum) |
| 509 | { |
| 510 | struct blkdevstate *st = &state[unitnum]; |
| 511 | blkdev_fix_prefs (&currprefs); |
| 512 | if (!dev_init) { |
| 513 | device_func_init (0); |
| 514 | } |
| 515 | |
| 516 | if (st->isopen) { |
| 517 | st->isopen++; |
| 518 | return -1; |
| 519 | } |
| 520 | st->waspaused = 0; |
| 521 | int v = sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name[0] ? currprefs.cdslots[unitnum].name : NULL, CD_STANDARD_UNIT_DEFAULT); |
| 522 | if (!v) |
| 523 | return 0; |
| 524 | #ifdef RETROPLATFORM |
| 525 | rp_cd_device_enable (unitnum, true); |
| 526 | #endif |
| 527 | return v; |
| 528 | } |
| 529 | |
| 530 | void sys_command_close (int unitnum) |
| 531 | { |
no test coverage detected