mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
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:
@@ -4,6 +4,7 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
void errorMessageMacos(const char *message);
|
||||
void openWebpageMacos(const char *url);
|
||||
bool isMacosSystemDarkModeEnabled();
|
||||
float getBackingScaleFactor();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user