Merge remote-tracking branch 'thesystemcoder168/block_rumble_functionality' into PR886
This commit is contained in:
@@ -571,6 +571,7 @@ namespace config {
|
||||
true, // high resolution scrolling
|
||||
true, // native pen/touch support
|
||||
false, // enable input only mode
|
||||
true, // enable_rumble_messages_to_controllers
|
||||
};
|
||||
|
||||
sunshine_t sunshine {
|
||||
@@ -1286,6 +1287,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_rumble_messages_to_controllers", input.enable_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});
|
||||
|
||||
@@ -211,6 +211,7 @@ namespace config {
|
||||
bool native_pen_touch;
|
||||
|
||||
bool enable_input_only_mode;
|
||||
bool enable_rumble_messages_to_controllers;
|
||||
};
|
||||
|
||||
namespace flag {
|
||||
|
||||
@@ -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_rumble_messages_to_controllers - Default is true so ignore rumble messages when false
|
||||
if( config::input.enable_rumble_messages_to_controllers == false ) {
|
||||
// Do nothing; just return
|
||||
return;
|
||||
}
|
||||
for (int x = 0; x < gamepads.size(); ++x) {
|
||||
auto &gamepad = gamepads[x];
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <stddef.h> // workaround for type_t error in miniupnpc 2.3.3, see https://github.com/miniupnp/miniupnp/commit/e263ab6f56c382e10fed31347ec68095d691a0e8
|
||||
|
||||
// lib includes
|
||||
#include <cstddef> // Needed to compile size_t in Windows
|
||||
#include <miniupnpc/miniupnpc.h>
|
||||
#include <miniupnpc/upnpcommands.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user