sdk: update cpp sample for DDR, fix DDR MDXF polling when api/sdk is providing input (#679)

## Link to GitHub Issue or related Pull Request, if one exists
#676 
#452 

## Description of change

When spice SDK or API sets or clears button and analog override, we
don't tell MDXF about it, so it may fall behind. This is a special case
for DDR MDXF I/O emulation. For Naive/Xinput I think we are getting
lucky because they usually also generate WM_INPUT events.

Update the C++ SDK sample to provide more interesting example of
emulating DDR arrows with the keyboard.

## Testing
This commit is contained in:
bicarus
2026-05-07 18:10:14 -07:00
committed by GitHub
parent b9ccddf47d
commit 1957917270
4 changed files with 67 additions and 15 deletions
+3
View File
@@ -11,6 +11,7 @@
#include "touch/touch.h"
#include "util/logging.h"
#include "util/utils.h"
#include "acio/mdxf/mdxf_poll.h"
namespace sdk {
@@ -323,6 +324,7 @@ sdk_set_button (
button.override_velocity = velocity;
}
button.override_enabled = pressed;
mdxf_poll(true);
return SPICE_SDK_STATUS_SUCCESS;
}
@@ -381,6 +383,7 @@ sdk_set_analog (
analog.override_state = value;
}
analog.override_enabled = override_active;
mdxf_poll(true);
return SPICE_SDK_STATUS_SUCCESS;
}