mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-21 12:49:40 +08:00
libobs: UI: Remove Qt usage from graphics thread
This fixes Xcode warning about detecting UI usage from another thread.
This commit is contained in:
@@ -3353,9 +3353,11 @@ void OBSBasic::RenderMain(void *data, uint32_t cx, uint32_t cy)
|
||||
gs_viewport_push();
|
||||
gs_projection_push();
|
||||
|
||||
QSize previewSize = GetPixelSize(window->ui->preview);
|
||||
float right = float(previewSize.width()) - window->previewX;
|
||||
float bottom = float(previewSize.height()) - window->previewY;
|
||||
obs_display_t *display = window->ui->preview->GetDisplay();
|
||||
uint32_t width, height;
|
||||
obs_display_size(display, &width, &height);
|
||||
float right = float(width) - window->previewX;
|
||||
float bottom = float(height) - window->previewY;
|
||||
|
||||
gs_ortho(-window->previewX, right,
|
||||
-window->previewY, bottom,
|
||||
|
||||
Reference in New Issue
Block a user