mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-02-05 02:05:26 +00:00
fix(win/input): fix false warnings about missing ViGEmBus (#3097)
This commit is contained in:
@ -860,6 +860,8 @@ namespace platf {
|
||||
|
||||
/**
|
||||
* @brief Gets the supported gamepads for this platform backend.
|
||||
* @details This may be called prior to `platf::input()`!
|
||||
* @param input Pointer to the platform's `input_t` or `nullptr`.
|
||||
* @return Vector of gamepad options and status.
|
||||
*/
|
||||
std::vector<supported_gamepad_t> &
|
||||
|
||||
@ -1728,15 +1728,18 @@ namespace platf {
|
||||
|
||||
std::vector<supported_gamepad_t> &
|
||||
supported_gamepads(input_t *input) {
|
||||
bool enabled;
|
||||
if (input) {
|
||||
auto vigem = ((input_raw_t *) input)->vigem;
|
||||
enabled = vigem != nullptr;
|
||||
}
|
||||
else {
|
||||
enabled = false;
|
||||
if (!input) {
|
||||
static std::vector gps {
|
||||
supported_gamepad_t { "auto", true, "" },
|
||||
supported_gamepad_t { "x360", false, "" },
|
||||
supported_gamepad_t { "ds4", false, "" },
|
||||
};
|
||||
|
||||
return gps;
|
||||
}
|
||||
|
||||
auto vigem = ((input_raw_t *) input)->vigem;
|
||||
auto enabled = vigem != nullptr;
|
||||
auto reason = enabled ? "" : "gamepads.vigem-not-available";
|
||||
|
||||
// ds4 == ps4
|
||||
|
||||
Reference in New Issue
Block a user