mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
libobs-opengl: Lock Mac parent context during present
Parent context lock keeps GL commands serialized. Fixes race that causes crash when resizing multiview.
This commit is contained in:
parent
2d14ee3e60
commit
0a296bb12f
|
@ -292,8 +292,6 @@ void device_present(gs_device_t *device)
|
|||
glFlush();
|
||||
[NSOpenGLContext clearCurrentContext];
|
||||
|
||||
CGLUnlockContext([device->plat->context CGLContextObj]);
|
||||
|
||||
CGLLockContext([device->cur_swap->wi->context CGLContextObj]);
|
||||
|
||||
[device->cur_swap->wi->context makeCurrentContext];
|
||||
|
@ -309,8 +307,6 @@ void device_present(gs_device_t *device)
|
|||
|
||||
CGLUnlockContext([device->cur_swap->wi->context CGLContextObj]);
|
||||
|
||||
CGLLockContext([device->plat->context CGLContextObj]);
|
||||
|
||||
[device->plat->context makeCurrentContext];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue