diff options
| author | laytan <laytanlaats@hotmail.com> | 2025-12-20 20:09:19 +0100 |
|---|---|---|
| committer | laytan <laytanlaats@hotmail.com> | 2025-12-20 20:09:19 +0100 |
| commit | 67177db0a8e20e262c05e138ea10b7162da1a30f (patch) | |
| tree | c46716a05bdd86aea81d4577efe578d829cf6638 /core | |
| parent | 17b7491acc753d3a63cf8cd82fd7fd6742ae7f03 (diff) | |
os/os2: use ReadFile for Console reads too, at least for now
Diffstat (limited to 'core')
| -rw-r--r-- | core/os/os2/file_windows.odin | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/os/os2/file_windows.odin b/core/os/os2/file_windows.odin index 7c075b7b1..9a969f07e 100644 --- a/core/os/os2/file_windows.odin +++ b/core/os/os2/file_windows.odin @@ -372,7 +372,10 @@ _read_internal :: proc(f: ^File_Impl, p: []byte) -> (n: i64, err: Error) { to_read := min(win32.DWORD(length), MAX_RW) switch f.kind { case .Console: - total_read, err = read_console(handle, p[total_read:][:to_read]) + // NOTE(laytan): at least for now, just use ReadFile, it seems to work fine, + // but, there may be issues with certain situations that we need to get reproductions for. + // total_read, err = read_console(handle, p[total_read:][:to_read]) + fallthrough case .Pipe, .File: single_read_length: win32.DWORD ok := win32.ReadFile(handle, &p[total_read], to_read, &single_read_length, nil) |