MCPcopy Create free account
hub / github.com/GPUOpen-Effects/GeometryFX / DXUTMapButtonToArrayIndex

Function DXUTMapButtonToArrayIndex

framework/d3d11/dxut/Core/DXUT.cpp:3492–3512  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Internal function to map MK_* to an array index --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3490// Internal function to map MK_* to an array index
3491//--------------------------------------------------------------------------------------
3492int DXUTMapButtonToArrayIndex( _In_ BYTE vButton )
3493{
3494 switch( vButton )
3495 {
3496 case MK_LBUTTON:
3497 return 0;
3498 case VK_MBUTTON:
3499 case MK_MBUTTON:
3500 return 1;
3501 case MK_RBUTTON:
3502 return 2;
3503 case VK_XBUTTON1:
3504 case MK_XBUTTON1:
3505 return 3;
3506 case VK_XBUTTON2:
3507 case MK_XBUTTON2:
3508 return 4;
3509 }
3510
3511 return 0;
3512}
3513
3514
3515//--------------------------------------------------------------------------------------

Callers 1

DXUTIsMouseButtonDownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected