From 0d6c002cb0258cbad84c1220c6b71802180e531e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 19 Jan 2015 08:41:53 -0800 Subject: [PATCH] Fix a very unlikely sign extend glitch. --- GPU/Directx9/FramebufferDX9.cpp | 2 +- GPU/GLES/Framebuffer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Directx9/FramebufferDX9.cpp b/GPU/Directx9/FramebufferDX9.cpp index df771623d..7655a5430 100644 --- a/GPU/Directx9/FramebufferDX9.cpp +++ b/GPU/Directx9/FramebufferDX9.cpp @@ -588,7 +588,7 @@ namespace DX9 { } FBO *FramebufferManagerDX9::GetTempFBO(u16 w, u16 h, FBOColorDepth depth) { - u64 key = ((u64)depth << 32) | (w << 16) | h; + u64 key = ((u64)depth << 32) | ((u32)w << 16) | h; auto it = tempFBOs_.find(key); if (it != tempFBOs_.end()) { it->second.last_frame_used = gpuStats.numFlips; diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 2a4bd71e6..5731c3909 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -902,7 +902,7 @@ void FramebufferManager::BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFr } FBO *FramebufferManager::GetTempFBO(u16 w, u16 h, FBOColorDepth depth) { - u64 key = ((u64)depth << 32) | (w << 16) | h; + u64 key = ((u64)depth << 32) | ((u32)w << 16) | h; auto it = tempFBOs_.find(key); if (it != tempFBOs_.end()) { it->second.last_frame_used = gpuStats.numFlips;