Browse Source

sinclairql: return true as default for do_isdevice to work around weird console flushing issues.

git-svn-id: trunk@49381 -
Károly Balogh 4 years ago
parent
commit
12a0083c59
1 changed files with 10 additions and 1 deletions
  1. 10 1
      rtl/sinclairql/sysfile.inc

+ 10 - 1
rtl/sinclairql/sysfile.inc

@@ -250,5 +250,14 @@ end;
 
 function do_isdevice(handle: thandle): boolean;
 begin
-  do_isdevice:=false;
+  { FIXME: See if this can be implemented properly on the QL. }
+
+  { Prefer to return true here as a default answer, as it is less harmful
+    than false. This basically determines if the file handle is a "device",
+    for example the console. Returning true here causes a flush before a
+    read on the file handle which is preferred for consoleio, and a few
+    other minor behavioral changes, for example shorter stacktraces.
+    Returning false will cause weird behavior and unprinted lines when
+    read() and write() is mixed during consoleio. }
+  do_isdevice:=true;
 end;