https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ac5b9a017a42dfebfbcf…
commit 9ac5b9a017a42dfebfbcf21b4d447d475840d5dc
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Nov 9 21:51:26 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Nov 9 21:51:26 2019 +0100
[MCIAVI32] Sync with Wine Staging 4.18. CORE-16441
---
dll/win32/mciavi32/info.c | 1 -
dll/win32/mciavi32/mciavi.c | 22 ++++++++++++++++------
media/doc/README.WINE | 2 +-
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/dll/win32/mciavi32/info.c b/dll/win32/mciavi32/info.c
index 3d138b1dddd..d516c4d4b01 100644
--- a/dll/win32/mciavi32/info.c
+++ b/dll/win32/mciavi32/info.c
@@ -21,7 +21,6 @@
#include <string.h>
#include "private_mciavi.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(mciavi);
diff --git a/dll/win32/mciavi32/mciavi.c b/dll/win32/mciavi32/mciavi.c
index b32accb6455..d8df240826b 100644
--- a/dll/win32/mciavi32/mciavi.c
+++ b/dll/win32/mciavi32/mciavi.c
@@ -40,7 +40,6 @@
#include <string.h>
#include "private_mciavi.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(mciavi);
@@ -253,13 +252,13 @@ static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
/* FIXME : what should be done id wma->hFile is already != 0, or the driver is
playin' */
TRACE("MCI_OPEN_ELEMENT %s!\n",
debugstr_w(lpOpenParms->lpstrElementName));
- wma->lpFileName = HeapAlloc(GetProcessHeap(), 0,
(strlenW(lpOpenParms->lpstrElementName) + 1) * sizeof(WCHAR));
- strcpyW(wma->lpFileName, lpOpenParms->lpstrElementName);
+ wma->lpFileName = HeapAlloc(GetProcessHeap(), 0,
(lstrlenW(lpOpenParms->lpstrElementName) + 1) * sizeof(WCHAR));
+ lstrcpyW(wma->lpFileName, lpOpenParms->lpstrElementName);
if (lpOpenParms->lpstrElementName[0] == '@') {
/* The file name @11223344 encodes an AVIFile handle in decimal notation
* in Win3.1 and w2k/NT, but this feature is absent in win95 (KB140750).
- * wma->hFile = LongToHandle(strtolW(lpOpenParms->lpstrElementName+1, NULL, 10));
*/
+ * wma->hFile = LongToHandle(wcstol(lpOpenParms->lpstrElementName+1, NULL, 10));
*/
FIXME("Using AVIFile/Stream %s NIY\n",
debugstr_w(lpOpenParms->lpstrElementName));
}
wma->hFile = mmioOpenW(lpOpenParms->lpstrElementName, NULL,
@@ -556,7 +555,7 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags,
LPMCI_PLAY_PARMS lpParms
if (dwFlags & MCI_DGV_PLAY_REVERSE) return MCIERR_UNSUPPORTED_FUNCTION;
if (dwFlags & MCI_TEST) return 0;
- if (dwFlags &
(MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN|MCI_MCIAVI_PLAY_FULLBY2))
+ if (dwFlags & (MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLBY2))
FIXME("Unsupported flag %08x\n", dwFlags);
EnterCriticalSection(&wma->cs);
@@ -591,7 +590,18 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags,
LPMCI_PLAY_PARMS lpParms
LeaveCriticalSection(&wma->cs);
- if (!(GetWindowLongW(wma->hWndPaint, GWL_STYLE) & WS_VISIBLE))
+ if (dwFlags & MCI_MCIAVI_PLAY_FULLSCREEN)
+ {
+ HMONITOR mon = MonitorFromWindow(wma->hWndPaint, MONITOR_DEFAULTTONEAREST);
+ MONITORINFO mi;
+ mi.cbSize = sizeof(mi);
+ GetMonitorInfoA(mon, &mi);
+ wma->hWndPaint = CreateWindowA("STATIC", NULL, WS_POPUP |
WS_VISIBLE, mi.rcMonitor.left,
+ mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom
- mi.rcMonitor.top,
+ NULL, NULL, NULL, 0);
+ }
+ /* if not fullscreen ensure the window is visible */
+ else if (!(GetWindowLongW(wma->hWndPaint, GWL_STYLE) & WS_VISIBLE))
ShowWindow(wma->hWndPaint, SW_SHOWNA);
EnterCriticalSection(&wma->cs);
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 5b085abfe38..7e54bded41d 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -91,7 +91,7 @@ dll/win32/jsproxy # Synced to WineStaging-4.18
dll/win32/loadperf # Synced to WineStaging-4.18
dll/win32/lz32 # Synced to WineStaging-3.3
dll/win32/mapi32 # Synced to WineStaging-4.18
-dll/win32/mciavi32 # Synced to WineStaging-3.3
+dll/win32/mciavi32 # Synced to WineStaging-4.18
dll/win32/mcicda # Synced to WineStaging-3.3
dll/win32/mciqtz32 # Synced to WineStaging-3.3
dll/win32/mciseq # Synced to WineStaging-3.3