--- ascd.c.orig Mon Jul 5 17:58:51 1999 +++ ascd.c Thu Apr 25 17:27:22 2013 @@ -63,8 +63,6 @@ XpmIcon iconXPM; /* External functions */ -extern time(); -extern open(); extern cd_control(int); extern cd_control_version(); @@ -572,7 +570,8 @@ void main_loop() if (autoplay || autoprobe) { dodo = RDTIME2; - wm_cd_status(); + if(wm_cd_status() < 1) + goto quick_and_dirty; } if (cur_cdmode != WM_CDM_EJECTED) no_disk = 0; @@ -606,7 +605,7 @@ void main_loop() if ((slow_down == 1) || (slow_down == 6)) { if ((show_db) && (cur_cdmode == WM_CDM_PLAYING)) show_db_f(); } - +quick_and_dirty: /* Check events */ while (XPending(Disp)) @@ -635,8 +634,8 @@ void main_loop() case ButtonPress: - wm_cd_status(); - mouse_events(Event); + if(wm_cd_status() > 0) + mouse_events(Event); break; /* ------------------------ Destroy Window ------------------- */