Skip to content

Commit

Permalink
godot wants defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdawson committed Apr 20, 2024
1 parent 31b34a3 commit a784ff6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/gdext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,13 @@ jobs:
echo "pkgfn=$pkgfn" >> $GITHUB_OUTPUT
rm -rf gdext
pkgdir=~/tmp/imgui-godot-${plugin_ver}
pkgdir=~/out/imgui-godot-${plugin_ver}
mkdir -p $pkgdir
mv * $pkgdir
echo "pkgdir=$pkgdir" >> $GITHUB_OUTPUT
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prep.outputs.pkgfn }}
path: |
~/tmp
~/out
6 changes: 5 additions & 1 deletion gdext/src/ImGuiGD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ void ImGuiGD::_SetJoyAxisDeadZone(float zone)

float ImGuiGD::_GetJoyAxisDeadZone()
{
return ImGui::Godot::GetContext()->input->GetJoyAxisDeadZone();
Context* ctx = ImGui::Godot::GetContext();
if (ctx)
return ctx->input->GetJoyAxisDeadZone();
else
return 0.15f;
}

void ImGuiGD::_SetScale(float scale)
Expand Down

0 comments on commit a784ff6

Please sign in to comment.