From 92592ec82e7aa5fa8de8091ec966aac94f66d31e Mon Sep 17 00:00:00 2001 From: lnd3 Date: Fri, 6 Sep 2024 00:37:53 +0200 Subject: [PATCH] Fix error. --- packages/hid/source/common/KeyboardPiano.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/hid/source/common/KeyboardPiano.cpp b/packages/hid/source/common/KeyboardPiano.cpp index fdb6302f..c6e2dcfb 100644 --- a/packages/hid/source/common/KeyboardPiano.cpp +++ b/packages/hid/source/common/KeyboardPiano.cpp @@ -31,14 +31,14 @@ namespace l::hid { } else { int32_t note = ConvertKeyCodeToNote(keyCode, mOctave); - if (note > -l::math::constants::INTMIN) { + if (note > l::math::constants::INTMIN) { noteHandler(note, true); } } } if (releasedNow) { int32_t note = ConvertKeyCodeToNote(keyCode, mOctave); - if (note > -l::math::constants::INTMIN) { + if (note > l::math::constants::INTMIN) { noteHandler(note, false); } } @@ -66,14 +66,14 @@ namespace l::hid { } else { int32_t note = ConvertKeyCodeToNote(keyCode, mOctave); - if (note > -l::math::constants::INTMIN) { + if (note > l::math::constants::INTMIN) { mNotePlayer->NoteOn(note); } } } if (releasedNow) { int32_t note = ConvertKeyCodeToNote(keyCode, mOctave); - if (note > -l::math::constants::INTMIN) { + if (note > l::math::constants::INTMIN) { mNotePlayer->NoteOff(note); } } @@ -86,7 +86,7 @@ namespace l::hid { if (key > 0) { return key + octave * 12; } - return -l::math::constants::INTMIN; + return l::math::constants::INTMIN; } int32_t KeyboardPiano::ConvertCharCodeToNote(int32_t charCode, int32_t octave) { @@ -94,7 +94,7 @@ namespace l::hid { if (key > 0) { return key + octave * 12; } - return -l::math::constants::INTMIN; + return l::math::constants::INTMIN; } void KeyboardPiano::MapKeyFunctions(KeyFunctionTypes function, int32_t keyCode) {