Fix log file using `wine-preloader` etc instead of executable's filename

pull/517/head
jackun 3 years ago
parent 4a43896d99
commit 4f3133c5da
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -1,8 +1,9 @@
#include <sstream>
#include <iomanip>
#include "logging.h"
#include "overlay.h"
#include "config.h"
#include <sstream>
#include <iomanip>
#include "file_utils.h"
string os, cpu, gpu, ram, kernel, driver, cpusched;
bool sysInfoFetched = false;
@ -132,7 +133,10 @@ void Logger::stop_logging() {
std::thread(calculate_benchmark_data, m_params).detach();
if(!m_params->output_folder.empty()) {
m_log_files.emplace_back(m_params->output_folder + "/" + get_program_name() + "_" + get_log_suffix());
std::string program = get_wine_exe_name();
if (program.empty())
program = get_program_name();
m_log_files.emplace_back(m_params->output_folder + "/" + program + "_" + get_log_suffix());
std::thread(writeFile, m_log_files.back()).detach();
}
}

Loading…
Cancel
Save