mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-05 03:46:58 -04:00
create a sizing callback for the preview panel specifically, apparently on macos the window size isn't guaranteed to be the size it's set to in the main window size handler
This commit is contained in:
1 parent
c71eb041b6
commit
1302e65ee6
6 files changed
+18
-5
No files matched your search
@@ -185,11 +185,20 @@ void OBSBasic::OnSize(wxSizeEvent &event)
|
||||
return;
|
||||
|
||||
ResizePreview(ovi.base_width, ovi.base_height);
|
||||
}
|
||||
|
||||
void OBSBasic::OnResizePreview(wxSizeEvent &event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
wxSize newSize = previewPanel->GetMinSize();
|
||||
|
||||
gs_entercontext(obs_graphics());
|
||||
gs_resize(newSize.x, newSize.y);
|
||||
gs_leavecontext();
|
||||
graphics_t graphics = obs_graphics();
|
||||
if (graphics) {
|
||||
gs_entercontext(graphics);
|
||||
gs_resize(newSize.x, newSize.y);
|
||||
gs_leavecontext();
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::fileNewClicked(wxCommandEvent &event)
|
||||
|
||||
Reference in new issue
Block a user