mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-02 08:16:31 +00:00
6295d6c416
* Use filesystem::path whenever possible, remove fs::path::string * My hatred for Windows grows with every passing day * More Qt stuff * custom u8string formatter for fmt library * Use u8string for imgui * Fix toml errors hopefully * Fix not printing issue * Oh and on SDL * I hate Windows even more today * fix toml reading utf-8 paths also small fix for fmt::UTF * Formatting * Fix QT path to run games * Fix path logging in save data * Fix trophy path handling * Update game_list_frame.cpp fixed snd0path * Update main_window.cpp fix snd0path * Update main_window.cpp * paths finally fixed * git info in WIP versions title --------- Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev> Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
40 lines
889 B
C++
40 lines
889 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include <fmt/core.h>
|
|
#include "common/memory_patcher.h"
|
|
#include "emulator.h"
|
|
|
|
#ifdef _WIN32
|
|
#include <windows.h>
|
|
#endif
|
|
|
|
int main(int argc, char* argv[]) {
|
|
#ifdef _WIN32
|
|
SetConsoleOutputCP(CP_UTF8);
|
|
#endif
|
|
|
|
if (argc == 1) {
|
|
fmt::print("Usage: {} <elf or eboot.bin path>\n", argv[0]);
|
|
return -1;
|
|
}
|
|
// check if eboot file exists
|
|
if (!std::filesystem::exists(argv[1])) {
|
|
fmt::print("Eboot.bin file not found\n");
|
|
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;
|
|
}
|