Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 14, 2023
2 parents b8498cb + 9c4fdc1 commit a292a8e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
16 changes: 16 additions & 0 deletions bin/resources/GameIndex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10419,6 +10419,8 @@ SCUS-97621:
compat: 5
clampModes:
vu1ClampMode: 3 # Fixes missing textures.
gsHWFixes:
recommendedBlendingLevel: 2 # Fixes smoke effects.
gameFixes:
- VUSyncHack # Fixes black doors on vehicles.
patches:
Expand Down Expand Up @@ -13090,6 +13092,8 @@ SLES-50713:
// Snow effect has to be removed for this fix (needs accurate emulation).
// Fixed by rearranging COP2 instructions.
patch=1,EE,00214aec,word,00000000
gameFixes:
- SoftwareRendererFMVHack # Fixes broken FMVs.
SLES-50714:
name: "Defender"
region: "PAL-M5"
Expand Down Expand Up @@ -14139,6 +14143,9 @@ SLES-51128:
name: "Total Immersion Racing"
region: "PAL-M5"
compat: 5
gsHWFixes:
textureInsideRT: 1 # Needed for post processing effects.
roundSprite: 1 # Fixes upscaling lines.
SLES-51130:
name: "Tony Hawk's Pro Skater 4"
region: "PAL-E"
Expand Down Expand Up @@ -18387,6 +18394,8 @@ SLES-52920:
SLES-52921:
name: "Rogue Trooper"
region: "PAL-M5"
gsHWFixes:
halfPixelOffset: 3 # Fixes ghosting.
SLES-52922:
name: "EyeToy - Disney Move"
region: "PAL-M5"
Expand Down Expand Up @@ -48033,6 +48042,8 @@ SLUS-20284:
// Snow effect has to be removed for this fix (and that needs accurate emulation).
// Fixed by rearranging COP2 instructions.
patch=1,EE,002131bc,word,00000000
gameFixes:
- SoftwareRendererFMVHack # Fixes broken FMVs.
SLUS-20285:
name: "MotoGP 2"
region: "NTSC-U"
Expand Down Expand Up @@ -48612,6 +48623,9 @@ SLUS-20409:
name: "Total Immersion Racing"
region: "NTSC-U"
compat: 5
gsHWFixes:
textureInsideRT: 1 # Needed for post processing effects.
roundSprite: 1 # Fixes upscaling lines.
SLUS-20412:
name: "Hot Wheels - Velocity X"
region: "NTSC-U"
Expand Down Expand Up @@ -53521,6 +53535,8 @@ SLUS-21320:
name: "Rogue Trooper"
region: "NTSC-U"
compat: 5
gsHWFixes:
halfPixelOffset: 3 # Fixes ghosting.
SLUS-21321:
name: "Squadra Course Alfa Romeo"
region: "NTSC-U"
Expand Down
3 changes: 3 additions & 0 deletions pcsx2/GS/Renderers/HW/GSRendererHW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ GSTexture* GSRendererHW::GetOutput(int i, float& scale, int& y_offset)
GSPCRTCRegs::PCRTCDisplay& curFramebuffer = PCRTCDisplays.PCRTCDisplays[index];
const GSVector2i framebufferSize(PCRTCDisplays.GetFramebufferSize(i));

if (curFramebuffer.framebufferRect.rempty() || curFramebuffer.FBW == 0)
return nullptr;

PCRTCDisplays.RemoveFramebufferOffset(i);
// TRACE(_T("[%d] GetOutput %d %05x (%d)\n"), (int)m_perfmon.GetFrame(), i, (int)TEX0.TBP0, (int)TEX0.PSM);

Expand Down
9 changes: 7 additions & 2 deletions pcsx2/GS/Renderers/SW/GSRendererSW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@ GSTexture* GSRendererSW::GetOutput(int i, float& scale, int& y_offset)
GSPCRTCRegs::PCRTCDisplay& curFramebuffer = PCRTCDisplays.PCRTCDisplays[index];
GSVector2i framebufferSize = PCRTCDisplays.GetFramebufferSize(i);
GSVector4i framebufferRect = PCRTCDisplays.GetFramebufferRect(i);
int w = curFramebuffer.FBW * 64;
int h = framebufferSize.y;

// Try to avoid broken/incomplete setups which are probably ingnored on console, but can cause us problems.
if (framebufferRect.rempty() || curFramebuffer.FBW == 0)
return nullptr;

const int w = curFramebuffer.FBW * 64;
const int h = framebufferSize.y;

if (g_gs_device->ResizeRenderTarget(&m_texture[index], w, h, false, false))
{
Expand Down

0 comments on commit a292a8e

Please sign in to comment.