From 77ad24d8d47996c469365e773943569f154f36be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 18 Jul 2024 12:58:53 +0200 Subject: [PATCH 1/2] Add basic debug/build config for VS Code. Works in WSL (with CodeLLDB extension installed) --- .vscode/launch.json | 16 ++++++++++++++++ .vscode/tasks.json | 23 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000000..4ca8260df40f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug", + "program": "build/PPSSPPSDL", + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000000..faa2a39b906f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,23 @@ +{ + "tasks": [ + { + "type": "shell", + "label": "C/C++: build", + "command": "./b.sh", + "args": [ + "--debug", + ], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "compiler: /usr/bin/g++" + }, + ] +} \ No newline at end of file From d331e80542d4933bbaa29bc0e100e3703376739e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 18 Jul 2024 13:31:14 +0200 Subject: [PATCH 2/2] sceIoGetStat: Fix retrieving timestamps from directories --- Core/FileSystems/DirectoryFileSystem.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index b98fb0e68b7f..bdbd1a554ae3 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -697,15 +697,15 @@ PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) { if (x.type != FILETYPE_DIRECTORY) { x.size = info.size; - x.access = info.access; - time_t atime = info.atime; - time_t ctime = info.ctime; - time_t mtime = info.mtime; - - localtime_r((time_t*)&atime, &x.atime); - localtime_r((time_t*)&ctime, &x.ctime); - localtime_r((time_t*)&mtime, &x.mtime); } + x.access = info.access; + time_t atime = info.atime; + time_t ctime = info.ctime; + time_t mtime = info.mtime; + + localtime_r((time_t*)&atime, &x.atime); + localtime_r((time_t*)&ctime, &x.ctime); + localtime_r((time_t*)&mtime, &x.mtime); return ReplayApplyDiskFileInfo(x, CoreTiming::GetGlobalTimeUs()); }