浏览代码

* Implement do_IsDevice without relying on IOCTL_TCGETS (unsupported on Haiku). This enable mouse support in the Freepascal IDE.

git-svn-id: trunk@13413 -
olivier 16 年之前
父节点
当前提交
e11754d0b5
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      rtl/haiku/sysos.inc

+ 3 - 5
rtl/haiku/sysos.inc

@@ -139,10 +139,8 @@ Function Do_IsDevice(Handle:Longint):boolean;
   Data points to data needed for the Ndx function. The structure of this
   data is function-dependent.
 }
-CONST
-  IOCtl_TCGETS=$5401;
-var
-  Data : array[0..255] of byte; {Large enough for termios info}
 begin
-  Do_IsDevice:=(Fpioctl(handle,IOCTL_TCGETS,@data)<>-1);
+  do_isdevice:= (handle=StdInputHandle) or
+                (handle=StdOutputHandle) or
+                (handle=StdErrorHandle);
 end;