]> git.sesse.net Git - pistorm/blobdiff - emulator.c
IDE updates, fix mouse hook hotkey
[pistorm] / emulator.c
index bb93c585cb5aaa5c1d664c8ce6049a15e94b33a0..ce516f3bbd474abd2a85cbe1739ed7401dd71e9d 100644 (file)
@@ -69,8 +69,8 @@ void *iplThread(void *args) {
       irq = 0;
 
     if (gayle_emulation_enabled) {
-      if (((gayle_int & 0x80) || gayle_a4k_int) && get_ide(0)->drive->intrq) {
-        //get_ide(0)->drive->intrq = 0;
+      if (((gayle_int & 0x80) || gayle_a4k_int) && (get_ide(0)->drive[0].intrq || get_ide(0)->drive[1].intrq)) {
+        //get_ide(0)->drive[0].intrq = 0;
         gayleirq = 1;
         m68k_end_timeslice();
       }
@@ -291,7 +291,7 @@ disasm_run:;
       }
 
       if (!kb_hook_enabled && c_type) {
-        if (c == cfg->mouse_toggle_key) {
+        if (c && c == cfg->mouse_toggle_key) {
           mouse_hook_enabled ^= 1;
           printf("Mouse hook %s.\n", mouse_hook_enabled ? "enabled" : "disabled");
           mouse_dx = mouse_dy = mouse_buttons = 0;