forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'corristo/osx_f_keys_fix' into next
This commit is contained in:
commit
ef4910293b
2 changed files with 11 additions and 2 deletions
|
@ -114,7 +114,9 @@ endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
find_library(CARBON_FRAMEWORK Carbon)
|
find_library(CARBON_FRAMEWORK Carbon)
|
||||||
target_link_libraries(openmw ${CARBON_FRAMEWORK})
|
find_library(COCOA_FRAMEWORK Cocoa)
|
||||||
|
find_library(IOKIT_FRAMEWORK IOKit)
|
||||||
|
target_link_libraries(openmw ${CARBON_FRAMEWORK} ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
if(DPKG_PROGRAM)
|
if(DPKG_PROGRAM)
|
||||||
|
|
|
@ -388,8 +388,15 @@ namespace MWInput
|
||||||
bool InputManager::keyPressed( const OIS::KeyEvent &arg )
|
bool InputManager::keyPressed( const OIS::KeyEvent &arg )
|
||||||
{
|
{
|
||||||
mInputCtrl->keyPressed (arg);
|
mInputCtrl->keyPressed (arg);
|
||||||
|
unsigned int text = arg.text;
|
||||||
|
#ifdef __APPLE__ // filter \016 symbol for F-keys on OS X
|
||||||
|
if ((arg.key >= OIS::KC_F1 && arg.key <= OIS::KC_F10) ||
|
||||||
|
(arg.key >= OIS::KC_F11 && arg.key <= OIS::KC_F15)) {
|
||||||
|
text = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(arg.key), arg.text);
|
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(arg.key), text);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue