mirror of https://github.com/snes9xgit/snes9x.git
win32: Hide entry control if no hotkey binding is there.
This commit is contained in:
parent
2a6b040f3e
commit
2cb8fd06e6
|
@ -8357,10 +8357,16 @@ static void set_hotkeyinfo(HWND hDlg)
|
||||||
{
|
{
|
||||||
int index = SendDlgItemMessage(hDlg,IDC_HKCOMBO,CB_GETCURSEL,0,0);
|
int index = SendDlgItemMessage(hDlg,IDC_HKCOMBO,CB_GETCURSEL,0,0);
|
||||||
|
|
||||||
for(int i = 0; i < MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS; i++)
|
for (int i = 0; i < MAX_SWITCHABLE_HOTKEY_DIALOG_ITEMS; i++)
|
||||||
{
|
{
|
||||||
|
int flags = SW_SHOWNOACTIVATE;
|
||||||
|
if (hotkey_dialog_items[index][i].key_entry == NULL)
|
||||||
|
flags = SW_HIDE;
|
||||||
|
ShowWindow(GetDlgItem(hDlg, IDC_HOTKEY1 + i), flags);
|
||||||
|
ShowWindow(GetDlgItem(hDlg, IDC_LABEL_HK1 + i), flags);
|
||||||
|
|
||||||
int wParam = 0, lParam = 0;
|
int wParam = 0, lParam = 0;
|
||||||
if(hotkey_dialog_items[index][i].key_entry)
|
if (hotkey_dialog_items[index][i].key_entry)
|
||||||
{
|
{
|
||||||
wParam = hotkey_dialog_items[index][i].key_entry->key;
|
wParam = hotkey_dialog_items[index][i].key_entry->key;
|
||||||
lParam = hotkey_dialog_items[index][i].key_entry->modifiers;
|
lParam = hotkey_dialog_items[index][i].key_entry->modifiers;
|
||||||
|
|
Loading…
Reference in New Issue