Phone CPU usage optimization

This commit is contained in:
James Babcock committed 2026-09-22 14:19:23 -07:00
1 parent 44eddedc01
commit 9560f3ac8d
26 files changed
+606 -167

No files matched your search

+3 -2
View File
@@ -1,9 +1,10 @@
import { createListenerPool, type InterfaceAddress } from '../remote/listeners';
declare const FaceclawRemoteInput: any;
export function remoteNative() {
export function remoteNative(onRequestReady: () => void) {
return createListenerPool(() => {
const native = FaceclawRemoteInput.alloc().init();
return { start: (port, address) => String(native.startAddress(port, address)), stop: () => native.stop(),
native.setRequestListener(onRequestReady);
return { start: (port, address) => String(native.startAddress(port, address)), stop: () => { native.setRequestListener(null); native.stop(); },
nextRequest: () => native.nextRequest(), complete: (id, response) => native.completeResponse(id, response) };
});
}