]> git.sur5r.net Git - cc65/blobdiff - libsrc/mouse/mouse_load.c
Working on loadable mouse drivers
[cc65] / libsrc / mouse / mouse_load.c
index 7fa114366ee8010db005ef14031414ab7e4581b1..cbb7cecba377b72445fc7bfa828b9a5986742ab7 100644 (file)
 
 
 
-unsigned char __fastcall__ mouse_load_driver (const char* name)
+/* Use static local variables, since the module is not reentrant anyway */
+#pragma staticlocals (on);
+
+
+
+unsigned char __fastcall__ mouse_load_driver (const struct mouse_callbacks* c,
+                                              const char* name)
 /* Load a mouse driver and return an error code */
 {
     static struct mod_ctrl ctrl = {
@@ -69,7 +75,7 @@ unsigned char __fastcall__ mouse_load_driver (const char* name)
         if (Res == MLOAD_OK) {
 
             /* Check the driver signature, install the driver */
-            return mouse_install (ctrl.module);
+            return mouse_install (c, ctrl.module);
 
         }
     }