mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
overlay: setting button as always-on (#671)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Add a checkbox to the buttons edit dialog that lets you set a device as "always on", accomplished by setting the device to `Naive`, vkey to `0xff` (invalid), and `Invert`. No backend rawinput changes. ## Testing
This commit is contained in:
@@ -306,7 +306,10 @@ std::string Button::getDisplayString(rawinput::RawInputManager* manager) {
|
||||
std::string vKeyString = fmt::format("{:#x}", vKey);
|
||||
|
||||
// device must be existing
|
||||
if (this->device_identifier.empty() && vKey == INVALID_VKEY) {
|
||||
if (this->isNaive() && vKey == INVALID_VKEY) {
|
||||
if (this->getInvert()) {
|
||||
return "(always on)";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user