From 4d89b5de07d3360d4d570a4bff0daa73c2efc820 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 29 Dec 2022 20:47:32 +0900 Subject: [PATCH] internal/ui: refactoring --- internal/ui/ui_mobile.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/ui/ui_mobile.go b/internal/ui/ui_mobile.go index c6d16c90d..a023ee156 100644 --- a/internal/ui/ui_mobile.go +++ b/internal/ui/ui_mobile.go @@ -90,7 +90,7 @@ func (u *userInterfaceImpl) Update() error { cancel() }() - _ = u.t.Loop(ctx) + _ = u.renderThread.Loop(ctx) return nil } @@ -117,7 +117,7 @@ type userInterfaceImpl struct { fpsMode FPSModeType renderRequester RenderRequester - t *thread.OSThread + renderThread *thread.OSThread m sync.RWMutex } @@ -280,8 +280,8 @@ func (u *userInterfaceImpl) run(game Game, mainloop bool, options *RunOptions) ( // gl.Context so that they are called on the appropriate thread. mgl = <-glContextCh } else { - u.t = thread.NewOSThread() - graphicscommand.SetRenderingThread(u.t) + u.renderThread = thread.NewOSThread() + graphicscommand.SetRenderingThread(u.renderThread) } g, err := newGraphicsDriver(&graphicsDriverCreatorImpl{