From 79b6a51d4981d9580e7f4662a2dadc26e767078a Mon Sep 17 00:00:00 2001 From: Trevor Maze Date: Tue, 31 Mar 2026 19:58:45 -0400 Subject: [PATCH] Fixing Windows --- Sources/A-Star/A_Star.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/A-Star/A_Star.swift b/Sources/A-Star/A_Star.swift index 57a9019..50097da 100644 --- a/Sources/A-Star/A_Star.swift +++ b/Sources/A-Star/A_Star.swift @@ -341,7 +341,9 @@ enum Key { } struct Terminal { +#if os(macOS) || os(Linux) nonisolated(unsafe) static var originalTerm = termios() +#endif static func readKey() -> Key { var byte: UInt8 = 0 @@ -349,9 +351,9 @@ struct Terminal { let ch = _getch() if ch == 224 || ch == 0 { let nextCh = _getch() - switch nextch { + switch nextCh { case 72: return .Up - case 80: return .Dow + case 80: return .Down case 75: return .Left case 77: return .Right default: return .Unknown