Skip to content

Commit

Permalink
Hotseats - Hotfix: Master state reset every tick
Browse files Browse the repository at this point in the history
  • Loading branch information
FlavioFS committed Mar 2, 2023
1 parent 7e2d5a5 commit 7600a97
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion ParsecSoda/GamepadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,19 @@ void GamepadClient::loadFromHotseats(GuestList& guests)
{
if (iSeat->guest.isMaster)
{
iSeat->gamepad->clearOwner();
if (iSeat->gamepad->isPuppet)
{
// Does not clear state (already puppet)
// This line prevents a bug that will keep resetting the gamepad state
// every hotseat tick, for 1 frame.
// It is speacially disruptive for games where the Master must hold
// an analog direction for a long time.
iSeat->gamepad->AGamepad::clearOwner();
}
else
{
iSeat->gamepad->clearOwner();
}
iSeat->gamepad->isPuppet = true;
}
else
Expand Down
2 changes: 1 addition & 1 deletion ParsecSoda/Widgets/VersionWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bool VersionWidget::render()
ImGui::SetNextWindowSize(ImVec2(100, 32));
ImGui::Begin("##Version", (bool*)0, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBringToFrontOnFocus);
AppStyle::pushLabel();
ImGui::Text("v. 1.2.6");
ImGui::Text("v. 1.2.7");
AppStyle::pop();
ImGui::End();

Expand Down

0 comments on commit 7600a97

Please sign in to comment.