mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 00:42:48 +00:00
Review comments
This commit is contained in:
parent
adaeb7ca6d
commit
0063fcbc03
@ -143,7 +143,7 @@ public:
|
||||
void Relocate(Module* module);
|
||||
bool Resolve(const std::string& name, Loader::SymbolType type, Module* module,
|
||||
Loader::SymbolRecord* return_info);
|
||||
void Execute(const std::vector<std::string> args = std::vector<std::string>());
|
||||
void Execute(const std::vector<std::string> args = {});
|
||||
void DebugDump();
|
||||
|
||||
private:
|
||||
|
@ -152,7 +152,7 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
|
||||
psf_attributes.raw = *raw_attributes;
|
||||
}
|
||||
if (!args.empty()) {
|
||||
int argc = args.size() > 32 ? 32 : args.size();
|
||||
int argc = std::min<int>(args.size(), 32);
|
||||
for (int i = 0; i < argc; i++) {
|
||||
LOG_INFO(Loader, "Game argument {}: {}", i, args[i]);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
~Emulator();
|
||||
|
||||
void Run(const std::filesystem::path& file,
|
||||
const std::vector<std::string> args = std::vector<std::string>());
|
||||
const std::vector<std::string> args = {});
|
||||
void UpdatePlayTime(const std::string& serial);
|
||||
|
||||
private:
|
||||
|
@ -139,18 +139,11 @@ int main(int argc, char* argv[]) {
|
||||
game_args.push_back(argv[j]);
|
||||
}
|
||||
break;
|
||||
} else if (std::string(argv[i + 1]) == "--") {
|
||||
} else if (i + 1 < argc && std::string(argv[i + 1]) == "--") {
|
||||
if (!has_game_argument) {
|
||||
game_path = argv[i];
|
||||
has_game_argument = true;
|
||||
}
|
||||
if (i + 2 == argc) {
|
||||
std::cerr << "Warning: -- is set, but no game arguments are added!\n";
|
||||
break;
|
||||
}
|
||||
for (int j = i + 2; j < argc; j++) {
|
||||
game_args.push_back(argv[j]);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n";
|
||||
|
@ -144,19 +144,11 @@ int main(int argc, char* argv[]) {
|
||||
game_args.push_back(argv[j]);
|
||||
}
|
||||
break;
|
||||
} else if (std::string(argv[i + 1]) == "--") {
|
||||
} else if (i + 1 < argc && std::string(argv[i + 1]) == "--") {
|
||||
if (!has_game_argument) {
|
||||
game_path = argv[i];
|
||||
has_game_argument = true;
|
||||
}
|
||||
if (i + 2 == argc) {
|
||||
std::cerr << "Warning: -- is set, but no game arguments are added!\n";
|
||||
break;
|
||||
}
|
||||
for (int j = i + 2; j < argc; j++) {
|
||||
game_args.push_back(argv[j]);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n";
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user