Skip to content

Commit 730b15d

Browse files
committed
GSRunner: Fix surfaceless run on macOS
1 parent c9b336a commit 730b15d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

common/CocoaTools.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
298298
void CocoaTools::RunCocoaEventLoop(bool forever)
299299
{
300300
NSDate* end = forever ? [NSDate distantFuture] : [NSDate distantPast];
301+
[NSApplication sharedApplication]; // Ensure NSApp is initialized
301302
while (true)
302303
{ @autoreleasepool {
303304
NSEvent* ev = [NSApp nextEventMatchingMask:NSEventMaskAny

0 commit comments

Comments
 (0)