From 5365639a367790e60c317f3007c222651de1ed08 Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Mon, 17 Mar 2025 18:10:50 +0200 Subject: [PATCH] Win32: Fix pick core dialog (#17709) --- gfx/common/win32_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index f11535e4c3..5f8dabc8d0 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -333,10 +333,11 @@ static INT_PTR_COMPAT CALLBACK pick_core_proc( { case WM_INITDIALOG: { + const core_info_t *info = NULL; HWND hwndList; unsigned i; - /* Add items to list. */ + /* Add items to list. */ core_info_get_list(&core_info_list); core_info_list_get_supported_cores(core_info_list, path_get(RARCH_PATH_CONTENT), &core_info, &list_size); @@ -349,8 +350,12 @@ static INT_PTR_COMPAT CALLBACK pick_core_proc( SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)info->display_name); } + /* Select the first item in the list */ SendMessage(hwndList, LB_SETCURSEL, 0, 0); + info = (const core_info_t*)&core_info[0]; + path_set(RARCH_PATH_CORE, info->path); + SetFocus(hwndList); return TRUE; }