Skip to content

Commit

Permalink
Memcard: Remove option to disable auto eject
Browse files Browse the repository at this point in the history
  • Loading branch information
RedPanda4552 authored and refractionpcsx2 committed Dec 18, 2023
1 parent 158193a commit 05ed785
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 20 deletions.
4 changes: 0 additions & 4 deletions pcsx2-qt/Settings/MemoryCardSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidg

SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.directory, m_ui.browse, m_ui.open, m_ui.reset, "Folders",
"MemoryCards", Path::Combine(EmuFolders::DataRoot, "memcards"));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.autoEject, "EmuCore", "McdEnableEjection", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.automaticManagement, "EmuCore", "McdFolderAutoManage", true);

setupAdditionalUi();
Expand All @@ -76,9 +75,6 @@ MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidg

refresh();

dialog->registerWidgetHelp(m_ui.autoEject, tr("Auto-eject Memory Cards when loading save states"), tr("Checked"),
tr("Avoids broken Memory Card saves. May not work with some games such as Guitar Hero."));

dialog->registerWidgetHelp(m_ui.automaticManagement, tr("Automatically manage saves based on running game"),
tr("Checked"),
tr("(Folder type only / Card size: Auto) Loads only the relevant booted game saves, ignoring others. Avoids "
Expand Down
9 changes: 1 addition & 8 deletions pcsx2-qt/Settings/MemoryCardSettingsWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,13 @@
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<item row="0" column="0">
<widget class="QCheckBox" name="automaticManagement">
<property name="text">
<string>Automatically manage saves based on running game</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="autoEject">
<property name="text">
<string>Auto-eject Memory Cards when loading save states</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
2 changes: 0 additions & 2 deletions pcsx2/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1298,8 +1298,6 @@ struct Pcsx2Config
InhibitScreensaver : 1,
BackupSavestate : 1,
SavestateZstdCompression : 1,
// enables simulated ejection of memory cards when loading savestates
McdEnableEjection : 1,
McdFolderAutoManage : 1,

HostFs : 1,
Expand Down
2 changes: 0 additions & 2 deletions pcsx2/ImGui/FullscreenUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3663,8 +3663,6 @@ void FullscreenUI::DrawMemoryCardSettingsPage()
DrawFolderSetting(bsi, FSUI_ICONSTR(ICON_FA_FOLDER_OPEN, "Memory Card Directory"), "Folders", "MemoryCards", EmuFolders::MemoryCards);
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_SEARCH, "Folder Memory Card Filter"),
FSUI_CSTR("Simulates a larger memory card by filtering saves only to the current game."), "EmuCore", "McdFolderAutoManage", true);
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Auto Eject When Loading"),
FSUI_CSTR("Automatically ejects Memory Cards when they differ after loading a state."), "EmuCore", "McdEnableEjection", true);

for (u32 port = 0; port < NUM_MEMORY_CARD_PORTS; port++)
{
Expand Down
2 changes: 0 additions & 2 deletions pcsx2/Pcsx2Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,6 @@ Pcsx2Config::Pcsx2Config()
{
bitset = 0;
// Set defaults for fresh installs / reset settings
McdEnableEjection = true;
McdFolderAutoManage = true;
EnablePatches = true;
EnableFastBoot = true;
Expand Down Expand Up @@ -1537,7 +1536,6 @@ void Pcsx2Config::LoadSaveCore(SettingsWrapper& wrap)

SettingsWrapBitBool(BackupSavestate);
SettingsWrapBitBool(SavestateZstdCompression);
SettingsWrapBitBool(McdEnableEjection);
SettingsWrapBitBool(McdFolderAutoManage);

SettingsWrapBitBool(WarnAboutUnsafeSettings);
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/SIO/Sio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void AutoEject::CountDownTicks()

void AutoEject::Set(size_t port, size_t slot)
{
if (EmuConfig.McdEnableEjection && mcds[port][slot].autoEjectTicks == 0)
if (mcds[port][slot].autoEjectTicks == 0)
{
mcds[port][slot].autoEjectTicks = 1; // 1 second is enough.
mcds[port][slot].term = 0x55; // Reset terminator to default (0x55), forces the PS2 to recheck the memcard.
Expand Down
1 change: 0 additions & 1 deletion pcsx2/VMManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2404,7 +2404,6 @@ void VMManager::CheckForMemoryCardConfigChanges(const Pcsx2Config& old_config)
}
}

changed |= (EmuConfig.McdEnableEjection != old_config.McdEnableEjection);
changed |= (EmuConfig.McdFolderAutoManage != old_config.McdFolderAutoManage);

if (!changed)
Expand Down

0 comments on commit 05ed785

Please sign in to comment.