The IP_TOS control data is 1 byte on Unix, but 4 bytes on Windows.
Properly zero-extend the value instead of copying 3 bytes of garbage.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Add more tests for DTLS, and clear up behavior of prior tests.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This is not particularly likely to overflow, but there is no harm in being
careful.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
E. g., DigiCert CRL file is currently 35MB.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Used by Deus Ex: Human Revolution.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
As we loop on ReadFile success we may read multiple reports at once, but
we never reset buttons in the enumeration params. The pressed buttons
are returned by HidP_GetUsagesEx and any other button must be cleared.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52387
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
In case real and expected segment count differ, don't compare the
segment type/position for extra segments.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This fixes several games (e.g. ICEY) not working well with DS4 gamepad
over bluetooth, as we fixup the input report sizes, and the game expects
them to be longer.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
So that the client allocates a larger receive buffer when needed and not
trigger the assert below when setting the reply message data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The DS4 controllers are sending 563 bytes HID reports by default, this
translates to WM_INPUT messages larger than the default message size.
We would otherwise need an additional server roundtrip on each message,
and these devices are also known to be very verbose and continuously
send HID reports, so we really don't want it.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Regardless of how long the driver packet is.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The very last vertex of a figure can only be a of type LINE
(non-coincident last/first vertices) or type END (otherwise).
In case the current vertex starts a Bézier path, there is always
at least one more vertex, i.e. (vertex_idx + 1) < vertex_count
is always true.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
When the last vertex is coincident with the first vertex, the last
segment should be suppressed for both END_OPEN and END_CLOSED.
Only when last and first vertex are not coincident the additional
line segment may be added - always for intersection tests and
similar, and for stroking operations when the figure is CLOSED.
Trying to use an zero-length segment in d2d_geometry_intersect_self()
will create invalid segments, causing infinite loops later.
Instead of reducing the vertex_count for coincident first/last
vertices add a dedicated type. This is required as some operations
need the last segment, others do not.
This also allows to remove some replicated code in
StrokeContains()/GetBounds()/Simplify(), as a last Bézier segment
is always processed in the regular loop.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This is a preparative patch for the next change, behaviour is
essentially unchanged, though it may be slightly faster.
Rearrange code for outline segment and join generation so it
will work for END_OPEN/END_CLOSED path, with coincident and disparate
last/first vertex.
Each vertex is now fetched once, and pivoted on the next iteration.
Also move invariants in front of the loop,
Path segments are drawn starting with the first segment, up
to vertex_count - 2 (index of start vertex). Only in case of
a END_CLOSED figure with non-coincident last/first vertex,
also the last line segment is drawn.
Joins are added between all drawn segments, and only for
END_CLOSED also the join at the first vertex is added.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Provide two orientatations for both cases (END_OPEN/END_CLOSED) each.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Extra test for outline generation code, path with only 2 vertices.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Some software (Buhl Tax and variants) repeatedly calls SetSegmentFlags()
with D2D1_PATH_SEGMENT_NONE, which is just the default value and has no
effect (unless the flags where already changed, which still reports
a FIXME).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>