and move debug.h after all includes. Addendum to 60b0afc3a (PR #5818)
dsound_new: Addendum to 5974fe1 (r45584).
hdaudbus: Addendum to cf7fc81 (r68311).
Sync the barebone fix from Wine (wine-7.19-557-g13cc08e32d6):
https://source.winehq.org/git/wine.git/?a=search&h=HEAD&st=grep&s=ddraw_surface_update_frontbuffer%28
and
13cc08e32d:/dlls/ddraw/surface.c
- Added "swap_interval" argument to ddraw_surface_update_frontbuffer()
- Added ddraw_swap_interval_from_flags() function for dispatching
the integer type of required swap interval
- Updated ddraw_surface_update_frontbuffer() function for managing the
swap interval between backbuffer and frontbuffer (and relative flipping)
- Updated the ddraw_surface7_Flip() function for relaying the swap interval
to ddraw_surface_update_frontbuffer() function.
- Added 0 value (as Wine) when the swap interval is not required
This fixes empty white screen issue on rendering because of lacking
swap interval for the software / games that use ddraw.
CORE-18547
Mutes the logging:
fixme:(dll/directx/wine/ddraw/utils.c:584) Unhandled flags 0x20.
gets logged many times per second.
It does affect several applications, e.g. the game 'Anno 1602' from 1998, and the 'Diablo 2 demo' from rapps,
For both games it can be observed with both: our VBEMP driver and the VBox4.3.12 3D-accelerated-driver.
Muting may improve performance a bit in such apps.
It gets logged although no missing features can be perceived visually in the rendering.
Fix it by importing Wine-commit b943c7910b3261c9603343369cd632f7a3b56bba
ddraw: Handle DDLOCK_WRITEONLY in wined3dmapflags_from_ddrawmapflags().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Revert my last dsound fix, because it does not fix the actual problem with audio formats support. It only makes the situation worse. It prevents the error when creating an audio stream, but the sound is not playing correctly, both in ReactOS and Windows (with our dsound.dll). Without this fix, it works perfectly on Windows, but does not in ROS.
In particular, the sound is not playing properly in AIMP 4.71 with other audio formats besides default (44100 Hz, 16 bit, stereo). And any other apps which request these audio formats may be also affected as well.
Force the status back to failure, because otherwise the badly required code is not executed at all.
I've made a more correct fix(es) in other audio component(s) instead and will submit them if further PRs.
This reverts commit 183566ee58.
CORE-10907
Don't force HRESULT status to DSERR_BUFFERLOST by default in primarybuffer_SetFormat function.
Assign to it S_OK instead, as done in current Wine:
a8583acae9:/dlls/dsound/primary.c#l440
That variable is already set to failure in other appropriate place, when this is indeed needed:
https://git.reactos.org/?p=reactos.git;a=blob;h=b04a526929e4e817ff63aa652530e5901a3253a6;f=dll/directx/wine/dsound/primary.c#l511
The assigned failure status caused executing failure handling code even when the fail actually didn't happen.
In particular, DSOUND_ReopenDevice failed on waveOutOpen call when calling this was not needed.
After my changes, it's called only when needed, i. e., only when the actual failure happens
Otherwise, if all goes good, that code is not called, so the data is transfered successfully and the function is working correctly.
It fixes non-working playback in QMMP 0.11.1 (via DirectSound ouput plugin) and AIMP 3.10 and newer versions.
Also it improves the DirectSound test results from MS DxDiag: now all 4 available tests are passing successfully, instead of only 2.
Other dsound issues also might be fixed as well.
CORE-10907 CORE-14783
Fix and improve DirectSoundEnumerateW and DirectSoundCaptureEnumerateW implementations in our dsound.
Use the Windows-compatible way to get the device name and pass it to callback.
- Don't use Wine-specific DSDRIVERDESC structure and DRV_QUERYDSOUNDDESC message, declared in sdk/include/dxsdk/dsdriver.h, whose are obsolete even in Wine for now.
- Instead, declare a new WAVEINCAPSW and WAVEOUTCAPSW structures (for input and output appropriately), call waveInGetDevCapsW and WaveOutGetDevCapsW for enumerated device ID and store retieved device name in these structures.
- Then pass them to a lpDSEnumCallbackW as well, without Ansi to Unicode conversion (since the retrieved string is Unicode already).
- Do this both for capture and playback functions.
- Addtionally, add MMSYSERR_BADDEVICEID status code to mmErr macro, because it also might be returned by waveIn/OutGetDevCapsW as well, in case of failure.
- And mark our dosund as forked, because it definitely will not be synced at least until we'll retarget to Vista or newer. Add an appropriate comment.
This fixes incorrect detection of DirectSound audio input and output devices, so now a lot of apps are able to detect it correctly, and can play the sound properly (e.g. AIMP 2.61 and IcyTower from RAPPS).
CORE-7535 CORE-10907 CORE-15324 CORE-15533 CORE-16340
This patch fixes vertex processing issue of bug 33770.
The problem comes from the fact that even if the call succeeds,
the game interprets a non null error_messages pointer as an error.
By calling D3DCompile we use a newer version of the compiler which is more
strict and generates the following warning.
- warning X3206: 'dot': implicit truncation of vector type
- warning X3206: implicit truncation of vector type
- warning X3206: 'mul': implicit truncation of vector type
D3DCompileShader does not generate such warnings.
These is confirmed in the DX SDK release note:
New Warning X3206: Implicit Truncation of Vector Type
Beginning in the August 2009 release of the DirectX SDK, the compiler will warn
when an implicit truncation of a vector type occurs.
The warnings cannot be disable so this patch filters out these strings in D3DCompileShader
and reset the error messages pointer if the resulting buffer is empty.
Try 2:
- only filter out lines containing "X3206:" in case d3dcompiler_43 has localization
Try 3:
- use move in place instead of copying the buffer
Try 4:
- filter simplification by Sebastian and remove 'mul' testing left-out in search string
wine-staging patch by Christian Costa <titan.costa@gmail.com>
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id a097f54ea1e7e75b78842ceb835f5db5f08fea06 by Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9eda5c043047fd117441473651b2089b80a4ed80 by Sven Baars <sbaars@codeweavers.com>
Spurred by a patch by Alex Henrie.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 18ae539c914a9b5a89f63d8cf9c2a21273eccc6c by Matteo Bruni <mbruni@codeweavers.com>
This allows us to use IDirect3DDevice9_StretchRect
and avoid GPU synchronization.
It massively improves performance in Dead Space 1 which
calls LoadSurfaceFromSurface every frame before presenting.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 625622ad4182061ee3111032ab0ae4a494b74e73 by Robin Kertels <robin.kertels@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 22970932d014f024fcf7f0f98b1a5384b1b1eb99 by Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d511853d45bc3302b2a4501b1aa0097a4e78b3d9 by Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fd9808b45af4bf4c6771fe2932e3169cb193bf44 by Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 53769e7bde9cfb808e26cf67057314c2ca03345a by Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id aab980a16253ff6bb6286572576899bfc0f83945 by Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2b5b069dd70ba328dc0ce660861ad802feae912c by Paul Gofman <gofmanp@gmail.com>
This check is essentially validating that the hardcoded state_table[]
has reasonable values for the shader constant states. Use ARRAY_SIZE()
to avoid warnings if the compiler chooses an unsigned integer to back
enum SHADER_CONSTANT_TYPE.
Based on an idea by Henri Verbeet.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id cfc533b40d2d1426a8f05501152b28aa1ec78f07 by Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 9796bdc966a89cd31829f3a094bb37ec71e21871 by Sven Baars <sbaars@codeweavers.com>