I need to write an easy function that only return bool answer.
if there is joystick plugged in the computer - true,else - false. how can i do this?
I have tried to write this code, but i only get the num of deviced that plug by usb to my computer, i need to know that this usb is joystick.
UINT pNum = 0;
RAWINPUTDEVICELIST* arr = new RAWINPUTDEVICELIST;
PRAWINPUTDEVICELIST pRawInputDeviceList = arr;
GetRawInputDeviceList(pRawInputDeviceList, &pNum, sizeof(RAWINPUTDEVICELIST));
std::cout << "Num entered: " << pNum << std::endl;