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

@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <fmt/core.h>
#include "common/memory_patcher.h"
#include "emulator.h"
int main(int argc, char* argv[]) {
@ -10,7 +11,16 @@ int main(int argc, char* argv[]) {
return -1;
}
for (int i = 0; i < argc; i++) {
std::string curArg = argv[i];
if (curArg == "-p") {
std::string patchFile = argv[i + 1];
MemoryPatcher::patchFile = patchFile;
}
}
Core::Emulator emulator;
emulator.Run(argv[1]);
return 0;
}