diff options
-rw-r--r-- | src/library_sdl.js | 2 | ||||
-rw-r--r-- | tests/sdl_image.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index c5190aa8..b607bdb3 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -260,7 +260,7 @@ mergeInto(LibraryManager.library, { {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*1', '0', 'pixelFormat', 'void*') }}} // SDL_Surface.format TODO {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*2', '0', 'width', 'i32') }}} // SDL_Surface.w {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*3', '0', 'height', 'i32') }}} // SDL_Surface.h - {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*4', '0', 'width*4', 'i16') }}} // SDL_Surface.pitch, assuming RGBA for now, + {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*4', '0', 'width*4', 'i32') }}} // SDL_Surface.pitch, assuming RGBA for now, // since that is what ImageData gives us in browsers {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*5', '0', 'buffer', 'void*') }}} // SDL_Surface.pixels {{{ makeSetValue('surf+Runtime.QUANTUM_SIZE*6', '0', '0', 'i32*') }}} // SDL_Surface.offset diff --git a/tests/sdl_image.c b/tests/sdl_image.c index 1efed88c..d934f863 100644 --- a/tests/sdl_image.c +++ b/tests/sdl_image.c @@ -16,6 +16,7 @@ int main() { } assert(image->format->BitsPerPixel == 32); assert(image->format->BytesPerPixel == 4); + assert(image->pitch == 4*image->w); SDL_BlitSurface (image, NULL, screen, NULL); SDL_FreeSurface (image); |