2022-11-28 12:45:23 -05:00
|
|
|
#include <InternalLoader.hpp>
|
2022-11-22 10:21:00 -05:00
|
|
|
#include <Geode/loader/Log.hpp>
|
|
|
|
#include <iostream>
|
2022-11-28 12:45:23 -05:00
|
|
|
#include <InternalMod.hpp>
|
2022-11-22 10:21:00 -05:00
|
|
|
|
|
|
|
#ifdef GEODE_IS_MACOS
|
|
|
|
|
|
|
|
#include <CoreFoundation/CoreFoundation.h>
|
|
|
|
|
|
|
|
void InternalLoader::platformMessageBox(char const* title, std::string const& info) {
|
|
|
|
CFStringRef cfTitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8);
|
|
|
|
CFStringRef cfMessage = CFStringCreateWithCString(NULL, info.c_str(), kCFStringEncodingUTF8);
|
|
|
|
|
|
|
|
CFUserNotificationDisplayNotice(
|
|
|
|
0, kCFUserNotificationNoteAlertLevel, NULL, NULL, NULL, cfTitle, cfMessage, NULL
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void InternalLoader::openPlatformConsole() {
|
|
|
|
m_platformConsoleOpen = true;
|
|
|
|
|
|
|
|
for (auto const& log : Loader::get()->getLogs()) {
|
|
|
|
std::cout << log->toString(true) << "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void InternalLoader::closePlatformConsole() {
|
|
|
|
m_platformConsoleOpen = false;
|
|
|
|
}
|
|
|
|
|
2022-11-22 17:35:08 -05:00
|
|
|
void InternalLoader::postIPCReply(
|
2022-11-22 10:21:00 -05:00
|
|
|
void* rawPipeHandle,
|
2022-11-28 10:48:38 -05:00
|
|
|
std::string const& replyID,
|
|
|
|
nlohmann::json const& data
|
2022-11-22 10:21:00 -05:00
|
|
|
) {}
|
|
|
|
|
|
|
|
void InternalLoader::setupIPC() {
|
|
|
|
#warning "Set up pipes or smth for this platform"
|
|
|
|
log::log(Severity::Warning, InternalMod::get(), "IPC is not supported on this platform");
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|