Jinoh Kang (@iamahuman) commented about server/thread.c:
if (thread->context->status != STATUS_PENDING)
/* If context is in a pending state, we don't know if we will use WoW or native
* context, so store both and discard irrevelant one in select request. */
const int is_pending = thread->context->status == STATUS_PENDING;
unsigned int native_flags = contexts[CTX_NATIVE].flags;
if (ctx_count == 2 && (is_pending || thread->context->regs[CTX_WOW].machine)) {
ctx = thread->context->regs[CTX_WOW].machine ? CTX_WOW : CTX_NATIVE;
context = &contexts[ctx];
}
else ctx = CTX_PENDING;
context_t *ctx = &thread->context->regs[CTX_WOW];
/* some regs are always set from the native context */
flags = contexts[CTX_WOW].flags & ~req->native_flags;
From Julliard's commit fa47ea740020dd5bffa94b3cd835559393b2f752, we always mask `req->native_flags` with `contexts[CTX_NATIVE].flags` before using it. This patch removes that mask.
I'm not sure if that masking was intentional, since the client side already applies the mask before passing it to the server. I'll leave that decision up to @julliard.