New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WX: Disable a few menu items when a Wii title is running #5185
Conversation
Can't we use |
No. For popups, that doesn't make sense; we could do this for the menu bar, but it wouldn't be any more efficient since RefreshWiiToolsLabels is already only called when needed. And OnEnableIfCoreNotRunning doesn't give us everything we want ("is a Wii title running", not just "is Core running") |
I'm fine with this; I tried messing with a bunch of options in odd ways last month. It didn't work out. And, as I've been made aware, this will stop working eventually anyway, and it's unsafe as is. |
@@ -545,7 +545,7 @@ void MainMenuBar::RefreshSaveStateMenuLabels() const | |||
} | |||
} | |||
|
|||
void MainMenuBar::RefreshWiiSystemMenuLabel() const | |||
void MainMenuBar::RefreshWiiToolsLabels() const |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
// an inconsistent state; the emulated software can do *anything* to its data directory, | ||
// and we definitely do not want the user to touch anything in there if it's running. | ||
for (const int index : {IDM_OPEN_SAVE_FOLDER, IDM_EXPORT_SAVE}) | ||
popupMenu.FindItem(index)->Enable(!Core::IsRunning() || !SConfig::GetInstance().bWii); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
popupMenu.Append(IDM_LIST_INSTALL_WAD, _("Install to Wii Menu")); | ||
// This should not be allowed while emulation is running, just like the Install WAD option. | ||
popupMenu.FindItem(IDM_LIST_INSTALL_WAD) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
7a4e1cf
to
e346181
Compare
Fixed. |
// emulation is running, because this could result in the exported save being in | ||
// an inconsistent state; the emulated software can do *anything* to its data directory, | ||
// and we definitely do not want the user to touch anything in there if it's running. | ||
for (auto* menu_item : {open_save_folder_item, export_save_item}) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Unsafe and keeping them enabled would allow inaccurate behaviour that can break games.
e346181
to
d8089a4
Compare
Unsafe and keeping them enabled would allow inaccurate behaviour that can break games.