Discussion:
[CsMain] Console problems.
(too old to reply)
Charles Darcy
2000-05-01 11:40:07 UTC
Permalink
Hi,

I've been having some problems with the console.

I'm currently operating under Win98, using MSVC6 SP3 and the Release
configuration. My display is set on 8-bit colour (although the problems
still arise under 16-bit). I am using the default cscon.dll plugin which
is generated by building the cscon project under MSVC.

- When I use the 'System.Printf' function, I only see my message
when I specify MSG_INITIALIZATION. When I try it with MSG_CONSOLE, no
message appears. I tried setting ConsoleReady and EnableConsoleOutput to
'true' in my Initialization routine, but it made no difference.
Similarly, I see no message when I try to use 'Console->PutText()', or
when I try 'System.console_out().'

- When I cover the cs window with another, and then uncover it, the
obscured portion is not redrawn until another Printf using
MSG_INITIALIZATION is called. I tried Console->Draw(), but this caused
an invalid page fault in ddraw5.dll.

I would really appreciate it if anyone can offer any advise.


thanks,

Charlie.


P.S. I don't use the global 'csSystemDriver *System' variable but
have instead defined my own. I am assuming this is a convenience
variable for users, and not used within the engine ?
Michael Dale Long
2000-05-01 15:06:38 UTC
Permalink
Post by Charles Darcy
Hi,
I've been having some problems with the console.
I'm currently operating under Win98, using MSVC6 SP3 and the Release
configuration. My display is set on 8-bit colour (although the problems
still arise under 16-bit). I am using the default cscon.dll plugin which
is generated by building the cscon project under MSVC.
- When I use the 'System.Printf' function, I only see my message
when I specify MSG_INITIALIZATION. When I try it with MSG_CONSOLE, no
message appears. I tried setting ConsoleReady and EnableConsoleOutput to
'true' in my Initialization routine, but it made no difference.
Similarly, I see no message when I try to use 'Console->PutText()', or
when I try 'System.console_out().'
This is normal behavior for Windows, because the application is compiled
for windowed mode and not console mode. In Unix there is no distinction
between the two and both can appear at the same time, but Windows doesn't
allow this unless the application is compiled for the console.
Post by Charles Darcy
- When I cover the cs window with another, and then uncover it, the
obscured portion is not redrawn until another Printf using
MSG_INITIALIZATION is called. I tried Console->Draw(), but this caused
an invalid page fault in ddraw5.dll.
This is another known issue. The console currently has no way of knowing
it has been overdrawn. There's been talk of introducing a window manager
interface to CS which would allow these things to be handled properly, but
so for no work on it has been done.

/---------------------------------------------------------------------------\
| Michael Dale Long (o_ Personal website: |
| ***@cs.indiana.edu //\ http://php.indiana.edu/~mdlong/ |
| ***@long.custom.net V_/_ The CrystalClear Project Website: |
| ICQ: 1186076 Got Linux? http://crystalclear.sourceforge.net/ |
| GPG Key-ID: 6516F8A0 |
| GPG Fingerprint: D564 004B 9CB8 C5A4 DDC2 45DA 175F 7514 6516 F8A0 |
\---------------------------------------------------------------------------/
samuel
2000-05-02 00:25:02 UTC
Permalink
Post by Michael Dale Long
Post by Charles Darcy
- When I cover the cs window with another, and then uncover it, the
obscured portion is not redrawn until another Printf using
MSG_INITIALIZATION is called. I tried Console->Draw(), but this caused
an invalid page fault in ddraw5.dll.
This is another known issue. The console currently has no way of knowing
it has been overdrawn. There's been talk of introducing a window manager
interface to CS which would allow these things to be handled properly, but
so for no work on it has been done.
- In Linux, does the Crystal Space System object have an Application Widget or
Window reference lying around? It would be neat if we could use some of the
built in X Windows functions like pop-up menus, pull-down lists, scroll-bars,
etc, without having to reinvent the wheels just to make a (2D) button to
click...
- Likewise, the MSWin version could retain the hWind identifier so you can add
OLE properties to it... maybe include it in another App...
- Speaking of which, imagine a CrystalSpaceWidget class for X, you could have a
rendering engine inside your app, kind of like how they were talking about
HTML widgets for a while...
This is being worked upon. A patch was sent for review. Needs to be redesigned though.
Initially its only on X and the software drivers, but once design is improved and agreed
upon, then we can go about interfacing up the other drivers.

regards,
samuel
Martin Geisse
2000-05-01 17:26:08 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Charles Darcy
Hi,
I've been having some problems with the console.
I'm currently operating under Win98, using MSVC6 SP3 and the Release
configuration. My display is set on 8-bit colour (although the problems
still arise under 16-bit). I am using the default cscon.dll plugin which
is generated by building the cscon project under MSVC.
- When I use the 'System.Printf' function, I only see my message
when I specify MSG_INITIALIZATION. When I try it with MSG_CONSOLE, no
message appears. I tried setting ConsoleReady and EnableConsoleOutput to
'true' in my Initialization routine, but it made no difference.
Similarly, I see no message when I try to use 'Console->PutText()', or
when I try 'System.console_out().'
This is normal behavior for Windows, because the application is compiled
for windowed mode and not console mode. In Unix there is no distinction
between the two and both can appear at the same time, but Windows doesn't
allow this unless the application is compiled for the console.
NO, this can't be normal! First of all, this has nothing to do with
compiling for GUI or console. Compiling for console means that stdout is
directed to a text window, whereas GUI simply ignores everything on stdout.

MSG_CONSOLE, on the other hand, should write things to the CS console, which
lies inside a DirectX window.

Have you set csSystemDriver::Console to your pointer?
Post by Charles Darcy
- When I cover the cs window with another, and then uncover it, the
obscured portion is not redrawn until another Printf using
MSG_INITIALIZATION is called. I tried Console->Draw(), but this caused
an invalid page fault in ddraw5.dll.
This is another known issue. The console currently has no way of knowing
it has been overdrawn. There's been talk of introducing a window manager
interface to CS which would allow these things to be handled properly, but
so for no work on it has been done.
Post by Charles Darcy
P.S. I don't use the global 'csSystemDriver *System' variable but
have instead defined my own. I am assuming this is a convenience
variable for users, and not used within the engine ?
This is OK. The global pointer 'System' IS used by the engine, but it is set
automatically.

Martin Geisse
Charles Darcy
2000-05-03 12:49:35 UTC
Permalink
Hi again,

Thanks for your replies and sorry it took a while to get back to you.

Yes, my csSystemDriver::Console pointer is set correctly, but I think I have
found the problem.

When MSG_INITIALIZATION is used, Printf calls System->DemoWrite, which does
a Console PutText and Draw, along with all the G2D stuff (BeginDraw, Clear,
FinishDraw, Print) to actually get the text image onto the screen (correct me if
I'm wrong, I haven't really looked into G2D yet).

With MSG_CONSOLE, on the other hand, only the Console PutText is called.

So, should MSG_CONSOLE use DemoWrite ? (What does the Demo part mean ?)
I suppose the author/maintainer has his reasons for the current implementation,
but I don't know what they are. Can anyone comment ?


cheers,

Charlie.
Post by Martin Geisse
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Charles Darcy
Hi,
I've been having some problems with the console.
I'm currently operating under Win98, using MSVC6 SP3 and the Release
configuration. My display is set on 8-bit colour (although the problems
still arise under 16-bit). I am using the default cscon.dll plugin which
is generated by building the cscon project under MSVC.
- When I use the 'System.Printf' function, I only see my message
when I specify MSG_INITIALIZATION. When I try it with MSG_CONSOLE, no
message appears. I tried setting ConsoleReady and EnableConsoleOutput to
'true' in my Initialization routine, but it made no difference.
Similarly, I see no message when I try to use 'Console->PutText()', or
when I try 'System.console_out().'
This is normal behavior for Windows, because the application is compiled
for windowed mode and not console mode. In Unix there is no distinction
between the two and both can appear at the same time, but Windows doesn't
allow this unless the application is compiled for the console.
NO, this can't be normal! First of all, this has nothing to do with
compiling for GUI or console. Compiling for console means that stdout is
directed to a text window, whereas GUI simply ignores everything on stdout.
MSG_CONSOLE, on the other hand, should write things to the CS console, which
lies inside a DirectX window.
Have you set csSystemDriver::Console to your pointer?
Post by Charles Darcy
- When I cover the cs window with another, and then uncover it, the
obscured portion is not redrawn until another Printf using
MSG_INITIALIZATION is called. I tried Console->Draw(), but this caused
an invalid page fault in ddraw5.dll.
This is another known issue. The console currently has no way of knowing
it has been overdrawn. There's been talk of introducing a window manager
interface to CS which would allow these things to be handled properly, but
so for no work on it has been done.
Post by Charles Darcy
P.S. I don't use the global 'csSystemDriver *System' variable but
have instead defined my own. I am assuming this is a convenience
variable for users, and not used within the engine ?
This is OK. The global pointer 'System' IS used by the engine, but it is set
automatically.
Martin Geisse
_______________________________________________
Crystal-main mailing list
http://lists.sourceforge.net/mailman/listinfo/crystal-main
Michael Dale Long
2000-05-02 22:28:57 UTC
Permalink
Post by Martin Geisse
MSG_CONSOLE, on the other hand, should write things to the CS console, which
lies inside a DirectX window.
Oops. I was thinking MSG_STDOUT. Martin is correct.
Post by Martin Geisse
Have you set csSystemDriver::Console to your pointer?
If csSystemDriver::Console weren't set, MSG_INITIALIZATION wouldn't work
either.

/---------------------------------------------------------------------------\
| Michael Dale Long (o_ Personal website: |
| ***@cs.indiana.edu //\ http://php.indiana.edu/~mdlong/ |
| ***@long.custom.net V_/_ The CrystalClear Project Website: |
| ICQ: 1186076 Got Linux? http://crystalclear.sourceforge.net/ |
| GPG Key-ID: 6516F8A0 |
| GPG Fingerprint: D564 004B 9CB8 C5A4 DDC2 45DA 175F 7514 6516 F8A0 |
\---------------------------------------------------------------------------/
Continue reading on narkive:
Loading...