Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-12

Video.CursorX/Y 1-based under UNIX

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michalis Kamburelis

Hi.

I'm just playing with unit Video and I found some strange thing. It looks like a bug in my opinion, but it's so obviously implemented in Video unit that I fear that it's some "feature" :

Under UNIXes CursorX / CursorY are 1-based. While SetCursorPos takes 0-based parameters on all OSes, and CursorX / CursorY are 0-based on Win32.

Although docs never explicitly say that CursorX and CursorY should be 0-based, I think that they should be, because
- SetCursorPos takes 0-based params, so obviously CursorX and CursorY should follow the same convention,
- under Win32 CursorX and CursorY are 0-based, and rtl/win32/video.pp is clearly implemented to keep this assumption.

What's strange is that looking at sources rtl/unix/video.pp, it looks like someone intended that behavior, i.e. that CursorX and CursorY are 1-based.

Michalis

Reply by email