Module: wine Branch: master Commit: 79f3573d8feb638c383c4dff4573ccf711d571af URL: https://gitlab.winehq.org/wine/wine/-/commit/79f3573d8feb638c383c4dff4573ccf...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Apr 22 17:10:22 2024 +0200
win32u: Remove now unnecessary reset_display_manager_ctx.
---
dlls/win32u/sysparams.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 3211d4e7d8b..9ebd6e26fc4 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1485,21 +1485,6 @@ static const struct gdi_device_manager device_manager = add_modes, };
-static void reset_display_manager_ctx( struct device_manager_ctx *ctx ) -{ - HANDLE mutex = ctx->mutex; - - if (ctx->source_key) - { - NtClose( ctx->source_key ); - last_query_display_time = 0; - } - if (ctx->gpu_count) cleanup_devices(); - - memset( ctx, 0, sizeof(*ctx) ); - if ((ctx->mutex = mutex)) prepare_devices(); -} - static void release_display_manager_ctx( struct device_manager_ctx *ctx ) { if (ctx->mutex) @@ -1508,7 +1493,13 @@ static void release_display_manager_ctx( struct device_manager_ctx *ctx ) release_display_device_init_mutex( ctx->mutex ); ctx->mutex = 0; } - reset_display_manager_ctx( ctx ); + + if (ctx->source_key) + { + NtClose( ctx->source_key ); + last_query_display_time = 0; + } + if (ctx->gpu_count) cleanup_devices(); }
static void clear_display_devices(void)