StarJade-Park / SimpleDxInputExample

Simple DirectInput example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleDxInputExample

Simple DirectInput example

How To Use

  1. Create
  std::unique_ptr<GInput> pInputInstance = std::unique_ptr<GInput>(new GInput(HWND, int, int));
  1. Update
  GInput::Update();
  1. Check input
  if( GInput::Get()->IsKeyDown(GKEY_DEF_0) ) // keyboard input
  {
    // ...
  }
  
  if( GInput::Get()->IsMouseDown(GMOUSE_BUTTONS_LEFT) ) // mouse input
  {
    // ...
  }
  1. Release(Choose one of the methods here)
  // pInputInstance release
  GInput::Release();
  pInputInstance->ShutDown();

About

Simple DirectInput example


Languages

Language:C++ 64.5%Language:C 35.5%