[DDRAW] Sync the fix for swap_interval from Wine (#4831)
authorSimone Mario Lombardo <simonelombardo@dismail.de>
Wed, 9 Nov 2022 17:44:30 +0000 (18:44 +0100)
committerGitHub <noreply@github.com>
Wed, 9 Nov 2022 17:44:30 +0000 (20:44 +0300)
commit67559215608eaf7338cbc7002ba3b74bf972a3a4
treeb3bcdb85ae373155325bbebb90161a9084e647d5
parentf1908c895985f6b466a64ed4608879377e525b25
[DDRAW] Sync the fix for swap_interval from Wine (#4831)

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
https://source.winehq.org/git/wine.git/blob/13cc08e32d6c04f8f915d07cda39638ee99c3d43:/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
dll/directx/wine/ddraw/ddraw_private.h
dll/directx/wine/ddraw/palette.c
dll/directx/wine/ddraw/surface.c
media/doc/WINESYNC.txt