Win32: Fix pick core dialog (#17709)

This commit is contained in:
sonninnos 2025-03-17 18:10:50 +02:00 committed by GitHub
parent 81b74decb3
commit 5365639a36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}