mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/directx: refactoring
This commit is contained in:
parent
0b0526a05b
commit
1017161c36
@ -116,7 +116,7 @@ func (i *image11) ReadPixels(buf []byte, x, y, width, height int) error {
|
||||
|
||||
stride := int(mapped.RowPitch)
|
||||
src := unsafe.Slice((*byte)(mapped.pData), stride*height)
|
||||
if mapped.RowPitch == uint32(4*width) {
|
||||
if stride == 4*width {
|
||||
copy(buf, src)
|
||||
} else {
|
||||
for j := 0; j < height; j++ {
|
||||
|
Loading…
Reference in New Issue
Block a user