- the last event was not looked at when compressing console events
- better compression for UPDATE_EVENTs as they are not influenced by
CURSOR_POS or CURSOR_GEOM
- added debug traces
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index 0cd1ec1..bbe6d40 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -234,16 +234,18 @@
}
/* step 2: manage update events */
ev_found = -1;
- for (i = 0; i < num - 1; i++)
+ for (i = 0; i < num; i++)
{
- if (evts[i].event == CONSOLE_RENDERER_NONE_EVENT) continue;
+ if (evts[i].event == CONSOLE_RENDERER_NONE_EVENT ||
+ evts[i].event == CONSOLE_RENDERER_CURSOR_POS_EVENT ||
+ evts[i].event == CONSOLE_RENDERER_CURSOR_GEOM_EVENT) continue;
if (evts[i].event != CONSOLE_RENDERER_UPDATE_EVENT)
{
ev_found = -1;
continue;
- }
+ }
- if (ev_found != -1 &&
+ if (ev_found != -1 && /* Only 2 cases where they can NOT merge */
!(evts[i ].u.update.bottom + 1 < evts[ev_found].u.update.top ||
evts[ev_found].u.update.bottom + 1 < evts[i ].u.update.top))
{
@@ -262,8 +264,10 @@
switch (evts[i].event)
{
case CONSOLE_RENDERER_NONE_EVENT:
+ WINE_TRACE(" NOP");
break;
case CONSOLE_RENDERER_TITLE_EVENT:
+ WINE_TRACE(" title()");
data->fnSetTitle(data);
break;
case CONSOLE_RENDERER_ACTIVE_SB_EVENT: