From fa4c7cdd83627695d1a4184d6c45c00e922854e8 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 13 Oct 2013 11:06:29 -0700 Subject: [PATCH] Wait until the ringbuffer thread is spun up. This could be made much nicer. --- src/xenia/gpu/graphics_system.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xenia/gpu/graphics_system.cc b/src/xenia/gpu/graphics_system.cc index d3813657b..e4e3932ff 100644 --- a/src/xenia/gpu/graphics_system.cc +++ b/src/xenia/gpu/graphics_system.cc @@ -115,6 +115,10 @@ void GraphicsSystem::SetInterruptCallback(uint32_t callback, } void GraphicsSystem::InitializeRingBuffer(uint32_t ptr, uint32_t page_count) { + // TODO(benvanik): an event? + while (!driver_) { + Sleep(0); + } XEASSERTNOTNULL(driver_); worker_->Initialize(driver_, ptr, page_count); }