@kmamal/sdl 0.6.3 → 0.6.5

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.
Binary file
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.3",
2
+ "version": "0.6.5",
3
3
  "name": "@kmamal/sdl",
4
4
  "description": "SDL bindings for Node.js",
5
5
  "keywords": [
@@ -2,7 +2,7 @@
2
2
  if (!process.env.NODE_SDL_FROM_SOURCE) {
3
3
  try {
4
4
  await import('./download-release.mjs')
5
- process.exit()
5
+ process.exit(0)
6
6
  } catch (error) {}
7
7
  } else {
8
8
  console.log("skip download and build from source")
@@ -4,3 +4,5 @@ class CALayer;
4
4
  #endif
5
5
 
6
6
  extern "C" CALayer * getView(NSWindow *);
7
+
8
+ extern "C" void reenableInertialScrolling();
@@ -7,3 +7,7 @@ extern "C" CALayer * getView(NSWindow * window) {
7
7
  [view setWantsLayer:YES];
8
8
  return view.layer;
9
9
  }
10
+
11
+ extern "C" void reenableInertialScrolling() {
12
+ [[NSUserDefaults standardUserDefaults] setBool: YES forKey: @"AppleMomentumScrollSupported"];
13
+ }
@@ -832,6 +832,11 @@ initialize (Variant & object)
832
832
  keys = SDL_GetKeyboardState(&num_keys);
833
833
  SDL_StartTextInput();
834
834
 
835
+
836
+ #if defined(__MACOSX__)
837
+ reenableInertialScrolling();
838
+ #endif
839
+
835
840
  return nullptr;
836
841
  }
837
842