MCPcopy Create free account
hub / github.com/WallBreaker2/op / LockInput

Method LockInput

libop/binding/BindingSession.cpp:316–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316long BindingSession::LockInput(long lock) {
317 if (lock < 0 || lock > 3)
318 return 0;
319 if (lock == 0)
320 return op::hook::input_hook_client::LockInput(_input_hwnd, 0);
321 if (!_is_bind || !_input_hwnd)
322 return 0;
323
324 const bool need_mouse = lock == 1 || lock == 2;
325 const bool need_keyboard = lock == 1 || lock == 3;
326 if ((need_mouse && _mouse_mode != INPUT_TYPE::IN_DX) || (need_keyboard && _keypad_mode != INPUT_TYPE::IN_DX))
327 return 0;
328
329 return op::hook::input_hook_client::LockInput(_input_hwnd, static_cast<int>(lock));
330}
331
332long BindingSession::reset_bind_state(bool restore_default_input) {
333 if (_input_hwnd && (_mouse_mode == INPUT_TYPE::IN_DX || _keypad_mode == INPUT_TYPE::IN_DX)) {

Callers

nothing calls this directly

Calls 1

LockInputFunction · 0.85

Tested by

no test coverage detected