Skip to content

Commit 3d8e55b

Browse files
committed
version 2.1
1 parent a3cdffa commit 3d8e55b

6 files changed

Lines changed: 22 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1
2+
3+
- Enable creation of back buttons macro with 5+ keys
4+
15
## 2.0
26

37
- Support win5 and mini 25

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.23)
22

3-
project(OpenWinControlsCLI VERSION 2.0 DESCRIPTION "Multiplatform GPD WinControls replacement (command-line)" LANGUAGES CXX)
3+
project(OpenWinControlsCLI VERSION 2.1 DESCRIPTION "Multiplatform GPD WinControls replacement (command-line)" LANGUAGES CXX)
44

55
set(PROJECT_AUTHOR "kylon")
66
set(CMAKE_CXX_STANDARD 20)

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ sudo udevadm control --reload-rules && sudo udevadm trigger
4444

4545
## Usage
4646

47+
**Controller V2 macros**
48+
49+
Chain multiple keys by assigning an incremental start time (**l4d**/**r4d**) and a fixed hold time to each slot.
50+
51+
### Help
52+
4753
```text
48-
OpenWinControlsCLI 2.0
54+
OpenWinControlsCLI 2.1
4955
5056
Usage: OpenWinControlsCLI command [args]
5157
@@ -269,6 +275,7 @@ Notes:
269275
270276
Controller V2 features:
271277
Support up to 32 key/time/hold slots for back buttons.
278+
The number of active key slots is automatically updated on write.
272279
273280
Deadzone settings:
274281
This is composed of two values, center and boundary.

src/Utils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,11 @@ namespace OWCL {
549549
continue;
550550

551551
const std::vector<std::string> keys = std::get<std::vector<std::string>>(cmd.getValue(btn.data()));
552-
//int slotsC = 0;
552+
int slotsC = 0;
553553

554554
for (int i=0,l=keys.size(); i<l && i<32; ++i) {
555-
//if (keys[i] != "UNSET")
556-
//++slotsC;
555+
if (keys[i] != "UNSET")
556+
++slotsC;
557557

558558
if (!gpd->setBackButton(num, i+1, keys[i]))
559559
std::cerr << "failed to set " << btn << " slot " << (i + 1) << "\n";
@@ -565,9 +565,9 @@ namespace OWCL {
565565
else if (keys.size() <= 4)
566566
gpd->setBackButtonMode(num, OWC::BackButtonMode::Four);
567567
else
568-
gpd->setBackButtonMode(num, OWC::BackButtonMode::Macro);
568+
gpd->setBackButtonMode(num, OWC::BackButtonMode::Macro);*/
569569

570-
gpd->setBackButtonActiveSlots(num, std::clamp(slotsC, 0, 32));*/
570+
gpd->setBackButtonActiveSlots(num, std::clamp(slotsC, 4, 32));
571571
++num;
572572
}
573573

src/classes/CMDParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ namespace OWC {
187187
" The 4th time slot is special, it sets the whole macro start time.\n\n"
188188

189189
" Controller V2 features:\n"
190-
" Support up to 32 key/time/hold slots for back buttons.\n\n"
190+
" Support up to 32 key/time/hold slots for back buttons.\n"
191191
/*" Back buttons have 3 modes: single, 4-buttons, 32-slots macro.\n"
192-
" Mode is automatically updated based on the number of keys being set: 1, 2-4, 5+.\n"
193-
" Same for the active slots count.\n\n"*/
192+
" Mode is automatically updated based on the number of keys being set: 1, 2-4, 5+.\n"*/
193+
" The number of active key slots is automatically updated on write.\n\n"
194194

195195
" Deadzone settings:\n"
196196
" This is composed of two values, center and boundary.\n"

0 commit comments

Comments
 (0)