mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-11-30 02:56:42 -08: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:
1 parent
b6a749e5db
commit
c8962a0e77
2 files changed
+26
-6
No files matched your search
@@ -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