mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
Activate apps
This commit is contained in:
parent
63abfb2c13
commit
05fbee10d4
@ -66,6 +66,8 @@ void* CreateWindow(size_t width, size_t height, const char* title, void* glConte
|
|||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL initialBoot = YES;
|
||||||
|
|
||||||
void PollEvents(void) {
|
void PollEvents(void) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||||
@ -77,6 +79,10 @@ void PollEvents(void) {
|
|||||||
}
|
}
|
||||||
[NSApp sendEvent:event];
|
[NSApp sendEvent:event];
|
||||||
}
|
}
|
||||||
|
if (initialBoot) {
|
||||||
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
|
initialBoot = NO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UseGLContext(void* glContextPtr) {
|
void UseGLContext(void* glContextPtr) {
|
||||||
|
@ -42,7 +42,6 @@ func runWindow(width, height int, title string, sharedContext unsafe.Pointer) *w
|
|||||||
w.loop()
|
w.loop()
|
||||||
}()
|
}()
|
||||||
<-ch
|
<-ch
|
||||||
// TODO: Activate here?
|
|
||||||
return w
|
return w
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user