From ea6269c4110282a3e7c05bec9c7f17ffd1bd5191 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 23:03:52 +0200 Subject: * ui/key.cpp compiles * csoundinterface to ccontrol --- src/ui/key.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/ui/key.cpp') diff --git a/src/ui/key.cpp b/src/ui/key.cpp index 0d73ed0..de668bc 100644 --- a/src/ui/key.cpp +++ b/src/ui/key.cpp @@ -20,6 +20,7 @@ #include +namespace Ui { void GetKeyName(char *name, int key) { @@ -90,12 +91,9 @@ bool CKey::EventProcess(const Event &event) if (event.type == EVENT_MOUSE_BUTTON_DOWN && m_bCatch) { m_bCatch = false; - if ( TestKey(event.param) ) // impossible ? - { + if ( TestKey(event.param) ) { // impossible ? m_sound->Play(SOUND_TZOING); - } - else - { + } else { if ( event.param == m_key[0] || event.param == m_key[1] ) { m_key[0] = event.param; m_key[1] = 0; @@ -120,7 +118,7 @@ bool CKey::EventProcess(const Event &event) bool CKey::TestKey(int key) { - if ( key == VK_PAUSE || key == VK_SNAPSHOT ) return true; // blocked key + if ( key == KEY(PAUSE) || key == KEY(PRINT) ) return true; // blocked key for (int i = 0; i < 20; i++) { for (int j = 0; j < 2; j++) { @@ -237,3 +235,4 @@ int CKey::GetKey(int option) return m_key[option]; } +} -- cgit v1.2.3-1-g7c22