mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
Refactoring
This commit is contained in:
parent
453921f1d3
commit
3ccfe087d9
@ -95,7 +95,6 @@ func (f *framebuffer) projectionMatrix() []float32 {
|
|||||||
return f.proMatrix
|
return f.proMatrix
|
||||||
}
|
}
|
||||||
w, h := f.viewportSize()
|
w, h := f.viewportSize()
|
||||||
m := orthoProjectionMatrix(0, w, 0, h)
|
f.proMatrix = orthoProjectionMatrix(0, w, 0, h)
|
||||||
f.proMatrix = m
|
|
||||||
return f.proMatrix
|
return f.proMatrix
|
||||||
}
|
}
|
||||||
|
@ -161,12 +161,11 @@ func RunMainThreadLoop(ch <-chan error) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *userInterface) updateGraphicsContext(g GraphicsContext) {
|
func (u *userInterface) updateGraphicsContext(g GraphicsContext) {
|
||||||
sizeChanged := false
|
|
||||||
width, height := 0, 0
|
width, height := 0, 0
|
||||||
actualScale := 0.0
|
actualScale := 0.0
|
||||||
|
|
||||||
u.m.Lock()
|
u.m.Lock()
|
||||||
sizeChanged = u.sizeChanged
|
sizeChanged := u.sizeChanged
|
||||||
if sizeChanged {
|
if sizeChanged {
|
||||||
width = u.width
|
width = u.width
|
||||||
height = u.height
|
height = u.height
|
||||||
|
Loading…
Reference in New Issue
Block a user