Skip to content

Commit

Permalink
Added mouse parameter parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaposfos13 committed Nov 14, 2024
1 parent 09b945c commit 1a8f177
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/input/input_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,19 @@ void parseInputConfig(const std::string game_id = "") {
continue;
}
if (output_string == "mouse_movement_params") {
LOG_DEBUG(Input, "todo: {}", line);
std::stringstream ss(input_string);
char comma; // To hold the comma separators between the floats
ss >> mouse_deadzone_offset >> comma
>> mouse_speed >> comma
>> mouse_speed_offset;

// Check for invalid input (in case there's an unexpected format)
if (ss.fail()) {
LOG_ERROR(Input, "Failed to parse mouse movement parameters from line: {}", line);
} else {
//LOG_DEBUG(Input, "Mouse movement parameters parsed: {} {} {}", mouse_deadzone_offset, mouse_speed, mouse_speed_offset);
}

continue;
}

Expand Down

0 comments on commit 1a8f177

Please sign in to comment.