diff options
Diffstat (limited to 'platform/windows/joypad.cpp')
-rw-r--r-- | platform/windows/joypad.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/platform/windows/joypad.cpp b/platform/windows/joypad.cpp index 796531fe24..7201714fb8 100644 --- a/platform/windows/joypad.cpp +++ b/platform/windows/joypad.cpp @@ -163,7 +163,7 @@ bool JoypadWindows::setup_dinput_joypad(const DIDEVICEINSTANCE *instance) { const GUID &guid = instance->guidProduct; char uid[128]; - sprintf(uid, "%08lx%04hx%04hx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", + sprintf_s(uid, "%08lx%04hx%04hx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", __builtin_bswap32(guid.Data1), guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); @@ -172,7 +172,7 @@ bool JoypadWindows::setup_dinput_joypad(const DIDEVICEINSTANCE *instance) { joy->di_joy->SetDataFormat(&c_dfDIJoystick2); joy->di_joy->SetCooperativeLevel(*hWnd, DISCL_FOREGROUND); - joy->di_joy->EnumObjects(objectsCallback, this, NULL); + joy->di_joy->EnumObjects(objectsCallback, this, 0); joy->joy_axis.sort(); joy->guid = instance->guidInstance; @@ -540,9 +540,7 @@ void JoypadWindows::load_xinput() { } if (!xinput_dll) { - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("Could not find XInput, using DirectInput only"); - } + print_verbose("Could not find XInput, using DirectInput only"); return; } |