early-access version 1664

This commit is contained in:
pineappleEA
2021-05-08 09:49:31 +02:00
parent c6b346cfbb
commit 394300898e
72 changed files with 3883 additions and 791 deletions

View File

@@ -11,7 +11,9 @@
#include <thread>
#include <fmt/chrono.h>
#include <fmt/format.h>
#include "common/file_util.h"
#include "common/fs/file.h"
#include "common/fs/fs.h"
#include "common/fs/path_util.h"
#include "common/math_util.h"
#include "common/settings.h"
#include "core/perf_stats.h"
@@ -38,12 +40,17 @@ PerfStats::~PerfStats() {
std::ostringstream stream;
std::copy(perf_history.begin() + IgnoreFrames, perf_history.begin() + current_index,
std::ostream_iterator<double>(stream, "\n"));
const std::string& path = Common::FS::GetUserPath(Common::FS::UserPath::LogDir);
const auto path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::LogDir);
// %F Date format expanded is "%Y-%m-%d"
const std::string filename =
fmt::format("{}/{:%F-%H-%M}_{:016X}.csv", path, *std::localtime(&t), title_id);
Common::FS::IOFile file(filename, "w");
file.WriteString(stream.str());
const auto filename =
path / fmt::format("{:%F-%H-%M}_{:016X}.csv", *std::localtime(&t), title_id);
if (Common::FS::CreateParentDir(path)) {
Common::FS::IOFile file(filename, Common::FS::FileAccessMode::Write,
Common::FS::FileType::TextFile);
void(file.WriteString(stream.str()));
}
}
void PerfStats::BeginSystemFrame() {