Skip to content

Commit

Permalink
Fixed setting key to 0 to disable it
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam777Z committed Aug 5, 2021
1 parent 5e687bc commit b1b04bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions INI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,11 @@ namespace handy
*wasRead = true;
}

if ((*itemIter).second.intV == 0)
{
return {};
}

std::string value = (*itemIter).second.stringV;
std::vector<std::string> v = explode(",", value);
std::vector<int> key;
Expand Down
2 changes: 1 addition & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ xbox_game_bar = 1
; Decimal key code, see the bottom of this file for a list
; Default is 1 (Escape)
; Multiple keys are supported. Separate multiple keys with commas. Example: 1,2,3
; If you set it to zero, set longpress_key correctly, and set hold_mode = 2,
; If you set it to 0, set longpress_key correctly, and set hold_mode = 2,
; tapping the button for less than longpress_duration will do nothing.
key = 1

Expand Down

0 comments on commit b1b04bd

Please sign in to comment.