Skip to content

Commit

Permalink
Headless: Fix graphics tests for Vulkan/Direct3D.
Browse files Browse the repository at this point in the history
Otherwise we hang because there's no thread to ever end.
  • Loading branch information
unknownbrackets committed Jul 29, 2018
1 parent fba0de5 commit 78dc07e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions GPU/GLES/TextureCacheGLES.cpp
Expand Up @@ -862,6 +862,7 @@ bool TextureCacheGLES::GetCurrentTextureDebug(GPUDebugBuffer &buffer, int level)
GLRenderManager *renderManager = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);

// Not a framebuffer, so let's assume these are right.
// TODO: But they may definitely not be, if the texture was scaled.
int w = gstate.getTextureWidth(level);
int h = gstate.getTextureHeight(level);

Expand Down
2 changes: 1 addition & 1 deletion headless/WindowsHeadlessHost.cpp
Expand Up @@ -163,7 +163,7 @@ bool WindowsHeadlessHost::InitGraphics(std::string *error_message, GraphicsConte

void WindowsHeadlessHost::ShutdownGraphics() {
gfx_->StopThread();
while (threadState_ != RenderThreadState::STOPPED)
while (threadState_ != RenderThreadState::STOPPED && threadState_ != RenderThreadState::IDLE)
sleep_ms(1);

gfx_->Shutdown();
Expand Down

0 comments on commit 78dc07e

Please sign in to comment.