From 836fe18aeb976e1a4a1e97d4ad2b3d9852fb41dd Mon Sep 17 00:00:00 2001 From: SarahW Date: Tue, 10 Jan 2017 16:46:33 +0000 Subject: [PATCH] Fixed mouse type check in Windows configuration dialogue --- src/win-config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win-config.c b/src/win-config.c index 3a5c12f..5a54961 100644 --- a/src/win-config.c +++ b/src/win-config.c @@ -26,11 +26,11 @@ static int settings_mouse_to_list[20], settings_list_to_mouse[20]; static int mouse_valid(int type, int model) { - if (type == MOUSE_TYPE_PS2 && !(models[model].flags & MODEL_PS2)) + if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_PS2 && !(models[model].flags & MODEL_PS2)) return 0; - if (type == MOUSE_TYPE_AMSTRAD && !(models[model].flags & MODEL_AMSTRAD)) + if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_AMSTRAD && !(models[model].flags & MODEL_AMSTRAD)) return 0; - if (type == MOUSE_TYPE_OLIM24 && !(models[model].flags & MODEL_OLIM24)) + if ((type & MOUSE_TYPE_IF_MASK) == MOUSE_TYPE_OLIM24 && !(models[model].flags & MODEL_OLIM24)) return 0; return 1; }