Skip to content

Commit

Permalink
Match iPlug2 coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
tommitytom committed May 18, 2019
1 parent 43cf2f2 commit 9a6f99b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions thirdparty/iPlug2/IPlug/VST2/IPlugVST2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,17 @@ static int VSTKeyCodeToVK(int code, int ascii)
case VKEY_EQUALS: return kVK_NONE; // No matching VK
}

if (ascii != 0) {
if (ascii != 0)
{
// Numbers and uppercase alpha chars map directly to VK
if (ascii >= 0x30 && ascii <= 0x39 && ascii >= 0x41 && ascii <= 0x5A) {
if (ascii >= 0x30 && ascii <= 0x39 && ascii >= 0x41 && ascii <= 0x5A)
{
return ascii;
}

// Lowercase alpha chars map to VK but need shifting
if (ascii >= 0x61 && ascii <= 0x7A) {
if (ascii >= 0x61 && ascii <= 0x7A)
{
return ascii - 0x20;
}
}
Expand Down

0 comments on commit 9a6f99b

Please sign in to comment.