Added option to disable rumble from the Apollo side

Added option to disable rumble from the Apollo side
This commit is contained in:
thesystemcoder168
2025-06-25 16:13:04 -07:00
parent c2bee29b88
commit 54cb7eceba
7 changed files with 23 additions and 0 deletions

View File

@@ -572,6 +572,7 @@ namespace config {
true, // high resolution scrolling
true, // native pen/touch support
false, // enable input only mode
false, // enable_block_rumble_messages_to_controllers
};
sunshine_t sunshine {
@@ -1288,6 +1289,7 @@ namespace config {
bool_f(vars, "envvar_compatibility_mode", sunshine.envvar_compatibility_mode);
bool_f(vars, "notify_pre_releases", sunshine.notify_pre_releases);
bool_f(vars, "legacy_ordering", sunshine.legacy_ordering);
bool_f(vars, "enable_block_rumble_messages_to_controllers", input.enable_block_rumble_messages_to_controllers);
int port = sunshine.port;
int_between_f(vars, "port"s, port, {1024 + nvhttp::PORT_HTTPS, 65535 - rtsp_stream::RTSP_SETUP_PORT});

View File

@@ -212,6 +212,7 @@ namespace config {
bool native_pen_touch;
bool enable_input_only_mode;
bool enable_block_rumble_messages_to_controllers;
};
namespace flag {

View File

@@ -327,6 +327,11 @@ namespace platf {
* @param smallMotor The small motor.
*/
void rumble(target_t::pointer target, std::uint8_t largeMotor, std::uint8_t smallMotor) {
// config::input.enable_block_rumble_messages_to_controllers - Default is false so ignore rumble messages when true
if( config::input.enable_block_rumble_messages_to_controllers == true ) {
// Do nothing; just return
return;
}
for (int x = 0; x < gamepads.size(); ++x) {
auto &gamepad = gamepads[x];

View File

@@ -3,6 +3,7 @@
* @brief Definitions for UPnP port mapping.
*/
// lib includes
#include <cstddef> // Needed to compile size_t in Windows
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>