Reinit panel on vsync toggle.

Destroy the DrawingPanel on vsync checkbox toggle so that it is
re-created with the vsync option in effect.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2022-10-21 21:43:13 +00:00
parent ec27885c36
commit da686a4827
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 5 additions and 0 deletions

View File

@ -3210,6 +3210,11 @@ EVT_HANDLER(VSync, "Wait for vertical sync")
{
GetMenuOptionInt("VSync", &vsync, 1);
update_opts();
if (panel->panel) {
panel->panel->Destroy();
panel->panel = nullptr;
}
}
void MainFrame::EnableNetworkMenu()