Skip to content

Commit

Permalink
feat: prototype razer stream controller support
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 10, 2022
1 parent f822386 commit 15b62ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/device-types/loupedeck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ export class LoupedeckWrapper implements WrappedDevice {
return this.#deviceId
}
public get productName(): string {
return `Satellite Loupedeck Live`
return this.#deck.modelName
}

public constructor(deviceId: string, device: LoupedeckDevice, cardGenerator: CardGenerator) {
this.#deck = device
this.#deviceId = deviceId
this.#cardGenerator = cardGenerator

if (device.modelId !== LoupedeckModelId.LoupedeckLive) throw new Error('Incorrect model passed to wrapper!')
if (
device.modelId !== LoupedeckModelId.LoupedeckLive &&
device.modelId !== LoupedeckModelId.RazerStreamController
)
throw new Error('Incorrect model passed to wrapper!')

this.#queueOutputId = 0

this.#queue = new ImageWriteQueue(async (key: number, buffer: Buffer) => {
Expand Down
6 changes: 5 additions & 1 deletion src/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ export class DeviceManager {
listLoupedecks()
.then((devs) => {
for (const dev of devs) {
if (dev.serialNumber && dev.model === LoupedeckModelId.LoupedeckLive) {
if (
dev.serialNumber &&
(dev.model === LoupedeckModelId.LoupedeckLive ||
dev.model === LoupedeckModelId.RazerStreamController)
) {
this.tryAddLoupedeckLive(dev.path, dev.serialNumber)
}
}
Expand Down

0 comments on commit 15b62ac

Please sign in to comment.