@kmamal/sdl 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +3 -3
- package/src/native/sdl-helpers.cpp +1 -3
package/README.md
CHANGED
|
@@ -704,7 +704,7 @@ Will be `true` if the mouse is over the window.
|
|
|
704
704
|
|
|
705
705
|
* `width, height, stride, format, buffer: `[`<Image>`](#image-data) The image to display on the window.
|
|
706
706
|
|
|
707
|
-
Displays an image in the window.
|
|
707
|
+
Displays an image in the window. This functions preforms no scaling (or positioning). To fill the whole window you must provide an image that matches the window's `width` and `height`.
|
|
708
708
|
|
|
709
709
|
### window.setIcon(width, height, stride, format, buffer)
|
|
710
710
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.6",
|
|
3
3
|
"name": "@kmamal/sdl",
|
|
4
4
|
"description": "SDL2 bindings for Node.js",
|
|
5
5
|
"keywords": [
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"bindings": "^1.5.0",
|
|
41
|
-
"prebuild-install": "^
|
|
41
|
+
"prebuild-install": "^7.1.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"prebuild": "^
|
|
44
|
+
"prebuild": "^11.0.3"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -978,15 +978,13 @@ window_render (
|
|
|
978
978
|
if (src_surface == nullptr) {
|
|
979
979
|
RETURN_ERROR("SDL_CreateRGBSurfaceWithFormatFrom(%d, %d, %d) error: %s\n", w, h, format, SDL_GetError());
|
|
980
980
|
}
|
|
981
|
-
SDL_Rect src_rect = { 0, 0, w, h };
|
|
982
981
|
|
|
983
982
|
SDL_Surface * window_surface = SDL_GetWindowSurface(window);
|
|
984
983
|
if (window_surface == nullptr) {
|
|
985
984
|
RETURN_ERROR("SDL_GetWindowSurface(%d) error: %s\n", window_id, SDL_GetError());
|
|
986
985
|
}
|
|
987
|
-
SDL_Rect window_rect = { 0, 0, window_surface->w, window_surface->h };
|
|
988
986
|
|
|
989
|
-
if (
|
|
987
|
+
if (SDL_BlitSurface(src_surface, NULL, window_surface, NULL) != 0) {
|
|
990
988
|
RETURN_ERROR("SDL_LowerBlit(%d) error: %s\n", window_id, SDL_GetError());
|
|
991
989
|
}
|
|
992
990
|
|