mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
more appropriate fix for #189
This commit is contained in:
parent
f7d537cb28
commit
5395721c26
2 changed files with 14 additions and 3 deletions
|
@ -114,7 +114,9 @@ endif()
|
|||
|
||||
if(APPLE)
|
||||
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)
|
||||
|
||||
if(DPKG_PROGRAM)
|
||||
|
|
|
@ -387,9 +387,18 @@ namespace MWInput
|
|||
|
||||
bool InputManager::keyPressed( const OIS::KeyEvent &arg )
|
||||
{
|
||||
mInputCtrl->keyPressed (arg);
|
||||
std::cout << "text received: " << arg.text << std::endl;
|
||||
|
||||
MyGUI::InputManager::getInstance().injectKeyPress(MyGUI::KeyCode::Enum(arg.key), arg.text);
|
||||
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), text);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue