mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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;
|
||||
}
|
||||
|
||||
static BOOL initialBoot = YES;
|
||||
|
||||
void PollEvents(void) {
|
||||
for (;;) {
|
||||
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
@ -77,6 +79,10 @@ void PollEvents(void) {
|
||||
}
|
||||
[NSApp sendEvent:event];
|
||||
}
|
||||
if (initialBoot) {
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
initialBoot = NO;
|
||||
}
|
||||
}
|
||||
|
||||
void UseGLContext(void* glContextPtr) {
|
||||
|
@ -42,7 +42,6 @@ func runWindow(width, height int, title string, sharedContext unsafe.Pointer) *w
|
||||
w.loop()
|
||||
}()
|
||||
<-ch
|
||||
// TODO: Activate here?
|
||||
return w
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user