The analogous heap_strndupW already does this. Fixes InternetCrackUrlA
behavior when passed a dwUrlLength that's past the end of the string.
Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Windows will stop processing at the first null, even when given an
explicit length.
Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
If, at some point, we change that, we can add a Wine-only nsi table
that holds the luid to unix-name mapping.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These are imported by ordinal, so on other architectures we end
up calling whatever ends up on that ordinal, which is currently
Beep on x86_64.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The IAudioClient implementation from both Windows and winepulse.drv
never sets the event more than once per period, which is usually
around 10 ms long. Some codecs produce audio samples shorter than
10 ms, so it is critical that the SAR is able to process more than
a sample per period.
This is not currently the case: a new sample is requested only in
audio_renderer_render, which is executed (at most) once per period.
This results in the SAR not being able to keep up with the audio
client, and eventually underrunning.
With this patch the SAR keeps a count of how many frames are
currently queued, and a new sample is immediately requested if
the internal queue has less than a buffer worth of frames.
This patch fixes audio stuttering problems in the logo videos
of Borderlands 3, Deep Rock Galactic and Mutant Year Zero.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The stricter checks imposed by commit
ac39b313b6, while being valid in general,
require that media source attaches to media types the attributes that
application can request.
This patch exposes the MF_MT_ALL_SAMPLES_INDEPENDENT attribute to audio
streams (similarly to what is already done for video streams), which is
for example requested by The Medium.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The strings returned by GetCodePageInfo() depend on the thread's UI
language, not the system locale or the thread's standards and formats
settings.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Marking input report read requests as pending and queueing them instead
of returning STATUS_NOT_IMPLEMENTED.
Windows also calls IRP_MN_(QUERY|CANCEL)_REMOVE_DEVICE on device
initialization and we have to implement them for the test to not
timeout.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Instead of sending both IRP_MN_SURPRISE_REMOVAL and IRP_MN_REMOVE_DEVICE
to all children first.
They may have pending IRPs sent to their parent PDO driver, which need
to be cancelled before IRP_MN_REMOVE_DEVICE can complete. This is the
case for hidclass.sys and its thread calling the lower driver for
instance.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Testbot failures in previous SymGetTypeFromName patch have nothing
to do with that former patch. Trying to address errouneous test.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
While this is a reasonable change per se, the motivation is to avoid a
deadlock when mountmgr.sys calls into iphlpapi and further into
nsiproxy.sys via the nsi device. nsiproxy.sys is hosted by the same
process as mountmgr.sys so is unable to handle the request while
it is also waiting for that same request to return.
The correct long-term solution is for mountmgr.sys to call the
netio.sys versions of the iphlpapi functions. These will call the
kernel-side versions of the nsi functions without going through the
nsi device.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>