Don't start the Darwin media_thread if "nocdrom" pref is set. The media

thread is currently only used to poll for CDROM devices and is not useful
when "nocdrom" is set. This change also fixes the problem of the emulator
preventing the CD to be ejected at the host level despite "nocdrom" being
set in prefs.

Thanks to Robert Munafo <mrob27@gmail.com> for investigating this problem!
This commit is contained in:
asvitkine 2012-04-21 16:02:05 +00:00
parent d63422a733
commit 2b348f7c41

View File

@ -66,9 +66,11 @@ extern void SysMediaRemoved(const char *path, int type);
void DarwinSysInit(void)
{
if (!PrefsFindBool("nocdrom")) {
media_thread_active = (pthread_create(&media_thread, NULL, media_poll_func, NULL) == 0);
D(bug("Media poll thread installed (%ld)\n", media_thread));
}
}
/*