File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ declare module "buttplug-wasm/dist/buttplug-wasm.mjs" {
2+ export class ButtplugWasmClientConnector {
3+ Connected : boolean ;
4+ connect ( ) : Promise < void > ;
5+ disconnect ( ) : Promise < void > ;
6+ static activateLogging ( ) : Promise < void > ;
7+ }
8+ }
Original file line number Diff line number Diff line change @@ -195,7 +195,10 @@ function App() {
195195 wasmBackendLoaded . current = false ;
196196 } ) ;
197197
198- return ( ) => { cancelled = true ; } ;
198+ return ( ) => {
199+ cancelled = true ;
200+ wasmBackendLoaded . current = false ;
201+ } ;
199202 } , [ preferences . haptics . enabled ] ) ;
200203
201204 // Effect for CTRL + Number shortcut
Original file line number Diff line number Diff line change @@ -281,15 +281,11 @@ export class HapticsService extends EventEmitter<HapticsServiceEvents> {
281281 let nextActuatorId = 0 ;
282282 let nextSensorId = 0 ;
283283
284- // Determine effective auto-stop timeout based on device classes present
285- const deviceClasses = new Set < HapticsDeviceClass > ( ) ;
286-
287284 for ( const backend of this . backends ) {
288285 // Actuators
289286 const actuators = backend . getActuators ( ) ;
290287 for ( const actuator of actuators ) {
291288 const globalId = nextActuatorId ++ ;
292- deviceClasses . add ( actuator . deviceClass ) ;
293289 this . actuatorMap . set ( globalId , {
294290 backend,
295291 localId : actuator . id ,
@@ -315,12 +311,6 @@ export class HapticsService extends EventEmitter<HapticsServiceEvents> {
315311 }
316312 }
317313
318- // Auto-stop timeout: use shorter timeout if intimate devices are present
319- if ( deviceClasses . has ( "intimate" ) ) {
320- this . _autoStopTimeoutSecs = 5 ;
321- } else if ( deviceClasses . has ( "gaming" ) ) {
322- this . _autoStopTimeoutSecs = 30 ;
323- }
324314 }
325315
326316 // -----------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ const HapticsStatus: React.FC<HapticsStatusProps> = ({ client }) => {
108108 < div style = { { marginBottom : "8px" } } >
109109 < strong > Bluetooth Devices</ strong >
110110 </ div >
111- { typeof navigator !== "undefined" && navigator . bluetooth ? (
111+ { typeof navigator !== "undefined" && ( navigator as any ) . bluetooth ? (
112112 < div >
113113 < button
114114 onClick = { handleScan }
Original file line number Diff line number Diff line change 11import { GMCPPackage } from "../package" ;
2+ import type { GMCPCoreSupports } from "../Core" ;
23import { hapticsService } from "../../HapticsService" ;
34import { preferencesStore } from "../../PreferencesStore" ;
45import type { HapticsCommand , HapticsSensorReading } from "../../haptics/types" ;
@@ -183,7 +184,7 @@ export class GMCPClientHaptics extends GMCPPackage {
183184
184185 advertiseHapticsSupport ( ) : void {
185186 if ( ! this . isAdvertised ) {
186- const coreSupports = this . client . gmcpHandlers [ "Core.Supports" ] ;
187+ const coreSupports = this . client . gmcpHandlers [ "Core.Supports" ] as GMCPCoreSupports | undefined ;
187188 if ( coreSupports ) {
188189 coreSupports . sendAdd ( [
189190 { name : "Client.Haptics" , version : this . packageVersion || 1 } ,
@@ -195,7 +196,7 @@ export class GMCPClientHaptics extends GMCPPackage {
195196
196197 unadvertiseHapticsSupport ( ) : void {
197198 if ( this . isAdvertised ) {
198- const coreSupports = this . client . gmcpHandlers [ "Core.Supports" ] ;
199+ const coreSupports = this . client . gmcpHandlers [ "Core.Supports" ] as GMCPCoreSupports | undefined ;
199200 if ( coreSupports ) {
200201 coreSupports . sendRemove ( [ "Client.Haptics" ] ) ;
201202 this . isAdvertised = false ;
Original file line number Diff line number Diff line change @@ -362,6 +362,6 @@ interface GamepadHapticActuatorExtended {
362362 reset ( ) : Promise < string > ;
363363}
364364
365- interface GamepadWithVibration extends Gamepad {
365+ type GamepadWithVibration = Gamepad & {
366366 vibrationActuator : GamepadHapticActuatorExtended | null ;
367- }
367+ } ;
You can’t perform that action at this time.
0 commit comments