Enable patches on cli builds (#897)

* patch support for cli

* fix mac build

* format
This commit is contained in:
CrazyBloo 2024-09-13 00:44:20 -04:00 committed by GitHub
parent de183d3b80
commit ab201398b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 164 additions and 50 deletions

View file

@ -28,9 +28,9 @@
#include <QXmlStreamReader>
#include <common/logging/log.h>
#include "cheats_patches.h"
#include "common/memory_patcher.h"
#include "common/path_util.h"
#include "core/module.h"
#include "qt_gui/memory_patcher.h"
using namespace Common::FS;
@ -1178,7 +1178,8 @@ void CheatsPatches::applyPatch(const QString& patchName, bool enabled) {
QString patchValue = lineObject["Value"].toString();
QString maskOffsetStr = lineObject["Offset"].toString();
patchValue = MemoryPatcher::convertValueToHex(type, patchValue);
patchValue = QString::fromStdString(
MemoryPatcher::convertValueToHex(type.toStdString(), patchValue.toStdString()));
bool littleEndian = false;