From 50b2160711b1b6b11659b7c4293a909c065dc81d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 23 Aug 2015 11:15:32 -0700 Subject: [PATCH] Show preview pixel values only when displayed. This prevents it from showing after resume. --- Windows/GEDebugger/GEDebugger.cpp | 8 ++++++-- Windows/GEDebugger/SimpleGLWindow.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 8a7df0c1ab..e04d18a42e 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -282,7 +282,9 @@ void CGEDebugger::PreviewFramebufHover(int x, int y) { wchar_t desc[256] = {0}; - if (x < 0 || y < 0) { + if (!frameWindow->HasTex()) { + desc[0] = 0; + } else if (x < 0 || y < 0) { // This means they left the area. GPUgstate state = {0}; if (gpuDebug != nullptr) { @@ -412,7 +414,9 @@ void CGEDebugger::PreviewTextureHover(int x, int y) { wchar_t desc[256] = {0}; - if (x < 0 || y < 0) { + if (!texWindow->HasTex()) { + desc[0] = 0; + } else if (x < 0 || y < 0) { // This means they left the area. GPUgstate state = {0}; if (gpuDebug != nullptr) { diff --git a/Windows/GEDebugger/SimpleGLWindow.h b/Windows/GEDebugger/SimpleGLWindow.h index ba4b4f6492..f1802c511f 100644 --- a/Windows/GEDebugger/SimpleGLWindow.h +++ b/Windows/GEDebugger/SimpleGLWindow.h @@ -83,6 +83,10 @@ struct SimpleGLWindow { return h_; } + bool HasTex() { + return tw_ > 0 && th_ > 0; + } + int TexWidth() { return tw_; }