mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-18 01:14:56 +00:00
common: Rewrite logging based on cut down citra logger (#86)
* common: Rewrite logging based on cut down Citra logger * code: Misc fixes * core: Bring back tls handler * linker: Cleanup * config: Remove log level * logging: Enable console output by default * core: Fix windows build
This commit is contained in:
parent
b3084646a8
commit
79d6c8a377
70 changed files with 3212 additions and 1541 deletions
13
src/main.cpp
13
src/main.cpp
|
@ -12,13 +12,15 @@
|
|||
#include <core/hle/libraries/libkernel/thread_management.h>
|
||||
#include "Util/config.h"
|
||||
#include "common/discord.h"
|
||||
#include "common/log.h"
|
||||
#include "common/logging/backend.h"
|
||||
#include "common/path_util.h"
|
||||
#include "common/singleton.h"
|
||||
#include "common/types.h"
|
||||
#include "core/PS4/HLE/Graphics/video_out.h"
|
||||
#include "core/file_sys/fs.h"
|
||||
#include "core/hle/libraries/libs.h"
|
||||
#include "core/linker.h"
|
||||
#include "core/tls.h"
|
||||
#include "emulator.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
@ -26,8 +28,10 @@ int main(int argc, char* argv[]) {
|
|||
fmt::print("Usage: {} <elf or eboot.bin path>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
Config::load("config.toml");
|
||||
Common::Log::Init(true);
|
||||
const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir);
|
||||
Config::load(config_dir / "config.toml");
|
||||
Common::Log::Initialize();
|
||||
Common::Log::Start();
|
||||
Core::Libraries::LibKernel::init_pthreads();
|
||||
auto width = Config::getScreenWidth();
|
||||
auto height = Config::getScreenHeight();
|
||||
|
@ -39,10 +43,11 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
|
||||
std::filesystem::path p = std::string(path);
|
||||
mnt->mount(p.parent_path().string(), "/app0");
|
||||
mnt->Mount(p.parent_path(), "/app0");
|
||||
|
||||
auto linker = Common::Singleton<Core::Linker>::Instance();
|
||||
Core::Libraries::InitHLELibs(&linker->getHLESymbols());
|
||||
Core::InstallTlsHandler();
|
||||
linker->LoadModule(path);
|
||||
std::jthread mainthread([linker](std::stop_token stop_token, void*) { linker->Execute(); },
|
||||
nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue