Reworked network and SCSI thread initialization and termination;
Hard disk controller name and other related strings are now char * instead of fixed-size arrays.
This commit is contained in:
@@ -427,6 +427,22 @@ void sound_reset(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sound_cd_thread_end(void)
|
||||
{
|
||||
if (sound_cd_thread_h) {
|
||||
pclog("Waiting for CD Audio thread to terminate...\n");
|
||||
thread_wait(sound_cd_thread_h, -1);
|
||||
pclog("CD Audio thread terminated...\n");
|
||||
|
||||
if (sound_cd_event) {
|
||||
thread_destroy_event(sound_cd_event);
|
||||
sound_cd_event = NULL;
|
||||
}
|
||||
|
||||
sound_cd_thread_h = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void sound_cd_thread_reset(void)
|
||||
{
|
||||
int i = 0;
|
||||
@@ -447,9 +463,7 @@ void sound_cd_thread_reset(void)
|
||||
}
|
||||
else if (!available_cdrom_drives && cd_thread_enable)
|
||||
{
|
||||
thread_destroy_event(sound_cd_event);
|
||||
thread_kill(sound_cd_thread_h);
|
||||
sound_cd_thread_h = NULL;
|
||||
sound_cd_thread_end();
|
||||
}
|
||||
|
||||
cd_thread_enable = available_cdrom_drives ? 1 : 0;
|
||||
|
||||
@@ -46,6 +46,7 @@ void sound_realloc_buffers(void);
|
||||
void sound_init();
|
||||
void sound_reset();
|
||||
|
||||
void sound_cd_thread_end();
|
||||
void sound_cd_thread_reset();
|
||||
|
||||
void closeal(void);
|
||||
|
||||
Reference in New Issue
Block a user