mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +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'
|
// 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
|
// statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions (e.g.,
|
||||||
// must be called on the main thread under some conditions (typically, before ebiten.RunGame is called).
|
// DeviceScaleFactor) that must be called on the main thread under some conditions (typically, before ebiten.RunGame
|
||||||
|
// is called).
|
||||||
//
|
//
|
||||||
// Environment variables
|
// Environment variables
|
||||||
//
|
//
|
||||||
@ -72,5 +73,6 @@
|
|||||||
// `ebitengl` forces to use OpenGL in any environments.
|
// `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
|
// `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
|
package ebiten
|
||||||
|
@ -18,7 +18,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Thread defines threading behavior in ebiten.
|
// Thread defines threading behavior in Ebiten.
|
||||||
type Thread interface {
|
type Thread interface {
|
||||||
Call(func() error) error
|
Call(func() error) error
|
||||||
Loop()
|
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.
|
// DeviceScaleFactor might panic on init function on some devices like Android.
|
||||||
// Then, it is not recommended to call DeviceScaleFactor from init functions.
|
// 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 {
|
func DeviceScaleFactor() float64 {
|
||||||
return uiDriver().DeviceScaleFactor()
|
return uiDriver().DeviceScaleFactor()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user