MCPcopy Create free account
hub / github.com/diasurgical/devilution / DisableInputWndProc

Function DisableInputWndProc

Source/diablo.cpp:469–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469LRESULT DisableInputWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
470{
471 switch (uMsg) {
472 case WM_KEYDOWN:
473 case WM_KEYUP:
474 case WM_CHAR:
475 case WM_SYSKEYDOWN:
476 case WM_SYSCOMMAND:
477 case WM_MOUSEMOVE:
478 GetMousePos(lParam);
479 return 0;
480 case WM_LBUTTONDOWN:
481 if (sgbMouseDown != 0)
482 return 0;
483 sgbMouseDown = 1;
484 return 0;
485 case WM_LBUTTONUP:
486 if (sgbMouseDown != 1)
487 return 0;
488 sgbMouseDown = 0;
489 return 0;
490 case WM_RBUTTONDOWN:
491 if (sgbMouseDown != 0)
492 return 0;
493 sgbMouseDown = 2;
494 return 0;
495 case WM_RBUTTONUP:
496 if (sgbMouseDown != 2)
497 return 0;
498 sgbMouseDown = 0;
499 return 0;
500 case WM_CAPTURECHANGED:
501 if (hWnd == (HWND)lParam)
502 return 0;
503 sgbMouseDown = 0;
504 return 0;
505 }
506
507 return MainWndProc(hWnd, uMsg, wParam, lParam);
508}
509
510LRESULT GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
511{

Callers

nothing calls this directly

Calls 2

GetMousePosFunction · 0.85
MainWndProcFunction · 0.85

Tested by

no test coverage detected