]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
implemented CSQC_InputEvent type 2 and type 3 mouse move events
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 817ce92da6a38ae589788aa4f374b33ba420db61..aa84c237cb6ef7c0474e65b7d5d5731035dbc899 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1686,7 +1686,7 @@ void Key_FindKeysForCommand (const char *command, int *keys, int numkeys, int bi
        }
 }
 
-qboolean CL_VM_InputEvent (qboolean down, int key, int ascii);
+extern qboolean CL_VM_InputEvent (int eventtype, int x, int y);
 
 /*
 ===================
@@ -1852,7 +1852,7 @@ Key_Event (int key, int ascii, qboolean down)
 
                        case key_game:
                                // csqc has priority over toggle menu if it wants to (e.g. handling escape for UI stuff in-game.. :sick:)
-                               q = CL_VM_InputEvent(down, key, ascii);
+                               q = CL_VM_InputEvent(down ? 0 : 1, key, ascii);
                                if (!q && down)
                                        MR_ToggleMenu(1);
                                break;
@@ -1936,7 +1936,7 @@ Key_Event (int key, int ascii, qboolean down)
                        MR_KeyEvent (key, ascii, down);
                        break;
                case key_game:
-                       q = CL_VM_InputEvent(down, key, ascii);
+                       q = CL_VM_InputEvent(down ? 0 : 1, key, ascii);
                        // ignore key repeats on binds and only send the bind if the event hasnt been already processed by csqc
                        if (!q && bind)
                        {