Compare commits

...

11 Commits

Author SHA1 Message Date
Silent
33b366180e Qt/Patches, Cheats: Reload lists if serial changes 2025-01-11 09:04:51 -05:00
Silent
d8e310e7bf Qt/Patches: Use the game list serial when populating patches for the ELF
This makes the Game Properties window match the behaviour of the VM
when booting into a game.

Fixes #11533
2025-01-11 09:04:51 -05:00
Silent
534ddd80ae Patch: When serial is empty, don't match files on empty serial
Fixes a bug where _crc.pnach files matched the regex if serial
was not set. Also grey out "All CRCs" when serial is not set,
as the option is then meaningless.
2025-01-11 09:04:51 -05:00
chaoticgd
d34f2ec142 Debugger: Add disassembler toggle to go to the PC address on pause 2025-01-11 09:03:24 -05:00
TheTechnician27
7381a02dae SIO: Fix save state OSD warning formatting 2025-01-11 09:02:45 -05:00
RedPanda4552
333c7ef61b Memcard: Track file size globally at open
Prevents FSeek64 hits on every retrieval of memcard attributes
2025-01-09 15:47:56 +01:00
RedPanda4552
77d5a04aa4 Memcard: Remove support for legacy PSX card types with headers
Supporting legacy PSX cards with headers required constant size checks, thrashing IOP performance.
2025-01-09 15:47:56 +01:00
TheLastRar
d3effdb176 CI/Windows: Use LLVM 19 with MSBuild and CMake
Now using the Chocolatey install of LLVM
2025-01-09 15:46:34 +01:00
JordanTheToaster
d7e1350b95 CI/Windows: Use Windows Server 2025 2025-01-09 15:46:34 +01:00
PCSX2 Bot
14ac653e45 [ci skip] Qt: Update Base Translation. 2025-01-09 15:45:02 +01:00
spixi
a5e4274cd2 common: Add support for MATE Desktop. (#12174)
This extends the screensaver inhibition function to MATE Desktop,
2025-01-09 15:07:09 +01:00
16 changed files with 149 additions and 91 deletions

View File

@@ -13,7 +13,7 @@ jobs:
lint_vs_proj_files:
name: Lint VS Project Files
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
runs-on: windows-2019
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v4

View File

@@ -12,7 +12,7 @@ on:
os:
required: false
type: string
default: windows-2022
default: windows-2025
platform:
required: false
type: string
@@ -55,13 +55,31 @@ jobs:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- name: Tempfix Clang
if: inputs.configuration == 'CMake'
run: choco uninstall llvm
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure MSBuild Clang Version
if: inputs.configuration != 'CMake'
shell: pwsh
run: |
[string[]] $clang_cl = &clang-cl.exe --version
$version = [Regex]::Match($clang_cl[0], "(\d+\.\d+\.\d+)")
$path = $clang_cl[3].TrimStart("InstalledDir: ").TrimEnd("\bin")
$output = @"
<Project>
<PropertyGroup>
<LLVMInstallDir>$path</LLVMInstallDir>
<LLVMToolsVersion>$version</LLVMToolsVersion>
</PropertyGroup>
</Project>
"@
Write-Host $output
$output | Out-File Directory.build.props
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags
if: ${{ inputs.fetchTags }}

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include "common/Pcsx2Types.h"
@@ -22,6 +22,8 @@
#include <sys/wait.h>
#include <unistd.h>
#include <dbus/dbus.h>
#include <cstdlib>
#include <cstring>
// Returns 0 on failure (not supported by the operating system).
u64 GetPhysicalMemory()
@@ -101,6 +103,7 @@ static bool SetScreensaverInhibitDBus(const bool inhibit_requested, const char*
DBusMessage* message = nullptr;
DBusMessage* response = nullptr;
DBusMessageIter message_itr;
char* desktop_session = nullptr;
ScopedGuard cleanup = [&]() {
if (dbus_error_is_set(&error_dbus))
@@ -122,7 +125,17 @@ static bool SetScreensaverInhibitDBus(const bool inhibit_requested, const char*
s_cookie = 0;
s_comparison_connection = connection;
}
message = dbus_message_new_method_call("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", bus_method);
desktop_session = std::getenv("DESKTOP_SESSION");
if (desktop_session && std::strncmp(desktop_session, "mate", 4) == 0)
{
message = dbus_message_new_method_call("org.mate.ScreenSaver", "/org/mate/ScreenSaver", "org.mate.ScreenSaver", bus_method);
}
else
{
message = dbus_message_new_method_call("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", bus_method);
}
if (!message)
return false;
// Initialize an append iterator for the message, gets freed with the message.

View File

@@ -336,7 +336,7 @@ void CpuWidget::onVMPaused()
}
else
{
m_ui.disassemblyWidget->gotoAddress(m_cpu.getPC(), false);
m_ui.disassemblyWidget->gotoProgramCounterOnPause();
}
reloadCPUWidgets();

View File

@@ -656,6 +656,12 @@ void DisassemblyWidget::customMenuRequested(QPoint pos)
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextGoToAddress);
contextMenu->addAction(action = new QAction(tr("Go to in Memory View"), this));
connect(action, &QAction::triggered, this, [this]() { gotoInMemory(m_selectedAddressStart); });
contextMenu->addAction(action = new QAction(tr("Go to PC on Pause"), this));
action->setCheckable(true);
action->setChecked(m_goToProgramCounterOnPause);
connect(action, &QAction::triggered, this, [this](bool value) { m_goToProgramCounterOnPause = value; });
contextMenu->addSeparator();
contextMenu->addAction(action = new QAction(tr("Add Function"), this));
connect(action, &QAction::triggered, this, &DisassemblyWidget::contextAddFunction);
@@ -822,6 +828,12 @@ void DisassemblyWidget::gotoAddressAndSetFocus(u32 address)
gotoAddress(address, true);
}
void DisassemblyWidget::gotoProgramCounterOnPause()
{
if (m_goToProgramCounterOnPause)
gotoAddress(m_cpu->getPC(), false);
}
void DisassemblyWidget::gotoAddress(u32 address, bool should_set_focus)
{
const u32 destAddress = address & ~3;

View File

@@ -59,6 +59,7 @@ public slots:
void contextShowOpcode();
void gotoAddressAndSetFocus(u32 address);
void gotoProgramCounterOnPause();
void gotoAddress(u32 address, bool should_set_focus);
void setDemangle(bool demangle) { m_demangleFunctions = demangle; };
@@ -82,6 +83,7 @@ private:
bool m_demangleFunctions = true;
bool m_showInstructionOpcode = true;
bool m_goToProgramCounterOnPause = true;
DisassemblyManager m_disassemblyManager;
inline QString DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected);

View File

@@ -1346,9 +1346,8 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
if (action->isEnabled())
{
connect(action, &QAction::triggered, [entry]() {
SettingsWindow::openGamePropertiesDialog(entry, entry->title,
(entry->type != GameList::EntryType::ELF) ? entry->serial : std::string(),
entry->crc);
SettingsWindow::openGamePropertiesDialog(entry,
entry->title, entry->serial, entry->crc, entry->type == GameList::EntryType::ELF);
});
}
@@ -1564,7 +1563,7 @@ void MainWindow::onViewGamePropertiesActionTriggered()
if (entry)
{
SettingsWindow::openGamePropertiesDialog(
entry, entry->title, s_current_elf_override.isEmpty() ? entry->serial : std::string(), entry->crc);
entry, entry->title, entry->serial, entry->crc, !s_current_elf_override.isEmpty());
return;
}
}
@@ -1580,12 +1579,12 @@ void MainWindow::onViewGamePropertiesActionTriggered()
if (s_current_elf_override.isEmpty())
{
SettingsWindow::openGamePropertiesDialog(
nullptr, s_current_title.toStdString(), s_current_disc_serial.toStdString(), s_current_disc_crc);
nullptr, s_current_title.toStdString(), s_current_disc_serial.toStdString(), s_current_disc_crc, false);
}
else
{
SettingsWindow::openGamePropertiesDialog(
nullptr, s_current_title.toStdString(), std::string(), s_current_disc_crc);
nullptr, s_current_title.toStdString(), std::string(), s_current_disc_crc, true);
}
}

View File

@@ -56,6 +56,7 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
m_model_proxy->setFilterFixedString(text);
m_ui.cheatList->expandAll();
});
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList);
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"),
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
@@ -124,7 +125,7 @@ void GameCheatSettingsWidget::updateListEnabled()
m_ui.enableAll->setEnabled(cheats_enabled);
m_ui.disableAll->setEnabled(cheats_enabled);
m_ui.reloadCheats->setEnabled(cheats_enabled);
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled);
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !m_dialog->getSerial().empty());
m_ui.searchText->setEnabled(cheats_enabled);
}
@@ -210,6 +211,7 @@ void GameCheatSettingsWidget::reloadList()
m_parent_map.clear();
m_model->removeRows(0, m_model->rowCount());
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty() && m_ui.cheatList->isEnabled());
for (const Patch::PatchInfo& pi : m_patches)
{

View File

@@ -81,6 +81,7 @@ GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget
connect(m_ui.reload, &QPushButton::clicked, this, &GamePatchSettingsWidget::onReloadClicked);
connect(m_ui.allCRCsCheckbox, &QCheckBox::checkStateChanged, this, &GamePatchSettingsWidget::reloadList);
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList);
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"),
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
@@ -124,6 +125,7 @@ void GamePatchSettingsWidget::reloadList()
setGlobalWsPatchNoteVisibility(ws_patches_enabled_globally);
setGlobalNiPatchNoteVisibility(ni_patches_enabled_globally);
delete m_ui.scrollArea->takeWidget();
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty());
QWidget* container = new QWidget(m_ui.scrollArea);
QVBoxLayout* layout = new QVBoxLayout(container);

View File

@@ -156,7 +156,15 @@ void GameSummaryWidget::onDiscPathChanged(const QString& value)
// force rescan of elf to update the serial
g_main_window->rescanFile(m_entry_path);
repopulateCurrentDetails();
auto lock = GameList::GetLock();
const GameList::Entry* entry = GameList::GetEntryForPath(m_entry_path.c_str());
if (entry)
{
populateDetails(entry);
m_dialog->setSerial(entry->serial);
m_ui.checkWiki->setEnabled(!entry->serial.empty());
}
}
void GameSummaryWidget::onDiscPathBrowseClicked()

View File

@@ -447,6 +447,12 @@ void SettingsWindow::setWindowTitle(const QString& title)
QWidget::setWindowTitle(QStringLiteral("%1 [%2]").arg(title, m_filename));
}
void SettingsWindow::setSerial(std::string serial)
{
m_serial = std::move(serial);
emit discSerialChanged();
}
bool SettingsWindow::getEffectiveBoolValue(const char* section, const char* key, bool default_value) const
{
bool value;
@@ -649,9 +655,9 @@ void SettingsWindow::saveAndReloadGameSettings()
g_emu_thread->reloadGameSettings();
}
void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc)
void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc, bool is_elf)
{
std::string filename = VMManager::GetGameSettingsPath(serial, disc_crc);
std::string filename = VMManager::GetGameSettingsPath(!is_elf ? serial : std::string_view(), disc_crc);
// check for an existing dialog with this filename
for (SettingsWindow* dialog : s_open_game_properties_dialogs)

View File

@@ -45,7 +45,7 @@ public:
u32 disc_crc, QString filename = QString());
~SettingsWindow();
static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc);
static void openGamePropertiesDialog(const GameList::Entry* game, const std::string_view title, std::string serial, u32 disc_crc, bool is_elf);
static void closeGamePropertiesDialogs();
SettingsInterface* getSettingsInterface() const;
@@ -72,6 +72,7 @@ public:
bool eventFilter(QObject* object, QEvent* event) override;
void setWindowTitle(const QString& title);
void setSerial(std::string serial);
QString getCategory() const;
void setCategory(const char* category);
@@ -96,7 +97,7 @@ public:
void saveAndReloadGameSettings();
Q_SIGNALS:
void settingsResetToDefaults();
void discSerialChanged();
private Q_SLOTS:
void onCategoryCurrentRowChanged(int row);

View File

@@ -18195,12 +18195,12 @@ Ejecting {3} and replacing it with {2}.</source>
<context>
<name>Patch</name>
<message>
<location filename="../../pcsx2/Patch.cpp" line="350"/>
<location filename="../../pcsx2/Patch.cpp" line="352"/>
<source>Failed to open {}. Built-in game patches are not available.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../../pcsx2/Patch.cpp" line="726"/>
<location filename="../../pcsx2/Patch.cpp" line="760"/>
<source>%n GameDB patches are active.</source>
<comment>OSD Message</comment>
<translation type="unfinished">
@@ -18209,7 +18209,7 @@ Ejecting {3} and replacing it with {2}.</source>
</translation>
</message>
<message numerus="yes">
<location filename="../../pcsx2/Patch.cpp" line="733"/>
<location filename="../../pcsx2/Patch.cpp" line="767"/>
<source>%n game patches are active.</source>
<comment>OSD Message</comment>
<translation type="unfinished">
@@ -18218,7 +18218,7 @@ Ejecting {3} and replacing it with {2}.</source>
</translation>
</message>
<message numerus="yes">
<location filename="../../pcsx2/Patch.cpp" line="740"/>
<location filename="../../pcsx2/Patch.cpp" line="774"/>
<source>%n cheat patches are active.</source>
<comment>OSD Message</comment>
<translation type="unfinished">
@@ -18227,7 +18227,7 @@ Ejecting {3} and replacing it with {2}.</source>
</translation>
</message>
<message>
<location filename="../../pcsx2/Patch.cpp" line="755"/>
<location filename="../../pcsx2/Patch.cpp" line="789"/>
<source>No cheats or patches (widescreen, compatibility or others) are found / enabled.</source>
<translation type="unfinished"></translation>
</message>
@@ -21827,177 +21827,177 @@ Error was: {}</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3054"/>
<location filename="../../pcsx2/VMManager.cpp" line="3055"/>
<source>Cheats have been disabled due to achievements hardcore mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3107"/>
<location filename="../../pcsx2/VMManager.cpp" line="3108"/>
<source>Fast CDVD is enabled, this may break games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3111"/>
<location filename="../../pcsx2/VMManager.cpp" line="3112"/>
<source>Cycle rate/skip is not at default, this may crash or make games run too slow.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3121"/>
<location filename="../../pcsx2/VMManager.cpp" line="3122"/>
<source>Upscale multiplier is below native, this will break rendering.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3161"/>
<location filename="../../pcsx2/VMManager.cpp" line="3162"/>
<source>Mipmapping is disabled. This may break rendering in some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3170"/>
<location filename="../../pcsx2/VMManager.cpp" line="3171"/>
<source>Renderer is not set to Automatic. This may cause performance problems and graphical issues.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3176"/>
<location filename="../../pcsx2/VMManager.cpp" line="3177"/>
<source>Texture filtering is not set to Bilinear (PS2). This will break rendering in some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3639"/>
<location filename="../../pcsx2/VMManager.cpp" line="3640"/>
<source>No Game Running</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3126"/>
<location filename="../../pcsx2/VMManager.cpp" line="3127"/>
<source>Trilinear filtering is not set to automatic. This may break rendering in some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3131"/>
<location filename="../../pcsx2/VMManager.cpp" line="3132"/>
<source>Blending Accuracy is below Basic, this may break effects in some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3136"/>
<location filename="../../pcsx2/VMManager.cpp" line="3137"/>
<source>Hardware Download Mode is not set to Accurate, this may break rendering in some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3182"/>
<location filename="../../pcsx2/VMManager.cpp" line="3183"/>
<source>EE FPU Round Mode is not set to default, this may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3188"/>
<location filename="../../pcsx2/VMManager.cpp" line="3189"/>
<source>EE FPU Clamp Mode is not set to default, this may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3193"/>
<location filename="../../pcsx2/VMManager.cpp" line="3194"/>
<source>VU0 Round Mode is not set to default, this may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3198"/>
<location filename="../../pcsx2/VMManager.cpp" line="3199"/>
<source>VU1 Round Mode is not set to default, this may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3205"/>
<location filename="../../pcsx2/VMManager.cpp" line="3206"/>
<source>VU Clamp Mode is not set to default, this may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3210"/>
<location filename="../../pcsx2/VMManager.cpp" line="3211"/>
<source>128MB RAM is enabled. Compatibility with some games may be affected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3215"/>
<location filename="../../pcsx2/VMManager.cpp" line="3216"/>
<source>Game Fixes are not enabled. Compatibility with some games may be affected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3220"/>
<location filename="../../pcsx2/VMManager.cpp" line="3221"/>
<source>Compatibility Patches are not enabled. Compatibility with some games may be affected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3224"/>
<location filename="../../pcsx2/VMManager.cpp" line="3225"/>
<source>Frame rate for NTSC is not default. This may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3226"/>
<location filename="../../pcsx2/VMManager.cpp" line="3227"/>
<source>Frame rate for PAL is not default. This may break some games.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3245"/>
<location filename="../../pcsx2/VMManager.cpp" line="3246"/>
<source>EE Recompiler is not enabled, this will significantly reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3250"/>
<location filename="../../pcsx2/VMManager.cpp" line="3251"/>
<source>VU0 Recompiler is not enabled, this will significantly reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3255"/>
<location filename="../../pcsx2/VMManager.cpp" line="3256"/>
<source>VU1 Recompiler is not enabled, this will significantly reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3260"/>
<location filename="../../pcsx2/VMManager.cpp" line="3261"/>
<source>IOP Recompiler is not enabled, this will significantly reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3265"/>
<location filename="../../pcsx2/VMManager.cpp" line="3266"/>
<source>EE Cache is enabled, this will significantly reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3270"/>
<location filename="../../pcsx2/VMManager.cpp" line="3271"/>
<source>EE Wait Loop Detection is not enabled, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3275"/>
<location filename="../../pcsx2/VMManager.cpp" line="3276"/>
<source>INTC Spin Detection is not enabled, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3278"/>
<location filename="../../pcsx2/VMManager.cpp" line="3279"/>
<source>Fastmem is not enabled, this will reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3282"/>
<location filename="../../pcsx2/VMManager.cpp" line="3283"/>
<source>Instant VU1 is disabled, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3287"/>
<location filename="../../pcsx2/VMManager.cpp" line="3288"/>
<source>mVU Flag Hack is not enabled, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3141"/>
<location filename="../../pcsx2/VMManager.cpp" line="3142"/>
<source>GPU Palette Conversion is enabled, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3146"/>
<location filename="../../pcsx2/VMManager.cpp" line="3147"/>
<source>Texture Preloading is not Full, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3151"/>
<location filename="../../pcsx2/VMManager.cpp" line="3152"/>
<source>Estimate texture region is enabled, this may reduce performance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/VMManager.cpp" line="3156"/>
<location filename="../../pcsx2/VMManager.cpp" line="3157"/>
<source>Texture dumping is enabled, this will continually dump textures to disk.</source>
<translation type="unfinished"></translation>
</message>

View File

@@ -368,12 +368,14 @@ bool Patch::OpenPatchesZip()
std::string Patch::GetPnachTemplate(const std::string_view serial, u32 crc, bool include_serial, bool add_wildcard, bool all_crcs)
{
pxAssert(!all_crcs || (include_serial && add_wildcard));
if (all_crcs)
return fmt::format("{}_*.pnach", serial);
else if (include_serial)
return fmt::format("{}_{:08X}{}.pnach", serial, crc, add_wildcard ? "*" : "");
else
return fmt::format("{:08X}{}.pnach", crc, add_wildcard ? "*" : "");
if (!serial.empty())
{
if (all_crcs)
return fmt::format("{}_*.pnach", serial);
else if (include_serial)
return fmt::format("{}_{:08X}{}.pnach", serial, crc, add_wildcard ? "*" : "");
}
return fmt::format("{:08X}{}.pnach", crc, add_wildcard ? "*" : "");
}
std::vector<std::string> Patch::FindPatchFilesOnDisk(const std::string_view serial, u32 crc, bool cheats, bool all_crcs)

View File

@@ -157,6 +157,7 @@ class FileMemoryCard
{
protected:
std::FILE* m_file[8] = {};
s64 m_fileSize[8] = {};
std::string m_filenames[8] = {};
std::vector<u8> m_currentdata;
u64 m_chksum[8] = {};
@@ -246,7 +247,13 @@ std::string FileMcd_GetDefaultName(uint slot)
return StringUtil::StdStringFromFormat("Mcd%03u.ps2", slot + 1);
}
FileMemoryCard::FileMemoryCard() = default;
FileMemoryCard::FileMemoryCard()
{
for (u8 slot = 0; slot < 8; slot++)
{
m_fileSize[slot] = -1;
}
}
FileMemoryCard::~FileMemoryCard() = default;
@@ -314,12 +321,14 @@ void FileMemoryCard::Open()
}
else // Load checksum
{
m_fileSize[slot] = FileSystem::FSize64(m_file[slot]);
Console.WriteLnFmt(Color_Green, "McdSlot {} [File]: {} [{} MB, {}]", slot, Path::GetFileName(fname),
(FileSystem::FSize64(m_file[slot]) + (MCD_SIZE + 1)) / MC2_MBSIZE,
(m_fileSize[slot] + (MCD_SIZE + 1)) / MC2_MBSIZE,
FileMcd_IsMemoryCardFormatted(m_file[slot]) ? "Formatted" : "UNFORMATTED");
m_filenames[slot] = std::move(fname);
m_ispsx[slot] = FileSystem::FSize64(m_file[slot]) == 0x20000;
m_ispsx[slot] = m_fileSize[slot] == 0x20000;
m_chkaddr = 0x210;
if (!m_ispsx[slot] && FileSystem::FSeek64(m_file[slot], m_chkaddr, SEEK_SET) == 0)
@@ -354,30 +363,14 @@ void FileMemoryCard::Close()
}
m_filenames[slot] = {};
m_fileSize[slot] = -1;
}
}
// Returns FALSE if the seek failed (is outside the bounds of the file).
bool FileMemoryCard::Seek(std::FILE* f, u32 adr)
{
const s64 size = FileSystem::FSize64(f);
// If anyone knows why this filesize logic is here (it appears to be related to legacy PSX
// cards, perhaps hacked support for some special emulator-specific memcard formats that
// had header info?), then please replace this comment with something useful. Thanks! -- air
u32 offset = 0;
if (size == MCD_SIZE + 64)
offset = 64;
else if (size == MCD_SIZE + 3904)
offset = 3904;
else
{
// perform sanity checks here?
}
return (FileSystem::FSeek64(f, adr + offset, SEEK_SET) == 0);
return (FileSystem::FSeek64(f, adr, SEEK_SET) == 0);
}
// returns FALSE if an error occurred (either permission denied or disk full)
@@ -415,7 +408,7 @@ void FileMemoryCard::GetSizeInfo(uint slot, McdSizeInfo& outways)
pxAssert(m_file[slot]);
if (m_file[slot])
outways.McdSizeInSectors = static_cast<u32>(FileSystem::FSize64(m_file[slot])) / (outways.SectorSize + outways.EraseBlockSizeInSectors);
outways.McdSizeInSectors = static_cast<u32>(m_fileSize[slot]) / (outways.SectorSize + outways.EraseBlockSizeInSectors);
else
outways.McdSizeInSectors = 0x4000;
@@ -542,7 +535,7 @@ u64 FileMemoryCard::GetCRC(uint slot)
if (!Seek(mcfp, 0))
return 0;
const s64 mcfpsize = FileSystem::FSize64(mcfp);
const s64 mcfpsize = m_fileSize[slot];
if (mcfpsize < 0)
return 0;

View File

@@ -162,6 +162,6 @@ void MemcardBusy::CheckSaveStateDependency()
if (g_FrameCount - sioLastFrameMcdBusy > NUM_FRAMES_BEFORE_SAVESTATE_DEPENDENCY_WARNING)
{
Host::AddIconOSDMessage("MemcardBusy", ICON_PF_MEMORY_CARD,
TRANSLATE_SV("MemoryCard", "The virtual console hasn't saved to your memory card for quite some time. Savestates should not be used in place of in-game saves."), Host::OSD_INFO_DURATION);
TRANSLATE_SV("MemoryCard", "The virtual console hasn't saved to your memory card in a long time.\nSavestates should not be used in place of in-game saves."), Host::OSD_INFO_DURATION);
}
}