Compare commits

..
3 Commits
3 changed files with 24 additions and 1 deletions
+3
View File
@@ -4106,7 +4106,10 @@ GSTextureCache::Target* GSTextureCache::LookupDisplayTarget(GIFRegTEX0 TEX0, con
break;
if (iter->was_hardware_only)
{
++iter;
continue;
}
const u32 transfer_end = GSLocalMemory::GetUnwrappedEndBlockAddress(iter->blit.DBP, iter->blit.DBW, iter->blit.DPSM, iter->rect);
+6
View File
@@ -1215,9 +1215,15 @@ std::string GameList::FormatTimestamp(std::time_t timestamp)
}
else
{
#ifdef _WIN32
wchar_t buf[128];
std::wcsftime(buf, std::size(buf), L"%x", &ttime);
ret = StringUtil::WideStringToUTF8String(buf);
#else
char buf[128];
std::strftime(buf, std::size(buf), "%x", &ttime);
ret.assign(buf);
#endif
}
}
+15 -1
View File
@@ -59,8 +59,15 @@ TinyString FullscreenUI::TimeToPrintableString(time_t t)
#endif
TinyString ret;
#ifdef _WIN32
wchar_t buf[65];
pxAssert(std::size(buf) == ret.buffer_size());
std::wcsftime(buf, std::size(buf), L"%c", &lt);
ret.assign(StringUtil::WideStringToUTF8String(buf));
#else
std::strftime(ret.data(), ret.buffer_size(), "%c", &lt);
ret.update_size();
#endif
return ret;
}
@@ -1310,9 +1317,16 @@ void FullscreenUI::DrawLandingTemplate(ImVec2* menu_pos, ImVec2* menu_size)
#else
localtime_r(&utc_time_t, &tm_local);
#endif
#ifdef _WIN32
wchar_t buf[256];
std::wcsftime(buf, std::size(buf), L"%X", &tm_local);
heading_str.assign(StringUtil::WideStringToUTF8String(buf));
#else
char buf[256];
std::strftime(buf, sizeof(buf), "%X", &tm_local);
std::strftime(buf, std::size(buf), "%X", &tm_local);
heading_str.assign(buf);
#endif
const ImVec2 time_size = heading_font.first->CalcTextSizeA(heading_font.second, FLT_MAX, 0.0f, heading_str.c_str());
time_pos = ImVec2(heading_size.x - LayoutScale(LAYOUT_MENU_BUTTON_X_PADDING) - time_size.x,