Fix log file path

This commit is contained in:
Pengfei
2021-09-10 22:09:21 +08:00
parent c4e5e05b8d
commit 1e78eefa03
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
#endif
#define CITRA_EXECUTABLE "citra-qt"
#define LOG_FILE "threeSD.log.txt"
#define LOG_FILE "threeSD_log.txt"
// Subdirs in the User dir returned by GetUserPath(UserPath::UserDir)
#define CONFIG_DIR "config"
+6 -4
View File
@@ -6,8 +6,6 @@
#include <cstdio>
#ifdef _WIN32
#include <share.h> // For _SH_DENYWR
#else
#define _SH_DENYWR 0
#endif
#include "common/common_paths.h"
@@ -24,8 +22,12 @@ std::uint64_t GetLoggingTime() {
.count();
}
// _SH_DENYWR allows read-only access for other programs. For non-Windows it's defined to 0.
static FileUtil::IOFile g_log_file{LOG_FILE, "w", _SH_DENYWR};
#ifdef __WIN32
// _SH_DENYWR allows read-only access for other programs.
static FileUtil::IOFile g_log_file{FileUtil::GetExeDirectory() + DIR_SEP LOG_FILE, "w", _SH_DENYWR};
#else
static FileUtil::IOFile g_log_file{ROOT_DIR DIR_SEP LOG_FILE, "w"};
#endif
static std::array<Entry, 3> g_error_buffer{};
static int g_error_buffer_pos = 0;