implement sharing in iOS, add OpenGL renderer in OSX window

This commit is contained in:
2018-11-30 20:41:52 +01:00
parent 9f41831b71
commit 3a88235f56
5 changed files with 24 additions and 16 deletions

View File

@@ -164,8 +164,14 @@ void App::display_file(std::string path)
void App::share_file(std::string path)
{
if (path.empty())
{
message_box("Sharing failed", "Please save the document before sharing it.");
return;
}
#ifdef __IOS__
dispatch_async(dispatch_get_main_queue(), ^{
[ios_view share_file:[NSString stringWithUTF8String:path.c_str()]];
});
#elif __OSX__
dispatch_async(dispatch_get_main_queue(), ^{
[osx_view share_file:[NSString stringWithUTF8String:path.c_str()]];