Compare commits

...
6 Commits
6 changed files with 26 additions and 25 deletions
+1
View File
@@ -6,4 +6,5 @@ add_library(D3D12MemAlloc
target_link_libraries(D3D12MemAlloc PRIVATE Microsoft::DirectX-Headers)
target_include_directories(D3D12MemAlloc PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_definitions(D3D12MemAlloc PRIVATE "D3D12MA_USING_DIRECTX_HEADERS")
disable_compiler_warnings_for_target(D3D12MemAlloc)
+5 -4
View File
@@ -410,9 +410,6 @@ void GameListWidget::setCustomBackground()
delete m_background_movie;
m_background_movie = nullptr;
}
// Cache all frames for small images so loops don't keep re-decoding
else if (const s64 file_size = FileSystem::GetPathFileSize(path.c_str()); file_size > 0 && file_size < 64 * 1024 * 1024)
m_background_movie->setCacheMode(QMovie::CacheAll);
}
// Invalidate frame cache so the next animated frame triggers full reprocessing
@@ -436,6 +433,10 @@ void GameListWidget::setCustomBackground()
return;
}
// Cache all frames for small images so loops don't keep re-decoding
if (const s64 file_size = FileSystem::GetPathFileSize(path.c_str()); file_size > 0 && file_size < 25 * 1024 * 1024)
m_background_movie->setCacheMode(QMovie::CacheAll);
// Retrieve scaling setting
m_background_scaling = QtUtils::ScalingMode::Fit;
const std::string ar_value = Host::GetBaseStringSettingValue("UI", "GameListBackgroundMode", InterfaceSettingsWidget::BACKGROUND_SCALE_NAMES[static_cast<u8>(QtUtils::ScalingMode::Fit)]);
@@ -792,7 +793,7 @@ void GameListWidget::setShowFullCoverTitles(bool enabled)
Host::SetBaseBoolSettingValue("UI", "GameListShowFullCoverTitles", enabled);
Host::CommitBaseSettingChanges();
m_model->setShowFullCoverTitles(enabled);
m_list_view->setWordWrap(enabled);
m_list_view->setWordWrap(enabled);
if (isShowingGameGrid())
m_model->refresh();
updateToolbar();
+3 -15
View File
@@ -1068,27 +1068,15 @@ void EmuThread::updatePerformanceMetrics(bool force)
if (gpu_usage != m_last_gpu_usage || force)
{
QString text;
if (gpu_usage == 0)
text = tr("GPU: N/A");
else
text = tr("GPU: %1%").arg(gpu_usage, 0, 'f', 0);
QMetaObject::invokeMethod(g_main_window, "setStatusGPUText", Qt::QueuedConnection,
Q_ARG(const QString&, text));
Q_ARG(const QString&, tr("GPU: %1%").arg(gpu_usage, 0, 'f', 0)));
m_last_gpu_usage = gpu_usage;
}
if (gfps != m_last_game_fps || force)
{
QString text;
if (gfps == 0)
text = tr("FPS: N/A");
else
text = tr("FPS: %1").arg(gfps, 0, 'f', 0);
QMetaObject::invokeMethod(g_main_window, "setStatusFPSText", Qt::QueuedConnection,
Q_ARG(const QString&, text));
Q_ARG(const QString&, gfps == 0 ? tr("FPS: N/A") : tr("FPS: %1").arg(gfps, 0, 'f', 0)));
m_last_game_fps = gfps;
}
@@ -1267,7 +1255,7 @@ void Host::RunOnGSThread(std::function<void()> function)
void Host::RefreshGameListAsync(bool invalidate_cache)
{
QMetaObject::invokeMethod(g_main_window, "refreshGameList", Qt::QueuedConnection, Q_ARG(bool, invalidate_cache));
QMetaObject::invokeMethod(g_main_window, "refreshGameList", Qt::QueuedConnection, Q_ARG(bool, invalidate_cache), Q_ARG(bool, true));
}
void Host::CancelGameListRefresh()
+9 -5
View File
@@ -1883,7 +1883,7 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const bool is_color, const
// If the sizing is completely wrong on the frame vs the source when reading from alpha then it's likely the target has 2 different sizes for rgb and alpha.
// This is just changing the target width for the rect translation, it has no bearing on the actual source read or the target itself.
// Hitman Blood Money is an example of this in the theatre.
const u32 rt_tbw = (possible_shuffle || bw == 1 || GSUtil::GetChannelMask(psm) != 0x8 || frame.FBW <= bw || frame.FBW == t->m_TEX0.TBW || bw == t->m_TEX0.TBW) ? t->m_TEX0.TBW : frame.FBW;
rt_tbw = (possible_shuffle || bw == 1 || GSUtil::GetChannelMask(psm) != 0x8 || frame.FBW <= bw || frame.FBW == t->m_TEX0.TBW || bw == t->m_TEX0.TBW) ? t->m_TEX0.TBW : frame.FBW;
const bool can_translate = CanTranslate(adj_bp, bw, src_psm, new_rect, t->m_TEX0.TBP0, t->m_TEX0.PSM, rt_tbw);
if (can_translate)
@@ -3483,8 +3483,8 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
// When the write covers the entire target, don't bother checking any earlier writes.
if (iter->blit.DBP <= TEX0.TBP0 && transfer_end >= rect_end)
{
// If it was a clear draw then we can use that as our target size.
if (iter->transfer_type == GSRendererHW::GetInstance()->EEGS_TransferType::Clear && iter->blit.DBP == TEX0.TBP0 && iter->blit.DPSM == TEX0.PSM)
// If it was an exact upload then we can assume this the target size.
if (iter->blit.DBP == TEX0.TBP0 && iter->blit.DBW == TEX0.TBW && iter->blit.DPSM == TEX0.PSM)
dst->UpdateValidity(iter->rect);
// Some games clear RT and Z at the same time, only erase if it's specifically this target.
@@ -3877,9 +3877,13 @@ bool GSTextureCache::PreloadTarget(GIFRegTEX0 TEX0, const GSVector2i& size, cons
}
const int height_adjust = ((((dst_end_block + 31) - old_dst->m_TEX0.TBP0) >> 5) / std::max(old_dst->m_TEX0.TBW, 1U)) * GSLocalMemory::m_psm[old_dst->m_TEX0.PSM].pgs.y;
bool delete_target = true;
if (height_adjust < old_dst->m_unscaled_size.y)
// If it's only a partial overlap, we don't want to change the TBP, it needs to be on a page boundary, we can just lump it.
const GSVector4i dst_valid_rounded = GSVector4i(dst_valid.x, dst_valid.y, dst_valid.z, dst_valid.w & ~(GSLocalMemory::m_psm[dst->m_TEX0.PSM].pgs.y - 1));
const u32 dst_end_block_rounded = GSLocalMemory::GetEndBlockAddress(dst->m_TEX0.TBP0, dst->m_TEX0.TBW, dst->m_TEX0.PSM, dst_valid_rounded) + 1;
bool delete_target = (static_cast<int>(dst_end_block_rounded - old_dst->m_TEX0.TBP0) / 16) >= 1;
if (height_adjust < old_dst->m_unscaled_size.y && delete_target)
{
old_dst->m_TEX0.TBP0 = GSLocalMemory::GetStartBlockAddress(old_dst->m_TEX0.TBP0, old_dst->m_TEX0.TBW, old_dst->m_TEX0.PSM, GSVector4i(0, height_adjust, old_dst->m_valid.z, old_dst->m_valid.w));
old_dst->m_valid.w -= height_adjust;
+7
View File
@@ -2606,6 +2606,11 @@ void FullscreenUI::DrawGameListWindow()
{
OpenCoverDownloaderWindow();
}
else if (ImGui::IsKeyPressed(ImGuiKey_GamepadL2, false) || ImGui::IsKeyPressed(ImGuiKey_F5, false))
{
ShowToast(std::string(), FSUI_STR("Scanning for new games..."), 4.0f);
Host::RefreshGameListAsync(false);
}
switch (s_game_list_view)
{
@@ -2640,6 +2645,7 @@ void FullscreenUI::DrawGameListWindow()
std::make_pair(glyphs.dpad, FSUI_VSTR("Select Game")),
std::make_pair(glyphs.select, FSUI_VSTR("Cover Downloader")),
std::make_pair(glyphs.start, FSUI_VSTR("Settings")),
std::make_pair(ICON_PF_LEFT_TRIGGER_L2, FSUI_VSTR("Refresh List")),
std::make_pair(swapNorthWest ? glyphs.west : glyphs.north, FSUI_VSTR("Change View")),
std::make_pair(swapNorthWest ? glyphs.north : glyphs.west, FSUI_VSTR("Launch Options")),
std::make_pair(glyphs.confirm(circleOK), FSUI_VSTR("Start Game")),
@@ -2654,6 +2660,7 @@ void FullscreenUI::DrawGameListWindow()
std::make_pair(ICON_PF_F2, FSUI_VSTR("Settings")),
std::make_pair(ICON_PF_F3, FSUI_VSTR("Launch Options")),
std::make_pair(ICON_PF_F4, FSUI_VSTR("Cover Downloader")),
std::make_pair(ICON_PF_F5, FSUI_VSTR("Refresh List")),
std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Start Game")),
std::make_pair(ICON_PF_ESC, FSUI_VSTR("Back")),
});
+1 -1
View File
@@ -428,7 +428,7 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
const CPUInfo& info = GetCPUInfo();
const bool has_small = info.num_small_cores > 0;
const bool has_smt = info.num_threads != info.num_big_cores + info.num_small_cores;
s_hardware_info_cpu_line.format("CPU: {}", info.name);
s_hardware_info_cpu_line.format("CPU: {}", !info.name.empty() ? info.name : "Unknown");
if (has_smt && has_small)
s_hardware_info_cpu_line.append_format(" ({}P/{}E/{}T)", info.num_big_cores, info.num_small_cores, info.num_threads);
else if (has_small)