Cross compile woes: didn't assign window in osx, the pragma lib dl fails when using the zig cross compiler but is unnecessary anyway since standard build includes it (i think everywhere we need it, if not ill do a follow up commit)

This commit is contained in:
Adam D. Ruppe 2025-10-21 09:02:31 -04:00
parent b3d88cafa8
commit 8efd1ffa0e
1 changed files with 5 additions and 4 deletions

View File

@ -1416,7 +1416,7 @@ version(Emscripten) {
} }
version(libnotify) { version(libnotify) {
pragma(lib, "dl"); //pragma(lib, "dl");
import core.sys.posix.dlfcn; import core.sys.posix.dlfcn;
void delegate()[int] libnotify_action_delegates; void delegate()[int] libnotify_action_delegates;
@ -2910,7 +2910,8 @@ class SimpleWindow : CapableOfHandlingNativeEvent, CapableOfBeingDrawnUpon {
else else
XMapWindow(impl.display, impl.window); XMapWindow(impl.display, impl.window);
} else version(OSXCocoa) { } else version(OSXCocoa) {
impl.window.setIsVisible = !b; if(impl.window)
impl.window.setIsVisible = !b;
if(!hidden) if(!hidden)
impl.view.setNeedsDisplay(true); impl.view.setNeedsDisplay(true);
} else version(Emscripten) { } else version(Emscripten) {
@ -7355,7 +7356,7 @@ version(Windows) {
} }
version (X11) { version (X11) {
pragma(lib, "dl"); //pragma(lib, "dl"); // already done by the standard compiler build and specifying it again messes up zig cross compile
import core.sys.posix.dlfcn; import core.sys.posix.dlfcn;
} }
@ -19453,7 +19454,7 @@ version(OSXCocoa) {
auto contentRect = NSRect(NSPoint(0, 0), NSSize(width, height)); auto contentRect = NSRect(NSPoint(0, 0), NSSize(width, height));
auto window = NSWindow.alloc.initWithContentRect( window = NSWindow.alloc.initWithContentRect(
contentRect, contentRect,
NSWindowStyleMask.resizable | NSWindowStyleMask.closable | NSWindowStyleMask.miniaturizable | NSWindowStyleMask.titled, NSWindowStyleMask.resizable | NSWindowStyleMask.closable | NSWindowStyleMask.miniaturizable | NSWindowStyleMask.titled,
NSBackingStoreType.buffered, NSBackingStoreType.buffered,