koin.js 1.2.2 → 1.2.4

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/dist/index.mjs CHANGED
@@ -2676,14 +2676,14 @@ function useTouchHandlers({
2676
2676
  const touch = e.touches[0];
2677
2677
  e.preventDefault();
2678
2678
  e.stopPropagation();
2679
- if (hapticsEnabled && navigator.vibrate) {
2680
- navigator.vibrate(8);
2681
- }
2682
2679
  if (isSystemButton) {
2683
2680
  onPress(buttonType);
2684
2681
  } else if (onPressDown) {
2685
2682
  onPressDown(buttonType);
2686
2683
  }
2684
+ if (hapticsEnabled && navigator.vibrate) {
2685
+ queueMicrotask(() => navigator.vibrate(8));
2686
+ }
2687
2687
  if (onPositionChange) {
2688
2688
  const target = e.currentTarget;
2689
2689
  if (!target) return;
@@ -2691,7 +2691,7 @@ function useTouchHandlers({
2691
2691
  drag.checkDragStart(touch.clientX, touch.clientY, rect);
2692
2692
  }
2693
2693
  },
2694
- [isSystemButton, buttonType, onPress, onPressDown, onPositionChange, drag]
2694
+ [isSystemButton, buttonType, onPress, onPressDown, onPositionChange, drag, hapticsEnabled]
2695
2695
  );
2696
2696
  const handleTouchMove = useCallback(
2697
2697
  (e) => {
@@ -7438,8 +7438,10 @@ function useEmulatorCore({
7438
7438
  // Offload to prevent UI blocking
7439
7439
  audio_latency: 96,
7440
7440
  // Larger buffer prevents audio crackle
7441
- rewind_enable: false
7441
+ rewind_enable: false,
7442
7442
  // Save RAM - savestate buffer is expensive
7443
+ video_max_swapchain_images: 3
7444
+ // Smoother frame delivery on mobile
7443
7445
  };
7444
7446
  } else {
7445
7447
  console.warn("[Nostalgist] SharedArrayBuffer not available. Falling back to main-thread rendering for heavy system.");
@@ -7449,7 +7451,9 @@ function useEmulatorCore({
7449
7451
  // Fallback: Main thread (might stutter)
7450
7452
  audio_latency: 128,
7451
7453
  // Increase latency further to handle main thread blocking
7452
- rewind_enable: false
7454
+ rewind_enable: false,
7455
+ video_max_swapchain_images: 3
7456
+ // Smoother frame delivery on mobile
7453
7457
  };
7454
7458
  }
7455
7459
  }
@@ -7542,7 +7546,12 @@ function useEmulatorCore({
7542
7546
  cheevos_hardcore_mode_enable: retroAchievements.hardcore ?? false,
7543
7547
  cheevos_verbose_enable: true
7544
7548
  } : {}
7545
- }
7549
+ },
7550
+ // Core-specific options (e.g., FBNeo CPU clock)
7551
+ retroarchCoreConfig: system.toUpperCase() === "ARCADE" ? {
7552
+ "fbneo_cpu_speed_adjust": "150"
7553
+ // 150% CPU clock reduces slowdowns on mobile
7554
+ } : {}
7546
7555
  };
7547
7556
  if (biosUrl) {
7548
7557
  prepareOptions.bios = biosUrl;