mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
ksys573.cpp: Workaround for segmentation fault when starting systems with fewer than two CD-ROMs
This commit is contained in:
parent
2aa80b9d07
commit
02faf3a3a1
@ -1107,8 +1107,11 @@ void ksys573_state::driver_start()
|
||||
m_atapi_timer = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( ksys573_state::atapi_xfer_end ),this ) );
|
||||
m_atapi_timer->adjust( attotime::never );
|
||||
|
||||
m_available_cdroms[ 0 ] = new cdrom_file(machine().rom_load().get_disk_handle(":cdrom0"));
|
||||
m_available_cdroms[ 1 ] = new cdrom_file(machine().rom_load().get_disk_handle(":cdrom1"));
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
chd_file *chd = machine().rom_load().get_disk_handle(util::string_format(":cdrom%d", i));
|
||||
m_available_cdroms[ i ] = chd ? new cdrom_file(chd) : nullptr;
|
||||
}
|
||||
|
||||
save_item( NAME( m_n_security_control ) );
|
||||
save_item( NAME( m_control ) );
|
||||
|
Loading…
Reference in New Issue
Block a user