mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Fixed a few GCC compiler warnings.
This commit is contained in:
parent
81291dcbbf
commit
c96ab29e95
|
@ -531,7 +531,6 @@ void SystemView::updateGameCount()
|
||||||
std::stringstream ssGames;
|
std::stringstream ssGames;
|
||||||
std::stringstream ssFavorites;
|
std::stringstream ssFavorites;
|
||||||
bool games {false};
|
bool games {false};
|
||||||
bool favorites {false};
|
|
||||||
|
|
||||||
if (!mCarousel->getSelected()->isGameSystem()) {
|
if (!mCarousel->getSelected()->isGameSystem()) {
|
||||||
ss << "Configuration";
|
ss << "Configuration";
|
||||||
|
@ -553,7 +552,6 @@ void SystemView::updateGameCount()
|
||||||
ssGames << gameCount.first << " Game" << (gameCount.first == 1 ? " " : "s ");
|
ssGames << gameCount.first << " Game" << (gameCount.first == 1 ? " " : "s ");
|
||||||
ssFavorites << gameCount.second << " Favorite" << (gameCount.second == 1 ? "" : "s");
|
ssFavorites << gameCount.second << " Favorite" << (gameCount.second == 1 ? "" : "s");
|
||||||
games = true;
|
games = true;
|
||||||
favorites = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLegacyMode) {
|
if (mLegacyMode) {
|
||||||
|
|
|
@ -264,12 +264,12 @@ void CarouselComponent::render(const glm::mat4& parentTrans)
|
||||||
|
|
||||||
float distance = i - mCamOffset;
|
float distance = i - mCamOffset;
|
||||||
|
|
||||||
float scale {1.0f + ((mLogoScale - 1.0f) * (1.0f - fabs(distance)))};
|
float scale {1.0f + ((mLogoScale - 1.0f) * (1.0f - fabsf(distance)))};
|
||||||
scale = std::min(mLogoScale, std::max(1.0f, scale));
|
scale = std::min(mLogoScale, std::max(1.0f, scale));
|
||||||
scale /= mLogoScale;
|
scale /= mLogoScale;
|
||||||
|
|
||||||
int opacity {
|
int opacity {
|
||||||
static_cast<int>(std::round(0x80 + ((0xFF - 0x80) * (1.0f - fabs(distance)))))};
|
static_cast<int>(std::round(0x80 + ((0xFF - 0x80) * (1.0f - fabsf(distance)))))};
|
||||||
opacity = std::max(static_cast<int>(0x80), opacity);
|
opacity = std::max(static_cast<int>(0x80), opacity);
|
||||||
|
|
||||||
const std::shared_ptr<GuiComponent>& comp = mEntries.at(index).data.logo;
|
const std::shared_ptr<GuiComponent>& comp = mEntries.at(index).data.logo;
|
||||||
|
@ -504,11 +504,11 @@ void CarouselComponent::onCursorChanged(const CursorState& state)
|
||||||
|
|
||||||
// Find the shortest path to the target.
|
// Find the shortest path to the target.
|
||||||
float endPos {target}; // Directly.
|
float endPos {target}; // Directly.
|
||||||
float dist {fabs(endPos - startPos)};
|
float dist {fabsf(endPos - startPos)};
|
||||||
|
|
||||||
if (fabs(target + posMax - startPos - mScrollVelocity) < dist)
|
if (fabsf(target + posMax - startPos - mScrollVelocity) < dist)
|
||||||
endPos = target + posMax; // Loop around the end (0 -> max).
|
endPos = target + posMax; // Loop around the end (0 -> max).
|
||||||
if (fabs(target - posMax - startPos - mScrollVelocity) < dist)
|
if (fabsf(target - posMax - startPos - mScrollVelocity) < dist)
|
||||||
endPos = target - posMax; // Loop around the start (max - 1 -> -1).
|
endPos = target - posMax; // Loop around the start (max - 1 -> -1).
|
||||||
|
|
||||||
// Make sure there are no reverse jumps between logos.
|
// Make sure there are no reverse jumps between logos.
|
||||||
|
|
|
@ -223,14 +223,11 @@ void VideoComponent::update(int deltaTime)
|
||||||
if (mWindow->getGameLaunchedState())
|
if (mWindow->getGameLaunchedState())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool playVideo {false};
|
|
||||||
|
|
||||||
if (!mIsPlaying && mConfig.startDelay == 0) {
|
if (!mIsPlaying && mConfig.startDelay == 0) {
|
||||||
startVideoStream();
|
startVideoStream();
|
||||||
}
|
}
|
||||||
else if (mStartTime == 0 || SDL_GetTicks() > mStartTime) {
|
else if (mStartTime == 0 || SDL_GetTicks() > mStartTime) {
|
||||||
mStartTime = 0;
|
mStartTime = 0;
|
||||||
playVideo = true;
|
|
||||||
startVideoStream();
|
startVideoStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue