Compare commits

..
4 Commits
5 changed files with 101 additions and 2 deletions
+5
View File
@@ -25662,6 +25662,7 @@ SLES-54138:
preloadFrameData: 1 # Fixes menu graphics.
autoFlush: 1 # Fixes motion blur.
minimumBlendingLevel: 2 # Improves post effects.
limit24BitDepth: 2 # Fixes icon brightness.
SLES-54139:
name: "Earache - Extreme Metal Racing"
region: "PAL-E"
@@ -26318,6 +26319,7 @@ SLES-54335:
preloadFrameData: 1 # Fixes menu graphics.
autoFlush: 1 # Fixes motion blur.
minimumBlendingLevel: 2 # Improves post effects.
limit24BitDepth: 2 # Fixes icon brightness.
SLES-54336:
name: "Lumines Plus"
region: "PAL-M5"
@@ -71845,6 +71847,7 @@ SLUS-21344:
preloadFrameData: 1 # Fixes menu graphics.
autoFlush: 1 # Fixes motion blur.
minimumBlendingLevel: 2 # Improves post effects.
limit24BitDepth: 2 # Fixes icon brightness.
SLUS-21345:
name: "Grandia III [Disc 2 of 2]"
region: "NTSC-U"
@@ -75403,6 +75406,7 @@ SLUS-28061:
preloadFrameData: 1 # Fixes menu graphics.
autoFlush: 1 # Fixes motion blur.
minimumBlendingLevel: 2 # Improves post effects.
limit24BitDepth: 2 # Fixes icon brightness.
SLUS-28062:
name: "Dance Factory [Trade Demo]"
region: "NTSC-U"
@@ -76189,6 +76193,7 @@ SLUS-29188:
preloadFrameData: 1 # Fixes menu graphics.
autoFlush: 1 # Fixes motion blur.
minimumBlendingLevel: 2 # Improves post effects.
limit24BitDepth: 2 # Fixes icon brightness.
SLUS-29189:
name: "FIFA World Cup - Germany 2006 [Demo]"
region: "NTSC-U"
+79
View File
@@ -1202,6 +1202,21 @@ void MainWindow::updateDisplayRelatedActions(bool has_surface, bool render_to_ma
QSignalBlocker blocker(m_ui.actionToolbarFullscreen);
m_ui.actionToolbarFullscreen->setChecked(fullscreen);
}
#ifdef __APPLE__
if (render_to_main && fullscreen)
{
m_ui.toolBar->setVisible(false);
m_ui.statusBar->setVisible(false);
}
else
{
m_ui.toolBar->setVisible(m_ui.actionViewToolbar->isChecked());
m_ui.statusBar->setVisible(m_ui.actionViewStatusBar->isChecked());
}
m_ui.actionViewToolbar->setEnabled(!(render_to_main && fullscreen));
m_ui.actionViewStatusBar->setEnabled(!(render_to_main && fullscreen));
#endif
}
void MainWindow::updateStatusBarWidgetVisibility()
@@ -1376,6 +1391,12 @@ bool MainWindow::isRenderingFullscreen() const
if (!MTGS::IsOpen() || !m_display_surface)
return false;
#ifdef __APPLE__
// When rendering to main, the main window is what goes fullscreen.
if (isRenderingToMain())
return isFullScreen();
#endif
return m_display_surface->isFullScreen();
}
@@ -1394,7 +1415,12 @@ bool MainWindow::shouldHideMainWindow() const
{
// NOTE: We can't use isRenderingToMain() here, because this happens post-fullscreen-switch.
return (Host::GetBoolSettingValue("UI", "HideMainWindowWhenRunning", false) && !g_emu_thread->shouldRenderToMain()) ||
#ifdef __APPLE__
// macOS keeps fullscreen on the main window so don't hide it there.
(g_emu_thread->shouldRenderToMain() && (g_emu_thread->isExclusiveFullscreen() || m_is_temporarily_windowed)) ||
#else
(g_emu_thread->shouldRenderToMain() && (isRenderingFullscreen() || g_emu_thread->isExclusiveFullscreen() || m_is_temporarily_windowed)) ||
#endif
Host::InNoGUIMode();
}
@@ -2796,6 +2822,27 @@ std::optional<WindowInfo> MainWindow::acquireRenderWindow(bool recreate_window,
return m_display_surface->getWindowInfo();
}
#ifdef __APPLE__
// Skip recreating when toggling fullscreen if we're still rendering to main.
if (m_display_created && !recreate_window && is_rendering_to_main && render_to_main && !changing_surfaceless)
{
updateDisplayRelatedActions(true, true, fullscreen);
if (fullscreen)
showFullScreen();
else
showNormal();
while (!m_is_closing && isFullScreen() != fullscreen)
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
updateDisplayWidgetCursor();
m_display_surface->setFocus();
updateWindowState();
return m_display_surface->getWindowInfo();
}
#endif
destroyDisplayWidget(surfaceless);
m_display_created = true;
@@ -2835,14 +2882,23 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
{
// If we're rendering to main and were hidden (e.g. coming back from fullscreen),
// make sure we're visible before trying to add ourselves. Otherwise Wayland breaks.
#ifdef __APPLE__
// On macOS the main window itself goes fullscreen so it needs to be visible then too.
if (render_to_main && !isVisible())
#else
if (!fullscreen && render_to_main && !isVisible())
#endif
{
setVisible(true);
QGuiApplication::sync();
}
m_display_surface = new DisplaySurface();
#ifdef __APPLE__
if (!render_to_main)
#else
if (fullscreen || !render_to_main)
#endif
{
#ifdef DISPLAY_SURFACE_WINDOW
m_display_surface->setTitle(windowTitle());
@@ -2858,7 +2914,11 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
m_display_container = m_display_surface->createWindowContainer(getContentParent());
}
#ifdef __APPLE__
if (!render_to_main && (fullscreen || g_emu_thread->isExclusiveFullscreen()))
#else
if (fullscreen || g_emu_thread->isExclusiveFullscreen())
#endif
{
// On Wayland, while move/restoreGeometry can't position the window, it can influence which screen they show up on.
// Other platforms can position windows fine, but the only thing that matters here is the screen.
@@ -2914,6 +2974,15 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
updateDisplayRelatedActions(true, render_to_main, fullscreen);
#ifdef __APPLE__
if (render_to_main && fullscreen)
{
showFullScreen();
while (!m_is_closing && !isFullScreen())
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#endif
// We need the surface visible.
QGuiApplication::sync();
}
@@ -3006,6 +3075,16 @@ void MainWindow::destroyDisplayWidget(bool show_game_list)
if (!(m_display_surface->isFullScreen() || m_display_is_exclusive_fullscreen) && !isRenderingToMain())
saveDisplayWindowGeometryToConfig();
#ifdef __APPLE__
// Need to leave fullscreen before destroying otherwise we could get stuck in it.
if (isRenderingToMain() && isFullScreen())
{
showNormal();
while (isFullScreen())
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#endif
if (isRenderingToMain())
{
pxAssertRel(m_ui.mainContainer->indexOf(m_display_container) == 1, "Display widget in stack");
+5
View File
@@ -898,7 +898,12 @@ std::optional<WindowInfo> EmuThread::acquireRenderWindow(bool recreate_window)
// Check if we're wanting to get exclusive fullscreen. This should be safe to read, since we're going to be calling from the GS thread.
m_is_exclusive_fullscreen = m_is_fullscreen && GSWantsExclusiveFullscreen();
const bool window_fullscreen = m_is_fullscreen && !m_is_exclusive_fullscreen;
#ifdef __APPLE__
// Fullscreen the main window instead of opening a separate one on macOS.
const bool render_to_main = !m_is_exclusive_fullscreen && m_is_rendering_to_main;
#else
const bool render_to_main = !m_is_exclusive_fullscreen && !window_fullscreen && m_is_rendering_to_main;
#endif
return emit onAcquireRenderWindowRequested(recreate_window, window_fullscreen, render_to_main, m_is_surfaceless);
}
+2 -1
View File
@@ -3939,7 +3939,8 @@ void GSRendererHW::Draw()
if (next_ctx.FRAME.Block() == FRAME_TEX0.TBP0 && next_ctx.FRAME.PSM != FRAME_TEX0.PSM)
FRAME_TEX0.PSM = next_ctx.FRAME.PSM;
else if (next_ctx.TEX0.TBP0 == FRAME_TEX0.TBP0 && next_ctx.TEX0.PSM != FRAME_TEX0.PSM)
// Be careful of the next draw being a channel shuffle!
else if (next_ctx.TEX0.TBP0 == FRAME_TEX0.TBP0 && next_ctx.TEX0.PSM != FRAME_TEX0.PSM && GSLocalMemory::m_psm[next_ctx.TEX0.PSM].trbpp >= 16)
FRAME_TEX0.PSM = next_ctx.TEX0.PSM;
else
FRAME_TEX0.PSM = PSMCT32; // Guess full color if no upcoming hint, it'll fix itself later.
+10 -1
View File
@@ -2580,12 +2580,21 @@ GSTextureCache::Target* GSTextureCache::LookupDrawTarget(GIFRegTEX0 TEX0, const
{
// Some games misuse the scissor so it ends up valid 1 pixel over, which causes hell for us. So check if it still overlaps without the extra pixel.
const GSVector4i adjusted_valid = GSVector4i(t->m_valid.x, t->m_valid.y, std::min(t->m_valid.z, static_cast<int>(t->m_TEX0.TBW) * 64), t->m_valid.w - 1);
const u32 adjusted_endblock = GSLocalMemory::GetEndBlockAddress(t->m_TEX0.TBP0, t->m_TEX0.TBW, t->m_TEX0.PSM, adjusted_valid);
u32 adjusted_endblock = GSLocalMemory::GetUnwrappedEndBlockAddress(t->m_TEX0.TBP0, t->m_TEX0.TBW, t->m_TEX0.PSM, adjusted_valid);
if (adjusted_endblock <= bp)
{
i++;
continue;
}
const GSVector4i adjusted_rect = GSVector4i(min_rect.x, min_rect.y, std::min(min_rect.z, static_cast<int>(t->m_TEX0.TBW) * 64), min_rect.w - 1);
// Also check the offset from the bp to the current request to see if it overlaps the begining of the selected target.
adjusted_endblock = GSLocalMemory::GetUnwrappedEndBlockAddress(TEX0.TBP0, TEX0.TBW, TEX0.PSM, adjusted_rect);
if (adjusted_endblock <= t->m_TEX0.TBP0)
{
i++;
continue;
}
const GSLocalMemory::psm_t& s_psm = GSLocalMemory::m_psm[TEX0.PSM];
const u32 widthpage_offset = (std::abs(static_cast<int>(bp - t->m_TEX0.TBP0)) >> 5) % std::max(t->m_TEX0.TBW, 1U);
const bool is_aligned_ok = widthpage_offset == 0 || ((min_rect.width() <= static_cast<int>((t->m_TEX0.TBW - widthpage_offset) * 64) && (t->m_TEX0.TBW == TEX0.TBW || TEX0.TBW == 1)) && bp >= t->m_TEX0.TBP0);