feat: Add a native error message when glfw window creation fails (#1104)

Draft because I want to test it again tomorrow with all OSes, first

---------

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
iTrooz
2023-05-27 17:45:41 +02:00
committed by GitHub
parent e578127f67
commit 0ba011dbe1
7 changed files with 76 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
extern "C" {
void errorMessageMacos(const char *message);
void openWebpageMacos(const char *url);
bool isMacosSystemDarkModeEnabled();
float getBackingScaleFactor();

View File

@@ -13,6 +13,11 @@
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
void errorMessageMacos(const char *cMessage) {
CFStringRef strMessage = CFStringCreateWithCString(NULL, cMessage, kCFStringEncodingUTF8);
CFUserNotificationDisplayAlert(0, kCFUserNotificationStopAlertLevel, NULL, NULL, NULL, strMessage, NULL, NULL, NULL, NULL, NULL);
}
void openFile(const char *path);
void openWebpageMacos(const char *url) {