Use the SDK for console application

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
RobinFaury
Posts: 4
Joined: Mon Sep 21, 2015 3:01 am

Use the SDK for console application

Post by RobinFaury » Tue Sep 22, 2015 2:54 am

Hi,

I want to use the spacemouse pro in my application create by Unreal Engine 4. So the window of my application isn't a hWndMain.
Is it possible to have a code example without windows dependency ?
Like this :

Code: Select all

#include "si.h"
#include "siapp.h"

int main(int argc, char* argv[])
{
  SiInitialize();
  SiOpen(0x046d);
  while(1)
  {
    e = SiGetEvent();
    printEventOnConsole(e);
  }
}
Regards,
Robin

jwick
Moderator
Moderator
Posts: 2534
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Use the SDK for console application

Post by jwick » Mon Sep 28, 2015 12:27 am

You can call SiGrabDevice to get events even if your window is not in focus.

Post Reply