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