Skip to content

I don't understand the docs for GetKeyState #45

Description

https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate?view=gdk-2604

Heres the signature...

uint32_t GetKeyState(
    uint32_t stateArrayCount,
    GameInputKeyState* stateArray
);

The docs say...

stateArrayCount In
Type: uint32_t

Returns the number of keys active on a keyboard. This is acquired by calling the IGameInputReading::GetKeyCount method.

How does it return? This isn't a return, it's a value argument. And I assume this is asking for the size of the StateArray because C++ can't work out the size of arrays in a way that's familiar to modern languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions