mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GLES: Actually stop the thread on shutdown.
Fixes shutdown.
This commit is contained in:
parent
7316261eac
commit
bdf7fdc7a3
2 changed files with 9 additions and 1 deletions
|
@ -386,6 +386,8 @@ void WindowsGLContext::SwapInterval(int interval) {
|
|||
}
|
||||
|
||||
void WindowsGLContext::Shutdown() {
|
||||
if (renderManager_)
|
||||
renderManager_->StopThread();
|
||||
glslang::FinalizeProcess();
|
||||
}
|
||||
|
||||
|
|
|
@ -69,11 +69,16 @@ void GLRenderManager::ThreadStart() {
|
|||
}
|
||||
|
||||
void GLRenderManager::ThreadEnd() {
|
||||
// Wait for any shutdown to complete in StopThread().
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
queueRunner_.DestroyDeviceObjects();
|
||||
VLOG("PULL: Quitting");
|
||||
}
|
||||
|
||||
bool GLRenderManager::ThreadFrame() {
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (!run_)
|
||||
return false;
|
||||
{
|
||||
if (nextFrame) {
|
||||
threadFrame_++;
|
||||
|
@ -126,7 +131,8 @@ void GLRenderManager::StopThread() {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Wait for something here!
|
||||
// Wait until we've definitely stopped the threadframe.
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
|
||||
ILOG("GL submission thread paused. Frame=%d", curFrame_);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue