summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
diff options
context:
space:
mode:
authorFiloppi <filippotarpini@hotmail.it>2021-05-15 12:20:20 +0300
committerFiloppi <filippotarpini@hotmail.it>2021-06-07 11:07:06 +0300
commita0ecca1a84afb61809aa848405f119a9a7fff965 (patch)
tree2a8bf13471a9d692152d3c5306587b915c835287 /Source/Core/InputCommon/ControllerInterface/CoreDevice.h
parentdcc345400e38e54ac84819e5cbcdf65c9cd95f96 (diff)
ControllerInterface: Implement ChangeWindow on DInput without recreating the devices
Also polished DInput code in general to try and mitigate issue 11702. Added a lot of logging and comments.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/CoreDevice.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/CoreDevice.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
index e094d2477d..d3312568b2 100644
--- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
+++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.h
@@ -125,6 +125,12 @@ public:
// Currently handled on a per-backend basis but this could change.
virtual bool IsValid() const { return true; }
+ // Returns true whether this device is "virtual/emulated", not linked
+ // to any actual physical device. Mostly used by keyboard and mouse devices,
+ // and to avoid uselessly recreating the device unless really necessary.
+ // Doesn't necessarily need to be set to true if the device is virtual.
+ virtual bool IsVirtualDevice() const { return false; }
+
// (e.g. Xbox 360 controllers have controller number LEDs which should match the ID we use.)
virtual std::optional<int> GetPreferredId() const;