From b22cc53122c0aae5574a8a3d6bbf0d77e12dc71b Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 10 Jun 2021 08:08:17 +0100 Subject: [PATCH] config: If configure dialog opened with an unavailable model selected (eg ROMs not present), force an available model instead. Fixes new model creation when only one ROM set available. --- src/wx-config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wx-config.c b/src/wx-config.c index 5ff7679..9bc5c8d 100644 --- a/src/wx-config.c +++ b/src/wx-config.c @@ -737,6 +737,8 @@ int config_dlgproc(void* hdlg, int message, INT_PARAM wParam, LONG_PARAM lParam) c++; } wx_sendmessage(h, WX_CB_SETCURSEL, modeltolist[model], 0); + model = listtomodel[modeltolist[model]]; + romset = model_getromset(); prev_model = model; recalc_vid_list(hdlg, romstomodel[romset], 0);