Headless: Fix graphics tests for Vulkan/Direct3D.

Otherwise we hang because there's no thread to ever end.
This commit is contained in:
Unknown W. Brackets 2018-07-29 11:07:29 -07:00
parent fba0de59c1
commit 78dc07e7a3
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -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();