The message queue needs both an inproc sync, to wake inproc waits on a message and trigger a server request, and a server sync, for when the wait is only on the queue and should be optimized into a single server request.
It could be better to avoid a dedicated request to retrieve the queue inproc sync fd, for instance by sending an fd on thread init, but we can use this to duality to gradually introduce inproc syncs requests instead and avoid dead code (even though the code ultimately returns STATUS_NOT_IMPLEMENTED for now). We can change the way queue inproc sync fds are retrieved later on.
--
v3: ntdll: Check inproc sync handle access rights on wait.
server: Add a request to retrieve the inproc sync fds.
server: Create inproc sync events for message queues.
ntdll: Retrieve and cache an ntsync device on process init.
ntdll: Add stub functions for in-process synchronization.
ntdll: Add some traces to synchronization methods.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8445
Certain games have started using the newest GameInput API and linking to GameInput.dll. Adding a stub library allows these games to launch and enables them to fall back to the DirectInput API if `GameInputCreate` returns an error.
Affected games: Le Mans Ultimate
--
v2: gameinput: Add stub dll.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8338
When using native xinput in WRC9, vccorlib is needed to make sure xinput doesn't crash.
--
v2: wincorlib: Add stub for platform_details_uninit_data.
wincorlib: Add stub for platform_details_init_data.
vccorlib140: Add stub dll.
wincorlib: Add stub dll.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3334
@alexhenrie @zhiyi
The corresponding Windows test demo is as follows:
[test_DrawTextExW.exe](/uploads/ff1eafc9c58ac03b598699a93136484c/test_DrawTextExW.exe)
[test_DrawTextExW.c](/uploads/a41719a33c2ee0e057c911933bf55180/test_DrawTextExW.c)
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
Change-Id: I64052ba8aa8161ad83c1811d642aedbe462ef5ea
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8177
This is not the right fix, and I need some help. Let me explain.
`session_submit_command` checks that:
1. `session->commands` is empty, and
2. `SESSION_FLAG_PENDING_COMMAND` is NOT set
before submitting the `session_op`. The assumption is, if there are queued commands, or if there is a command currently running, that pending command will submit subsequent commands when it completes.
However, in this call chain:
```
#0 0x00006fffe1d27ad7 in create_async_result (object=object@entry=0x0, callback=callback@entry=0x7e62489f1c08,
state=state@entry=0x7e61cb5322b0, out=out@entry=0x7e6242bac7a0) at ../dlls/rtworkq/queue.c:1229
#1 0x00006fffe1d222d5 in RtwqCreateAsyncResult (object=object@entry=0x0, callback=callback@entry=0x7e62489f1c08,
state=state@entry=0x7e61cb5322b0, out=out@entry=0x7e6242bac7a0) at ../dlls/rtworkq/queue.c:1245
#2 0x00006fffd45e2096 in MFPutWorkItem (queue=queue@entry=1, callback=callback@entry=0x7e62489f1c08,
state=state@entry=0x7e61cb5322b0) at ../dlls/mfplat/queue.c:46
#3 0x00006fffe41244ee in session_command_complete (session=0x7e62489f1be0) at ../dlls/mf/session.c:975
#4 0x00006fffe412d00f in session_reset (session=session@entry=0x7e62489f1be0) at ../dlls/mf/session.c:1051
#5 0x00006fffe41299fc in session_handle_source_shutdown (session=session@entry=0x7e62489f1be0)
at ../dlls/mf/session.c:2957
#6 0x00006fffe4126e90 in session_events_callback_Invoke (iface=0x7e62489f1c20, result=<optimized out>)
at ../dlls/mf/session.c:4445
```
nowhere was the `SESSION_FLAG_PENDING_COMMAND` flag set. In addition to that, `session_events_callback_Invoke` is not a command. So this could happend:
```
Thread 1 | Thread 2
call session_events_callback_Invoke |
| call session_submit_command
| <critical section>
| list_empty(&session->commands) is true, and PENDING_COMMAND not set
| MFPutWorkItem(op)
| list_add(&session->commands, op) <- (1)
| </critical_section>
call session_handle_source_shutdown |
<critical_section> |
call session_reset |
call session_command_complete |
list_head(&session->commands) |
op is returned because of (1) |
MFPutWorkItem(op) again |
</critical_section> |
```
The result is this op will be executed twice, and also double freed, because `session_commands_callback_Invoke` releases the `op`.
* * *
There is even another way an `op` can be submitted twice, `session_handle_start_error` calls `session_reset`, which already calls `session_command_complete`, and later it calls `session_command_complete_with_event` again. I think a missing return?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8270
Fix the rectangle from DrawText(..., DT_CALCRECT) with a selected font might not be enough to
actually draw text with the font for the EV Nova game.
This ensures that text extent calculated with a font selected in a device context is enough when
drawing texts using the same font and device context. The root cause is that FreeType might report
different font metrics for different GGO formats. GetTextExtentExPoint() gets text extent with
GGO_METRICS. And GGO_METRICS gets font metrics from glyphs loaded with FT_LOAD_TARGET_NORMAL, so
when drawing bitmap fonts, which is of GGO_BITMAP format loaded with FT_LOAD_TARGET_MONO, with the
calculated text extent, the result text might get truncated because of the font metrics difference.
On Windows, anti-aliased font and bitmap font of the same face font reports the same font metrics so
such a problem doesn't happen. The ultimate fix is to let FreeType hint the bitmap fonts with the
same font metrics as anti-aliased fonts but there are no settings that can achieve it unless we
write a new FreeType hinter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57309
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8414
Fix a regression from 225004e1. According to MSDN, if the biClrUsed field is zero, the bitmap should
use the maximum number of colours corresponding to the value of the biBitCount member for the
compression mode specified by biCompression.
--
v2: Revert "wineps: Use the correct colours when a monochrome bitmap without a colour table is the source."
gdi32/tests: Test recording SetDIBitsToDevice() for bitmaps with zero biClrUsed field in EMFs.
gdi32/tests: Test recording StretchDIBits() for bitmaps with zero biClrUsed field in EMFs.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8401
C99 checks depend on stddef.h and stdarg.h. Those headers are usually shipped with
compilers (and another copy of them as part of mingw-w64 for targets that use it),
but some providers skip them. We use our own version during the build anyway, so
we may use them for configure checks as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4642