]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Init CD driver subsystem only once.
authorToni Wilen <twilen@winuae.net>
Thu, 5 Nov 2015 19:04:37 +0000 (21:04 +0200)
committerToni Wilen <twilen@winuae.net>
Thu, 5 Nov 2015 19:04:37 +0000 (21:04 +0200)
blkdev.cpp

index e2532092ad985a46aed585d871f49cdbe65d9d07..168cece8f201bbc5568ca2675070cc040b5e4e05 100644 (file)
@@ -465,7 +465,6 @@ int sys_command_open (int unitnum)
        blkdev_fix_prefs (&currprefs);
        if (!dev_init) {
                device_func_init (0);
-               dev_init = true;
        }
 
        if (st->isopen) {
@@ -519,12 +518,14 @@ void device_func_reset (void)
                st->cdimagefileinuse = false;
                st->newimagefile[0] = 0;
        }
+       dev_init = false;
 }
 
 int device_func_init (int flags)
 {
        blkdev_fix_prefs (&currprefs);
        install_driver (flags);
+       dev_init = true;
        return 1;
 }