properly sync up menus between windows of a same instance

This commit is contained in:
Arisotura
2024-10-27 16:21:09 +01:00
parent 94955aee81
commit d79d45a117
3 changed files with 38 additions and 9 deletions

View File

@ -240,6 +240,17 @@ void EmuInstance::deleteAllWindows()
deleteWindow(i, true);
}
void EmuInstance::doOnAllWindows(std::function<void(MainWindow*)> func, int exclude)
{
for (int i = 0; i < kMaxWindows; i++)
{
if (i == exclude) continue;
if (!windowList[i]) continue;
func(windowList[i]);
}
}
void EmuInstance::broadcastCommand(int cmd, QVariant param)
{