mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
Rename PollEvents -> DoEvents
This commit is contained in:
parent
ffc08a75d3
commit
2b18ce8748
@ -66,7 +66,7 @@ func main() {
|
||||
s := make(chan os.Signal, 1)
|
||||
signal.Notify(s, os.Interrupt, syscall.SIGTERM)
|
||||
for {
|
||||
u.PollEvents()
|
||||
u.DoEvents()
|
||||
select {
|
||||
default:
|
||||
drawing <- graphics.NewLazyContext()
|
||||
@ -76,7 +76,7 @@ func main() {
|
||||
context.Flush(actualContext)
|
||||
})
|
||||
after := time.After(time.Duration(int64(time.Second) / 120))
|
||||
u.PollEvents()
|
||||
u.DoEvents()
|
||||
<-after
|
||||
case <-s:
|
||||
return
|
||||
|
@ -77,7 +77,7 @@ EbitenGameWindow* CreateGameWindow(size_t width, size_t height, const char* titl
|
||||
return window;
|
||||
}
|
||||
|
||||
void PollEvents(void) {
|
||||
void DoEvents(void) {
|
||||
for (;;) {
|
||||
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||
untilDate:[NSDate distantPast]
|
||||
|
@ -5,7 +5,7 @@ package cocoa
|
||||
//
|
||||
// void Run(void);
|
||||
// void StartApplication(void);
|
||||
// void PollEvents(void);
|
||||
// void DoEvents(void);
|
||||
//
|
||||
import "C"
|
||||
import (
|
||||
@ -42,8 +42,8 @@ func (u *cocoaUI) CreateGameWindow(width, height, scale int, title string) ui.Ga
|
||||
return u.sharedContext.createGameWindow(width, height, scale, title)
|
||||
}
|
||||
|
||||
func (u *cocoaUI) PollEvents() {
|
||||
C.PollEvents()
|
||||
func (u *cocoaUI) DoEvents() {
|
||||
C.DoEvents()
|
||||
}
|
||||
|
||||
func (u *cocoaUI) RunMainLoop() {
|
||||
|
Loading…
Reference in New Issue
Block a user