Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,13 @@ void SetActiveJoystickId(unsigned int joystickId) {
s_currWindowCtx->joystickId = joystickId;
}

void SetJoytickDPadThreshold(float threshold) {
void SetJoystickDPadThreshold(float threshold) {
assert(s_currWindowCtx);
assert(threshold >= 0.f && threshold <= 100.f);
s_currWindowCtx->dPadInfo.threshold = threshold;
}

void SetJoytickLStickThreshold(float threshold) {
void SetJoystickLStickThreshold(float threshold) {
assert(s_currWindowCtx);
assert(threshold >= 0.f && threshold <= 100.f);
s_currWindowCtx->lStickInfo.threshold = threshold;
Expand Down Expand Up @@ -1027,8 +1027,8 @@ void initDefaultJoystickMapping() {
ImGui::SFML::SetLStickXAxis(sf::Joystick::X);
ImGui::SFML::SetLStickYAxis(sf::Joystick::Y);

ImGui::SFML::SetJoytickDPadThreshold(5.f);
ImGui::SFML::SetJoytickLStickThreshold(5.f);
ImGui::SFML::SetJoystickDPadThreshold(5.f);
ImGui::SFML::SetJoystickLStickThreshold(5.f);
}

void updateJoystickActionState(ImGuiIO& io, ImGuiNavInput_ action) {
Expand Down
4 changes: 2 additions & 2 deletions imgui-SFML.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ IMGUI_SFML_API sf::Texture& GetFontTexture();

// joystick functions
IMGUI_SFML_API void SetActiveJoystickId(unsigned int joystickId);
IMGUI_SFML_API void SetJoytickDPadThreshold(float threshold);
IMGUI_SFML_API void SetJoytickLStickThreshold(float threshold);
IMGUI_SFML_API void SetJoystickDPadThreshold(float threshold);
IMGUI_SFML_API void SetJoystickLStickThreshold(float threshold);

IMGUI_SFML_API void SetJoystickMapping(int action, unsigned int joystickButton);
IMGUI_SFML_API void SetDPadXAxis(sf::Joystick::Axis dPadXAxis, bool inverted = false);
Expand Down