mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 11:35:45 +00:00
use strncpy for linux
This commit is contained in:
parent
85c27ad8a0
commit
27fe60001a
2 changed files with 18 additions and 5 deletions
|
@ -359,7 +359,7 @@ s32 PS4_SYSV_ABI sceSaveDataMount2(const OrbisSaveDataMount2* mount,
|
|||
mnt->Mount(mount_dir, g_mount_point);
|
||||
|
||||
mount_result->mount_status = 0;
|
||||
strcpy_s(mount_result->mount_point.data, 16, g_mount_point.c_str());
|
||||
strncpy(mount_result->mount_point.data, g_mount_point.c_str(), 16);
|
||||
}
|
||||
if (create) {
|
||||
if (std::filesystem::is_directory(mount_dir)) {
|
||||
|
@ -371,7 +371,7 @@ s32 PS4_SYSV_ABI sceSaveDataMount2(const OrbisSaveDataMount2* mount,
|
|||
mnt->Mount(mount_dir, g_mount_point);
|
||||
|
||||
mount_result->mount_status = 1;
|
||||
strcpy_s(mount_result->mount_point.data, 16, g_mount_point.c_str());
|
||||
strncpy(mount_result->mount_point.data, g_mount_point.c_str(), 16);
|
||||
}
|
||||
mount_result->required_blocks = 0;
|
||||
|
||||
|
|
19
src/main.cpp
19
src/main.cpp
|
@ -22,10 +22,10 @@
|
|||
#include "emulator.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
if (argc == 1) {
|
||||
/* if (argc == 1) {
|
||||
fmt::print("Usage: {} <elf or eboot.bin path>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
}*/
|
||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::load(config_dir / "config.toml");
|
||||
Common::Log::Initialize();
|
||||
|
@ -37,7 +37,20 @@ int main(int argc, char* argv[]) {
|
|||
HLE::Libs::Graphics::VideoOut::videoOutInit(width, height);
|
||||
|
||||
// Argument 1 is the path of self file to boot
|
||||
const char* const path = argv[1];
|
||||
// const char* const path = argv[1];
|
||||
|
||||
//const char* const path = "C://ps4//games//CUSA09415-Undertale//eboot.bin";
|
||||
// const char* const path = "C://ps4//games//CUSA30991//eboot.bin"; //teenage shredder
|
||||
// const char* const path = "C://ps4//games//CUSA01997//eboot.bin"; // teenage muntant
|
||||
// const char* const path = "C://ps4//games//CUSA07010-SonicMania//eboot.bin";
|
||||
const char* const path = "C://ps4//games//CUSA05694//eboot.bin";//momodora
|
||||
// const char* const path = "C:\\ps4\\games\\CUSA02394\\eboot.bin"; //we are doomed
|
||||
// const char* const path = "C:\\ps4\\games\\CUSA05362\\eboot.bin";//ronin
|
||||
|
||||
// open orbis samples
|
||||
// const char* const path = "C://ps4//games//OpenOrbisDlg//eboot.bin";
|
||||
// ps4 sdk samples
|
||||
// const char* const path = "C:\\ps4\\ps4sdksamples\\simplet-simple-fs.elf";
|
||||
|
||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||
std::filesystem::path p = std::string(path);
|
||||
|
|
Loading…
Add table
Reference in a new issue