geode/loader/src/platform/mac/crashlog.mm

27 lines
621 B
Text
Raw Normal View History

2022-10-08 10:27:28 -04:00
#include "../crashlog.hpp"
#ifdef GEODE_IS_MACOS
#include <fs/filesystem.hpp>
2022-10-30 14:56:36 -04:00
#include <Foundation/Foundation.h>
2022-10-08 11:20:32 -04:00
2022-10-08 10:27:28 -04:00
bool crashlog::setupPlatformHandler() {
return true;
}
bool crashlog::didLastLaunchCrash() {
return false;
}
std::string crashlog::getCrashLogDirectory() {
std::array<char, 1024> path;
2022-10-30 14:56:36 -04:00
CFStringGetCString(
(CFStringRef)NSHomeDirectory(), path.data(), path.size(), kCFStringEncodingUTF8
);
auto crashlogDir =
ghc::filesystem::path(path.data()) / "Library" / "Logs" / "DiagnosticReports";
2022-10-08 10:27:28 -04:00
return crashlogDir.string();
}
#endif