ViGEm report updates that do not submit input to a device.
More...
#include <cstddef>
#include <cstdint>
#include <map>
#include <Windows.h>
#include <ViGEm/Client.h>
#include "src/platform/common.h"
Go to the source code of this file.
ViGEm report updates that do not submit input to a device.
◆ scale_rumble()
| std::uint16_t platf::vigem::scale_rumble |
( |
std::uint8_t | strength | ) |
|
Scale an 8-bit rumble amplitude to the established 16-bit range.
- Parameters
-
| strength | Rumble amplitude reported by ViGEm. |
- Returns
- Amplitude multiplied by 256.
◆ update_battery()
| void platf::vigem::update_battery |
( |
DS4_REPORT_EX & | ds4_report, |
|
|
const gamepad_battery_t & | battery ) |
Update DualShock 4 battery fields while preserving unknown values.
- Parameters
-
| ds4_report | Report receiving the battery event. |
| battery | Client battery state and percentage. |
◆ update_touch()
| bool platf::vigem::update_touch |
( |
DS4_REPORT_EX & | ds4_report, |
|
|
std::map< std::uint32_t, std::uint8_t > & | pointer_id_map, |
|
|
std::byte & | available_pointers, |
|
|
const gamepad_touch_t & | touch ) |
Update a DualShock 4 touch report and its pointer allocation state.
- Parameters
-
| ds4_report | Report receiving the touch event. |
| pointer_id_map | Mapping from client pointer IDs to the two report slots. |
| available_pointers | Byte mask of unallocated report slots. |
| touch | Client touch event. |
- Returns
- True when the updated report should be submitted to ViGEm.