Show preview pixel values only when displayed.

This prevents it from showing after resume.
This commit is contained in:
Unknown W. Brackets 2015-08-23 11:15:32 -07:00
parent 720c6a30d5
commit 50b2160711
2 changed files with 10 additions and 2 deletions

View file

@ -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) {

View file

@ -83,6 +83,10 @@ struct SimpleGLWindow {
return h_;
}
bool HasTex() {
return tw_ > 0 && th_ > 0;
}
int TexWidth() {
return tw_;
}