From: Rémi Bernon rbernon@codeweavers.com
--- 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 6993373ca54..8f0a89c75db 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1482,21 +1482,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) @@ -1505,7 +1490,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)