Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ae3b9bb6
Commit
ae3b9bb6
authored
Oct 09, 2003
by
Peter Berg Larsen
Committed by
Alexandre Julliard
Oct 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use CONSOLE_RENDERER_NONE_EVENT to compress an event instead of
deleting it with a memmove.
parent
09f71d08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
wineconsole.c
programs/wineconsole/wineconsole.c
+22
-23
No files found.
programs/wineconsole/wineconsole.c
View file @
ae3b9bb6
...
...
@@ -208,7 +208,7 @@ static BOOL WINECON_SetEditionMode(HANDLE hConIn, int edition_mode)
int
WINECON_GrabChanges
(
struct
inner_data
*
data
)
{
struct
console_renderer_event
evts
[
256
];
int
i
,
num
,
curs
=
-
1
;
int
i
,
num
,
ev_found
;
HANDLE
h
;
SERVER_START_REQ
(
get_console_renderer_events
)
...
...
@@ -223,40 +223,37 @@ int WINECON_GrabChanges(struct inner_data* data)
/* FIXME: should do some event compression here (cursor pos, update) */
/* step 1: keep only last cursor pos event */
ev_found
=
-
1
;
for
(
i
=
num
-
1
;
i
>=
0
;
i
--
)
{
if
(
evts
[
i
].
event
==
CONSOLE_RENDERER_CURSOR_POS_EVENT
)
{
if
(
curs
==
-
1
)
curs
=
i
;
else
{
memmove
(
&
evts
[
i
],
&
evts
[
i
+
1
],
(
num
-
i
-
1
)
*
sizeof
(
evts
[
0
]));
num
--
;
}
if
(
ev_found
!=
-
1
)
evts
[
ev_found
].
event
=
CONSOLE_RENDERER_NONE_EVENT
;
ev_found
=
i
;
}
}
/* step 2: manage update events */
ev_found
=
-
1
;
for
(
i
=
0
;
i
<
num
-
1
;
i
++
)
{
if
(
evts
[
i
].
event
==
CONSOLE_RENDERER_UPDATE_EVENT
&&
evts
[
i
+
1
].
event
=
=
CONSOLE_RENDERER_UPDATE_EVENT
)
if
(
evts
[
i
].
event
==
CONSOLE_RENDERER_NONE_EVENT
)
continue
;
if
(
evts
[
i
].
event
!
=
CONSOLE_RENDERER_UPDATE_EVENT
)
{
/* contiguous */
if
(
evts
[
i
].
u
.
update
.
bottom
+
1
==
evts
[
i
+
1
].
u
.
update
.
top
)
{
evts
[
i
].
u
.
update
.
bottom
=
evts
[
i
+
1
].
u
.
update
.
bottom
;
memmove
(
&
evts
[
i
+
1
],
&
evts
[
i
+
2
],
(
num
-
i
-
2
)
*
sizeof
(
evts
[
0
]));
num
--
;
i
--
;
}
/* already handled cases */
else
if
(
evts
[
i
].
u
.
update
.
top
<=
evts
[
i
+
1
].
u
.
update
.
top
&&
evts
[
i
].
u
.
update
.
bottom
>=
evts
[
i
+
1
].
u
.
update
.
bottom
)
{
memmove
(
&
evts
[
i
+
1
],
&
evts
[
i
+
2
],
(
num
-
i
-
2
)
*
sizeof
(
evts
[
0
]));
num
--
;
i
--
;
ev_found
=
-
1
;
continue
;
}
if
(
ev_found
!=
-
1
&&
!
(
evts
[
i
].
u
.
update
.
bottom
+
1
<
evts
[
ev_found
].
u
.
update
.
top
||
evts
[
ev_found
].
u
.
update
.
bottom
+
1
<
evts
[
i
].
u
.
update
.
top
))
{
evts
[
i
].
u
.
update
.
top
=
min
(
evts
[
i
].
u
.
update
.
top
,
evts
[
ev_found
].
u
.
update
.
top
);
evts
[
i
].
u
.
update
.
bottom
=
max
(
evts
[
i
].
u
.
update
.
bottom
,
evts
[
ev_found
].
u
.
update
.
bottom
);
evts
[
ev_found
].
event
=
CONSOLE_RENDERER_NONE_EVENT
;
}
ev_found
=
i
;
}
WINE_TRACE
(
"Events:"
);
...
...
@@ -264,6 +261,8 @@ int WINECON_GrabChanges(struct inner_data* data)
{
switch
(
evts
[
i
].
event
)
{
case
CONSOLE_RENDERER_NONE_EVENT
:
break
;
case
CONSOLE_RENDERER_TITLE_EVENT
:
data
->
fnSetTitle
(
data
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment