mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
Update comments
This commit is contained in:
parent
290f05060a
commit
eedb947471
8
doc.go
8
doc.go
@ -50,8 +50,9 @@
|
||||
// }
|
||||
//
|
||||
// In the API document, 'the main thread' means the goroutine in init(), main() and their callees without 'go'
|
||||
// statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions that
|
||||
// must be called on the main thread under some conditions (typically, before ebiten.RunGame is called).
|
||||
// statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions (e.g.,
|
||||
// DeviceScaleFactor) that must be called on the main thread under some conditions (typically, before ebiten.RunGame
|
||||
// is called).
|
||||
//
|
||||
// Environment variables
|
||||
//
|
||||
@ -72,5 +73,6 @@
|
||||
// `ebitengl` forces to use OpenGL in any environments.
|
||||
//
|
||||
// `ebitensinglethread` disables Ebiten's thread safety to unlock maximum performance. If you use this you will have
|
||||
// to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag.
|
||||
// to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag and
|
||||
// must be called from the main thread.
|
||||
package ebiten
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Thread defines threading behavior in ebiten.
|
||||
// Thread defines threading behavior in Ebiten.
|
||||
type Thread interface {
|
||||
Call(func() error) error
|
||||
Loop()
|
||||
|
3
run.go
3
run.go
@ -297,7 +297,8 @@ func SetRunnableOnUnfocused(runnableOnUnfocused bool) {
|
||||
// DeviceScaleFactor might panic on init function on some devices like Android.
|
||||
// Then, it is not recommended to call DeviceScaleFactor from init functions.
|
||||
//
|
||||
// DeviceScaleFactor must be called on the main thread before the main loop, and is concurrent-safe after the main loop.
|
||||
// DeviceScaleFactor must be called on the main thread before the main loop, and is concurrent-safe after the main
|
||||
// loop.
|
||||
func DeviceScaleFactor() float64 {
|
||||
return uiDriver().DeviceScaleFactor()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user