mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Core: Track names of connected pad devices.
Rather than just that it's a pad. This tries to get the identifier if possible.
This commit is contained in:
1 parent
75bae070de
commit
536c050943
8 files changed
+60
-14
No files matched your search
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "Common/Input/InputState.h"
|
||||
#include "Common/Input/KeyCodes.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
@@ -57,8 +58,6 @@ static const int dinput_buttons[] = {
|
||||
NKCODE_BUTTON_16,
|
||||
};
|
||||
|
||||
static float NormalizedDeadzoneFilter(short value);
|
||||
|
||||
#define DIFF (JOY_POVRIGHT - JOY_POVFORWARD) / 2
|
||||
#define JOY_POVFORWARD_RIGHT JOY_POVFORWARD + DIFF
|
||||
#define JOY_POVRIGHT_BACKWARD JOY_POVRIGHT + DIFF
|
||||
@@ -152,6 +151,11 @@ DinputDevice::DinputDevice(int devnum) {
|
||||
return;
|
||||
}
|
||||
|
||||
wchar_t guid[64];
|
||||
if (StringFromGUID2(devices.at(devnum).guidProduct, guid, ARRAY_SIZE(guid)) != 0) {
|
||||
KeyMap::NotifyPadConnected(DEVICE_ID_PAD_0 + pDevNum, StringFromFormat("%S: %S", devices.at(devnum).tszProductName, guid));
|
||||
}
|
||||
|
||||
if (FAILED(pJoystick->SetDataFormat(&c_dfDIJoystick2))) {
|
||||
pJoystick->Release();
|
||||
pJoystick = NULL;
|
||||
|
||||
Reference in new issue
Block a user