diff --git a/samples/golf/buildnumber.h b/samples/golf/buildnumber.h index 2142116f9..820f1f39f 100644 --- a/samples/golf/buildnumber.h +++ b/samples/golf/buildnumber.h @@ -3,7 +3,7 @@ #ifndef BUILD_NUMBER_H_ #define BUILD_NUMBER_H_ -#define BUILDNUMBER 7171 -#define BUILDNUMBER_STR "7171" +#define BUILDNUMBER 7174 +#define BUILDNUMBER_STR "7174" #endif /* BUILD_NUMBER_H_ */ diff --git a/samples/golf/src/golf/OptionsState.cpp b/samples/golf/src/golf/OptionsState.cpp index ffeac5591..b612f68ef 100644 --- a/samples/golf/src/golf/OptionsState.cpp +++ b/samples/golf/src/golf/OptionsState.cpp @@ -322,6 +322,11 @@ OptionsState::OptionsState(cro::StateStack& ss, cro::State::Context ctx, SharedS m_viewScale (2.f), m_refreshControllers(false) { + if (Social::isSteamdeck()) + { + lastInput = LastInput::XBox; + } + ctx.mainWindow.setMouseCaptured(false); m_videoSettings.fullScreen = ctx.mainWindow.isFullscreen(); diff --git a/samples/golf/src/golf/server/ServerGolfRules.cpp b/samples/golf/src/golf/server/ServerGolfRules.cpp index f613f8391..4b55362e0 100644 --- a/samples/golf/src/golf/server/ServerGolfRules.cpp +++ b/samples/golf/src/golf/server/ServerGolfRules.cpp @@ -176,7 +176,7 @@ void GolfState::handleRules(std::int32_t groupID, const GolfBallEvent& data) //skins and match play are always in a single group //so we don't consider other players here const auto& currPlayer = playerInfo[0]; - for (auto i = 1; i < playerInfo.size(); ++i) + for (auto i = 1u; i < playerInfo.size(); ++i) { playerInfo[i].distanceToHole = 0.f; playerInfo[i].holeScore[m_currentHole] = currPlayer.holeScore[m_currentHole] + 1; @@ -194,9 +194,9 @@ void GolfState::handleRules(std::int32_t groupID, const GolfBallEvent& data) else { //eliminate anyone who can't beat this score - //again - assume all players exist in the dame group + //again - assume all players exist in the same group const auto& currPlayer = playerInfo[0]; - for (auto i = 1; i < playerInfo.size(); ++i) + for (auto i = 1u; i < playerInfo.size(); ++i) { if (playerInfo[i].holeScore[m_currentHole] >= currPlayer.holeScore[m_currentHole]) { @@ -230,7 +230,7 @@ void GolfState::handleRules(std::int32_t groupID, const GolfBallEvent& data) //force a draw by eliminating anyone who can't beat it if (currPlayer.holeScore[m_currentHole] == m_currentBest) { - for (auto i = 1; i < playerInfo.size(); ++i) + for (auto i = 1u; i < playerInfo.size(); ++i) { if (playerInfo[i].holeScore[m_currentHole] + 1 >= m_currentBest) { @@ -312,7 +312,7 @@ void GolfState::handleRules(std::int32_t groupID, const GolfBallEvent& data) { //skins / match play should always be in the same group const auto& currPlayer = m_playerInfo[groupID].playerInfo[0]; - for (auto i = 1; i < playerInfo.size(); ++i) + for (auto i = 1u; i < playerInfo.size(); ++i) { playerInfo[i].distanceToHole = 0.f; playerInfo[i].holeScore[m_currentHole] = currPlayer.holeScore[m_currentHole] + 1; @@ -332,7 +332,7 @@ void GolfState::handleRules(std::int32_t groupID, const GolfBallEvent& data) { //check if our score is even with anyone holed already and forfeit auto& currPlayer = m_playerInfo[groupID].playerInfo[0]; - for (auto i = 1; i < playerInfo.size(); ++i) + for (auto i = 1u; i < playerInfo.size(); ++i) { if (playerInfo[i].distanceToHole == 0 && playerInfo[i].holeScore[m_currentHole] < currPlayer.holeScore[m_currentHole])