MCPcopy Index your code
hub / github.com/NetHack/NetHack / lock_mouse_buttons

Function lock_mouse_buttons

src/cmd.c:3325–3340  ·  view source on GitHub ↗

save&clear the mouse button actions, or restore the saved ones */

Source from the content-addressed store, hash-verified

3323
3324/* save&clear the mouse button actions, or restore the saved ones */
3325void
3326lock_mouse_buttons(boolean savebtns)
3327{
3328 static const struct ext_func_tab *mousebtn[NUM_MOUSE_BUTTONS] = { 0 };
3329 int i;
3330
3331 if (savebtns) {
3332 for (i = 0; i < NUM_MOUSE_BUTTONS; i++) {
3333 mousebtn[i] = gc.Cmd.mousebtn[i];
3334 gc.Cmd.mousebtn[i] = NULL;
3335 }
3336 } else {
3337 for (i = 0; i < NUM_MOUSE_BUTTONS; i++)
3338 gc.Cmd.mousebtn[i] = mousebtn[i];
3339 }
3340}
3341
3342/* called at startup and after number_pad is twiddled */
3343void

Callers 1

getposFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected