Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ final class UniversalControlMouseRelay: @unchecked Sendable {
process.arguments = ["status", "--json"]
let pipe = Pipe()
process.standardOutput = pipe
process.standardError = Pipe()
process.standardError = FileHandle.nullDevice

do {
try process.run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ class MappingEngine: ObservableObject {
state.pressConsumedByAction.insert(button)
#if DEBUG
if state.isEnabled && state.activeProfile == nil {
print("⚠️ MappingEngine: Button \(button) pressed but no active profile β€” input ignored")
// print("⚠️ MappingEngine: Button \(button) pressed but no active profile β€” input ignored")
}
#endif
return .blocked
Expand Down Expand Up @@ -895,7 +895,7 @@ class MappingEngine: ObservableObject {
case .layerActivated(let profile, let layerId):
if let layer = profile.layers.first(where: { $0.id == layerId }) {
#if DEBUG
print("πŸ”· Layer activated: \(layer.name)")
// // print("πŸ”· Layer activated: \(layer.name)")
#endif
inputLogService?.log(buttons: [button], type: .singlePress, action: "Layer: \(layer.name)")
}
Expand All @@ -908,7 +908,7 @@ class MappingEngine: ObservableObject {
performRoutingBoundaryCleanup(cleanup)
if let layer = profile.layers.first(where: { $0.id == layerId }) {
#if DEBUG
print("πŸ”· Layer toggled \(isActive ? "on" : "off"): \(layer.name)")
// // print("πŸ”· Layer toggled \(isActive ? "on" : "off"): \(layer.name)")
#endif
inputLogService?.log(
buttons: [button],
Expand Down Expand Up @@ -1469,7 +1469,7 @@ class MappingEngine: ObservableObject {
if layerDeactivation.didDeactivate {
#if DEBUG
if let layerName = layerDeactivation.layerName {
print("πŸ”· Layer deactivated: \(layerName)")
// // print("πŸ”· Layer deactivated: \(layerName)")
}
#endif

Expand Down Expand Up @@ -1738,7 +1738,7 @@ class MappingEngine: ObservableObject {
guard state.isEnabled, let profile = state.activeProfile else {
#if DEBUG
if state.isEnabled && state.activeProfile == nil {
print("⚠️ MappingEngine: Chord \(buttons) detected but no active profile β€” input ignored")
// print("⚠️ MappingEngine: Chord \(buttons) detected but no active profile β€” input ignored")
}
#endif
return nil
Expand Down Expand Up @@ -1822,7 +1822,7 @@ class MappingEngine: ObservableObject {
}
if let layer = startState.profile.layers.first(where: { $0.id == change.layerId }) {
#if DEBUG
print("πŸ”· Layer \(change.isActive ? "activated" : "deactivated") via chord: \(layer.name)")
// // print("πŸ”· Layer \(change.isActive ? "activated" : "deactivated") via chord: \(layer.name)")
#endif
inputLogService?.log(
buttons: [change.button],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,15 @@ private enum OBSMediaMTXManager {
which.arguments = ["mediamtx"]
let outPipe = Pipe()
which.standardOutput = outPipe
which.standardError = Pipe()
try? which.run()
which.standardError = FileHandle.nullDevice
do {
try which.run()
} catch {
throw XCTSkip("mediamtx not found and could not run `which`.")
}
let data = outPipe.fileHandleForReading.readDataToEndOfFile()
which.waitUntilExit()
if which.terminationStatus == 0 {
let data = outPipe.fileHandleForReading.readDataToEndOfFile()
if let path = String(data: data, encoding: .utf8)?
.trimmingCharacters(in: .whitespacesAndNewlines),
!path.isEmpty,
Expand Down Expand Up @@ -239,8 +243,8 @@ private enum OBSMediaMTXManager {
let p = Process()
p.executableURL = URL(fileURLWithPath: "/usr/bin/nc")
p.arguments = ["-z", host, "\(port)"]
p.standardOutput = Pipe()
p.standardError = Pipe()
p.standardOutput = FileHandle.nullDevice
p.standardError = FileHandle.nullDevice
do {
try p.run()
} catch {
Expand Down
Loading