check for RAW_CONTROL only on macs in switch stmts
On e.g. Windows WXK_RAW_CONTROL == WXK_CONTROL so having both in a switch statement is compile-time error, so wrap the checks for WXK_RAW_CONTROL in an #ifdef __WXMAC__ .
This commit is contained in:
parent
7b1b1ea236
commit
c2a23a9ffe
|
@ -4,7 +4,7 @@ src/wx/cmd-evtable.h
|
|||
src/wx/cmdhandlers.h
|
||||
src/wx/cmdtab.cpp
|
||||
src/wx/wxvbam.xrs
|
||||
build/
|
||||
build*
|
||||
|
||||
# vim swap files
|
||||
*.sw?
|
||||
|
|
|
@ -1131,9 +1131,11 @@ static bool process_key_press(bool down, int key, int mod, int joy = 0)
|
|||
case WXK_CONTROL:
|
||||
mod |= wxMOD_CONTROL;
|
||||
break;
|
||||
#ifdef __WXMAC__
|
||||
case WXK_RAW_CONTROL:
|
||||
mod |= wxMOD_RAW_CONTROL;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
// check if key is already pressed
|
||||
|
|
|
@ -101,10 +101,12 @@ wxString wxKeyTextCtrl::ToString(int mod, int key)
|
|||
s.append(_("CTRL"));
|
||||
break;
|
||||
|
||||
// this is the cmd key on macs
|
||||
// this is the control key on macs
|
||||
#ifdef __WXMAC__
|
||||
case WXK_RAW_CONTROL:
|
||||
s.append(_("RAWCTRL"));
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
s.append((wxChar)key);
|
||||
|
|
Loading…
Reference in New Issue