mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-23 16:11:52 -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:
@@ -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