Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Fix LUT clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
ikt32 committed Jun 18, 2021
1 parent dff0004 commit dc15bdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Gears/Input/WheelDirectInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ WheelDirectInput::~WheelDirectInput() {
}

void WheelDirectInput::ClearLut() {
mLut = std::vector<int>(outputLutSize);
mLut.clear();
}

void WheelDirectInput::AssignLut(const std::map<float, float>& rawLut) {
Expand All @@ -74,6 +74,8 @@ void WheelDirectInput::AssignLut(const std::map<float, float>& rawLut) {
return;
}

mLut = std::vector<int>(outputLutSize);

for (const auto& [inputRaw, outputRaw] : rawLut) {
uint32_t input = (int)(inputRaw * 10000.0f);
int output = (int)(outputRaw * 10000.0f);
Expand Down

0 comments on commit dc15bdb

Please sign in to comment.