make GUI more responsive. Prevent output freezing
if large data volumes are sent to the display
This commit is contained in:
parent
ff0163188d
commit
de3d90e8e1
|
|
@ -1,8 +1,9 @@
|
||||||
/* Main program for ngspice under Windows OS
|
/* Main program for ngspice under Windows OS
|
||||||
Autor: Wolfgang Muees
|
Autor: Wolfgang Muees
|
||||||
Stand: 28.10.97
|
Stand: 28.10.97
|
||||||
Autor: Holger Vogt
|
Copyright: Holger Vogt
|
||||||
Stand: 17.10.2009
|
Stand: 20.07.2019
|
||||||
|
Modified BSD license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ngspice/config.h"
|
#include "ngspice/config.h"
|
||||||
|
|
@ -285,16 +286,18 @@ _DeleteFirstLine(void)
|
||||||
static void
|
static void
|
||||||
AppendChar(char c)
|
AppendChar(char c)
|
||||||
{
|
{
|
||||||
// Textbuffer nicht zu grosz werden lassen
|
// limit the text buffer size to TBufSize
|
||||||
while ((TBufEnd + 4) >= TBufSize)
|
while ((TBufEnd + 4) >= TBufSize)
|
||||||
_DeleteFirstLine();
|
_DeleteFirstLine();
|
||||||
// Zeichen anfuegen
|
// Zeichen anfuegen
|
||||||
TBuffer[TBufEnd++] = c;
|
TBuffer[TBufEnd++] = c;
|
||||||
TBuffer[TBufEnd] = SE;
|
TBuffer[TBufEnd] = SE;
|
||||||
DoUpdate = TRUE;
|
DoUpdate = TRUE;
|
||||||
// Sobald eine Zeile zuende, im Textfenster anzeigen
|
// if line is complete, show it in text window
|
||||||
if (c == LF)
|
if (c == LF) {
|
||||||
DisplayText();
|
DisplayText();
|
||||||
|
WaitForIdle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue