Skip to content

Commit

Permalink
Warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Sep 22, 2023
1 parent d5277f0 commit 3f5ecdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions UI/RetroAchievementScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void RenderAchievement(UIContext &dc, const rc_client_achievement_t *achievement
char cacheKey[256];
snprintf(cacheKey, sizeof(cacheKey), "ai:%s:%s", achievement->badge_name, iconState == RC_CLIENT_ACHIEVEMENT_STATE_UNLOCKED ? "unlocked" : "locked");
if (RC_OK == rc_client_achievement_get_image_url(achievement, iconState, temp, sizeof(temp))) {
Achievements::DownloadImageIfMissing(cacheKey, std::move(std::string(temp)));
Achievements::DownloadImageIfMissing(cacheKey, std::string(temp));
if (g_iconCache.BindIconTexture(&dc, cacheKey)) {
dc.Draw()->DrawTexRect(Bounds(bounds.x + padding, bounds.y + padding, iconSpace, iconSpace), 0.0f, 0.0f, 1.0f, 1.0f, whiteAlpha(alpha));
}
Expand Down Expand Up @@ -560,7 +560,7 @@ void RenderGameAchievementSummary(UIContext &dc, const Bounds &bounds, float alp
char cacheKey[256];
snprintf(cacheKey, sizeof(cacheKey), "gi:%s", gameInfo->badge_name);
if (RC_OK == rc_client_game_get_image_url(gameInfo, url, sizeof(url))) {
Achievements::DownloadImageIfMissing(cacheKey, std::move(std::string(url)));
Achievements::DownloadImageIfMissing(cacheKey, std::string(url));
if (g_iconCache.BindIconTexture(&dc, cacheKey)) {
dc.Draw()->DrawTexRect(Bounds(bounds.x, bounds.y, iconSpace, iconSpace), 0.0f, 0.0f, 1.0f, 1.0f, whiteAlpha(alpha));
}
Expand Down Expand Up @@ -660,7 +660,7 @@ void RenderLeaderboardEntry(UIContext &dc, const rc_client_leaderboard_entry_t *
snprintf(cacheKey, sizeof(cacheKey), "lbe:%s", entry->user);
char temp[512];
if (RC_OK == rc_client_leaderboard_entry_get_user_image_url(entry, temp, sizeof(temp))) {
Achievements::DownloadImageIfMissing(cacheKey, std::move(std::string(temp)));
Achievements::DownloadImageIfMissing(cacheKey, std::string(temp));
if (g_iconCache.BindIconTexture(&dc, cacheKey)) {
dc.Draw()->DrawTexRect(Bounds(bounds.x + iconLeft, bounds.y + 4.0f, 64.0f, 64.0f), 0.0f, 0.0f, 1.0f, 1.0f, whiteAlpha(alpha));
}
Expand Down
2 changes: 1 addition & 1 deletion android/ab.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ copy ..\assets\*.meta assets\
copy ..\assets\*.wav assets\
SET NDK=C:\Android\sdk\ndk\21.3.6528147
REM SET NDK=C:\Android\ndk
SET NDK_MODULE_PATH=..\ext;..\ext\native\ext
SET NDK_MODULE_PATH=..\ext
%NDK%/ndk-build -j32 %*

0 comments on commit 3f5ecdd

Please sign in to comment.