From ed493c846d607cf25cffa75461b0c468745fefd1 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 29 Feb 2020 00:18:40 +1000 Subject: [PATCH] GPU: Don't panic on oversized VRAM copies Fixes #31. --- src/core/gpu_commands.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/core/gpu_commands.cpp b/src/core/gpu_commands.cpp index a448036df..2a824ab24 100644 --- a/src/core/gpu_commands.cpp +++ b/src/core/gpu_commands.cpp @@ -418,13 +418,6 @@ bool GPU::HandleCopyRectangleVRAMToVRAMCommand(const u32*& command_ptr, u32 comm Log_DebugPrintf("Copy rectangle from VRAM to VRAM src=(%u,%u), dst=(%u,%u), size=(%u,%u)", src_x, src_y, dst_x, dst_y, width, height); - if ((src_x + width) > VRAM_WIDTH || (src_y + height) > VRAM_HEIGHT || (dst_x + width) > VRAM_WIDTH || - (dst_y + height) > VRAM_HEIGHT) - { - Panic("Out of bounds VRAM copy"); - return true; - } - FlushRender(); CopyVRAM(src_x, src_y, dst_x, dst_y, width, height); m_stats.num_vram_copies++;