Sign in Join

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

Mailing lists / fpc-pascal / 2002-05

Graph, Linux, Crt

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Andreas K. Foerster

Hello,

when I compile a prog that uses the graph unit and the crt unit under Linux, closegraph doesn't reset the screen settings correctly. I always have to enter "reset" afterwards.
When I don't use the crt unit, it's okay - but how can i use the keyboard then?
(The prog should stay portable to windows.)

Tschuess Andreas
Jonas Maebe
to Andreas K. Foerster
Andreas K. Foerster wrote
when I compile a prog that uses the graph unit and the crt unit under Linux, closegraph doesn't reset the screen settings correctly. I always have to enter "reset" afterwards.

Does it work if you switch the order of the crt and graph units in your uses clause? I've already spent a lot of time trying to get it right, but it's very difficult because both the crt unit and svgalib play around with the terminal settings.

Jonas

Andreas K. Foerster
to Jonas Maebe
Jonas Maebe wrote 6 lines
> when I compile a prog that uses the graph unit and the crt unit under > Linux, closegraph doesn't reset the screen settings correctly. I always > have to enter "reset" afterwards. Does it work if you switch the order of the crt and graph units in your uses clause?

No, that doesn't make any difference.

I also tried calling RestoreCrtMode; ClrScr; thereafter, but that also doesn't work.

I've already spent a lot of time trying to get it right, but it's very difficult because both the crt unit and svgalib play around with the terminal settings.

What about making a special Crt unit just for the keyboard, as there is for the windows version?

Tschuess Andreas
Jonas Maebe
to Andreas K. Foerster
Andreas K. Foerster wrote
What about making a special Crt unit just for the keyboard, as there is for the windows version?

Then you still have to change the terminal settings, those influence both the screen output and keyboard input behaviour.

Jonas

Andreas K. Foerster
to Jonas Maebe
Jonas Maebe wrote 5 lines
> What about making a special Crt unit just for the keyboard, as there is > for the windows version? Then you still have to change the terminal settings, those influence both the screen output and keyboard input behaviour.

But there's special keyboard functions in the svgalib. What about using these?

Tschuess Andreas
Jonas Maebe
to Andreas K. Foerster
Andreas K. Foerster wrote
But there's special keyboard functions in the svgalib. What about using these?

Then you would make the crt unit dependent on svgalib! That's not something we want to do :)

Jonas

Andreas K. Foerster
to Jonas Maebe
Jonas Maebe wrote 5 lines
> But there's special keyboard functions in the svgalib. > What about using these? Then you would make the crt unit dependent on svgalib! That's not something we want to do :)

I think you got confused with my private mail to you. That was about the crt unit.

Here I'm not talking about the normal crt unit, but about a workaround replacement, just like wincrt under windows.

We could call it grinput and the unit could also contain functions for the mouse and perhaps joystick.

Do you think, that's a good Idea.
If you say yes, then I'll try to make it.

Tschuess Andreas