Merge pull request #183 from OpenMW/master while resolving conflicts

# Conflicts:
#	.travis.yml
#	CMakeLists.txt
pull/183/merge
David Cernat 8 years ago
commit e0234dc362

@ -12,8 +12,8 @@ branches:
- /openmw-.*$/ - /openmw-.*$/
env: env:
global: global:
- macos_qt_formula=qt@5.5
- secure: NZmvVuA0O9NJXVQ12tXQZHDJC2mbFgYNFcsicw0DgW1It2Nk5hxIkF0pfu4/Z59mhQuOPgRVjl5b0FKy2Axh0gkWc1DJEXGwNaiW5lpTMNWR1LJG5rxa8LrDUpFkycpbzfAFuTUZu5z3iYVv64XzELvBuqNGhPMu1LeBnrlech0jFNjkR9p5qtJGWb8zYcPMCC57rig8a9g1ABoVYS6UXjrKpx0946ZLRsE5ukc9pXsypGwPmOMyfzZkxxzIqFaxoE5JIEdaJTWba/6Za315ozYYIi/N35ROI1YAv5GHRe/Iw9XAa4vQpbDzjM7ZSsZdTvvQsSU598gD2xC6jFUKSrpW6GZKwM2x236fZLGnOk5Uw7DUbG+AwpcEmxBwoy9PjBl9ZF3tJykI0gROewCy8MODhdsVMKr1HGIMVBIJySm/RnNqtoDbYV8mYnSl5b8rwJiCajoiR8Zuv4CIfGneeH1a3DOQDPH/qkDsU6ilzF4ANsBlMUUpgY653KBMBmTlNuVZSH527tnD7Fg6JgHVuSQkTbRa1vSkR7Zcre604RZcAoaEdbX3bhVDasPPghU/I742L0RH3oQNlR09pPBDZ8kG7ydl4aPHwpCWnvXNM1vgxtGvnYLztwrse7IoaRXRYiMFmrso78WhMWUDKgvY4wV9aeUu0DtnMezZVIQwCKg= - secure: NZmvVuA0O9NJXVQ12tXQZHDJC2mbFgYNFcsicw0DgW1It2Nk5hxIkF0pfu4/Z59mhQuOPgRVjl5b0FKy2Axh0gkWc1DJEXGwNaiW5lpTMNWR1LJG5rxa8LrDUpFkycpbzfAFuTUZu5z3iYVv64XzELvBuqNGhPMu1LeBnrlech0jFNjkR9p5qtJGWb8zYcPMCC57rig8a9g1ABoVYS6UXjrKpx0946ZLRsE5ukc9pXsypGwPmOMyfzZkxxzIqFaxoE5JIEdaJTWba/6Za315ozYYIi/N35ROI1YAv5GHRe/Iw9XAa4vQpbDzjM7ZSsZdTvvQsSU598gD2xC6jFUKSrpW6GZKwM2x236fZLGnOk5Uw7DUbG+AwpcEmxBwoy9PjBl9ZF3tJykI0gROewCy8MODhdsVMKr1HGIMVBIJySm/RnNqtoDbYV8mYnSl5b8rwJiCajoiR8Zuv4CIfGneeH1a3DOQDPH/qkDsU6ilzF4ANsBlMUUpgY653KBMBmTlNuVZSH527tnD7Fg6JgHVuSQkTbRa1vSkR7Zcre604RZcAoaEdbX3bhVDasPPghU/I742L0RH3oQNlR09pPBDZ8kG7ydl4aPHwpCWnvXNM1vgxtGvnYLztwrse7IoaRXRYiMFmrso78WhMWUDKgvY4wV9aeUu0DtnMezZVIQwCKg=
- macos_qt_formula=qt@5.5
addons: addons:
apt: apt:
sources: sources:

@ -102,6 +102,7 @@ Programmers
Michał Moroz (dragonee) Michał Moroz (dragonee)
Miroslav Puda (pakanek) Miroslav Puda (pakanek)
MiroslavR MiroslavR
Mitchell Schwitzer (schwitzerm)
naclander naclander
Narmo Narmo
Nathan Jeffords (blunted2night) Nathan Jeffords (blunted2night)

@ -7,5 +7,5 @@ brew rm pkgconfig || true
brew rm qt5 || true brew rm qt5 || true
brew install cmake pkgconfig $macos_qt_formula brew install cmake pkgconfig $macos_qt_formula
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-0ecece4.zip -o ~/openmw-deps.zip curl https://downloads.openmw.org/osx/dependencies/openmw-deps-c79172d.zip -o ~/openmw-deps.zip
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null

@ -13,7 +13,7 @@ cmake \
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \ -D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \ -D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \
-D CMAKE_OSX_SYSROOT="macosx10.12" \ -D CMAKE_OSX_SYSROOT="macosx10.12" \
-D CMAKE_BUILD_TYPE=Debug \ -D CMAKE_BUILD_TYPE=Release \
-D OPENMW_OSX_DEPLOYMENT=TRUE \ -D OPENMW_OSX_DEPLOYMENT=TRUE \
-D DESIRED_QT_VERSION=5 \ -D DESIRED_QT_VERSION=5 \
-D BUILD_ESMTOOL=FALSE \ -D BUILD_ESMTOOL=FALSE \

@ -0,0 +1,9 @@
#!/bin/sh
cd build
DATE=`date +'%d%m%Y'`
SHORT_COMMIT=`git rev-parse --short ${TRAVIS_COMMIT}`
TARGET_FILENAME="OpenMW-${DATE}-${SHORT_COMMIT}.dmg"
curl --ssl --ftp-create-dirs -T *.dmg -u $OSX_FTP_USER:$OSX_FTP_PASSWORD "ftp://s3.mydevil.net:21/nightly/${TARGET_FILENAME}"

@ -35,7 +35,6 @@ set(OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VER
set(GIT_CHECKOUT FALSE) set(GIT_CHECKOUT FALSE)
if(EXISTS ${PROJECT_SOURCE_DIR}/.git) if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
find_package(Git) find_package(Git)
if(GIT_FOUND) if(GIT_FOUND)
@ -43,9 +42,6 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
else(GIT_FOUND) else(GIT_FOUND)
message(WARNING "Git executable not found") message(WARNING "Git executable not found")
endif(GIT_FOUND) endif(GIT_FOUND)
else(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
message(STATUS "Shallow Git clone detected, not attempting to retrieve version info")
endif(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git) endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
# Macros # Macros

@ -122,7 +122,7 @@ namespace MWGui
if (!iter->isEmpty()) if (!iter->isEmpty())
{ {
mApparatus.at (index)->setUserString ("ToolTipType", "ItemPtr"); mApparatus.at (index)->setUserString ("ToolTipType", "ItemPtr");
mApparatus.at (index)->setUserData (*iter); mApparatus.at (index)->setUserData (MWWorld::Ptr(*iter));
} }
} }
@ -190,9 +190,9 @@ namespace MWGui
continue; continue;
ingredient->setUserString("ToolTipType", "ItemPtr"); ingredient->setUserString("ToolTipType", "ItemPtr");
ingredient->setUserData(item); ingredient->setUserData(MWWorld::Ptr(item));
ingredient->setCount(ingredient->getUserData<MWWorld::Ptr>()->getRefData().getCount()); ingredient->setCount(item.getRefData().getCount());
} }
mItemView->update(); mItemView->update();

@ -79,7 +79,7 @@ namespace MWGui
{ {
mSoulBox->setItem(gem); mSoulBox->setItem(gem);
mSoulBox->setUserString ("ToolTipType", "ItemPtr"); mSoulBox->setUserString ("ToolTipType", "ItemPtr");
mSoulBox->setUserData(gem); mSoulBox->setUserData(MWWorld::Ptr(gem));
mEnchanting.setSoulGem(gem); mEnchanting.setSoulGem(gem);
} }
} }
@ -97,7 +97,7 @@ namespace MWGui
mName->setCaption(item.getClass().getName(item)); mName->setCaption(item.getClass().getName(item));
mItemBox->setItem(item); mItemBox->setItem(item);
mItemBox->setUserString ("ToolTipType", "ItemPtr"); mItemBox->setUserString ("ToolTipType", "ItemPtr");
mItemBox->setUserData(item); mItemBox->setUserData(MWWorld::Ptr(item));
mEnchanting.setOldItem(item); mEnchanting.setOldItem(item);
} }
} }

@ -479,7 +479,7 @@ namespace MWGui
mSpellStatus->setProgressPosition(chargePercent); mSpellStatus->setProgressPosition(chargePercent);
mSpellBox->setUserString("ToolTipType", "ItemPtr"); mSpellBox->setUserString("ToolTipType", "ItemPtr");
mSpellBox->setUserData(item); mSpellBox->setUserData(MWWorld::Ptr(item));
mSpellImage->setItem(item); mSpellImage->setItem(item);
} }
@ -497,7 +497,7 @@ namespace MWGui
mWeapBox->clearUserStrings(); mWeapBox->clearUserStrings();
mWeapBox->setUserString("ToolTipType", "ItemPtr"); mWeapBox->setUserString("ToolTipType", "ItemPtr");
mWeapBox->setUserData(item); mWeapBox->setUserData(MWWorld::Ptr(item));
mWeapStatus->setProgressRange(100); mWeapStatus->setProgressRange(100);
mWeapStatus->setProgressPosition(durabilityPercent); mWeapStatus->setProgressPosition(durabilityPercent);

@ -97,7 +97,7 @@ namespace MWGui
line.mIcon = mScrollView->createWidget<ItemWidget>("MW_ItemIconSmall", MyGUI::IntCoord(), MyGUI::Align::Default); line.mIcon = mScrollView->createWidget<ItemWidget>("MW_ItemIconSmall", MyGUI::IntCoord(), MyGUI::Align::Default);
line.mIcon->setItem(line.mItemPtr); line.mIcon->setItem(line.mItemPtr);
line.mIcon->setUserString("ToolTipType", "ItemPtr"); line.mIcon->setUserString("ToolTipType", "ItemPtr");
line.mIcon->setUserData(line.mItemPtr); line.mIcon->setUserData(MWWorld::Ptr(line.mItemPtr));
line.mIcon->eventMouseButtonClick += MyGUI::newDelegate(this, &ItemChargeView::onIconClicked); line.mIcon->eventMouseButtonClick += MyGUI::newDelegate(this, &ItemChargeView::onIconClicked);
line.mIcon->eventMouseWheel += MyGUI::newDelegate(this, &ItemChargeView::onMouseWheelMoved); line.mIcon->eventMouseWheel += MyGUI::newDelegate(this, &ItemChargeView::onMouseWheelMoved);

@ -44,10 +44,9 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
MWWorld::Ptr player = MWMechanics::getPlayer(); MWWorld::Ptr player = MWMechanics::getPlayer();
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId); int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
const MWWorld::ContainerStore& store = player.getClass().getContainerStore(player); MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
int categories = MWWorld::ContainerStore::Type_Weapon | MWWorld::ContainerStore::Type_Armor; int categories = MWWorld::ContainerStore::Type_Weapon | MWWorld::ContainerStore::Type_Armor;
for (MWWorld::ConstContainerStoreIterator iter (store.cbegin(categories)); for (MWWorld::ContainerStoreIterator iter (store.begin(categories)); iter!=store.end(); ++iter)
iter!=store.cend(); ++iter)
{ {
if (iter->getClass().hasItemHealth(*iter)) if (iter->getClass().hasItemHealth(*iter))
{ {
@ -87,7 +86,7 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
currentY += 18; currentY += 18;
button->setUserString("Price", MyGUI::utility::toString(price)); button->setUserString("Price", MyGUI::utility::toString(price));
button->setUserData(*iter); button->setUserData(MWWorld::Ptr(*iter));
button->setCaptionWithReplacing(name); button->setCaptionWithReplacing(name);
button->setSize(button->getTextSize().width,18); button->setSize(button->getTextSize().width,18);
button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel); button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel);

@ -185,7 +185,7 @@ namespace MWGui
button->setItem(item, ItemWidget::Barter); button->setItem(item, ItemWidget::Barter);
button->setUserString ("ToolTipType", "ItemPtr"); button->setUserString ("ToolTipType", "ItemPtr");
button->setUserData(item); button->setUserData(MWWorld::Ptr(item));
if (mItemSelectionDialog) if (mItemSelectionDialog)
mItemSelectionDialog->setVisible(false); mItemSelectionDialog->setVisible(false);
@ -209,7 +209,7 @@ namespace MWGui
button->setIcon(item); button->setIcon(item);
button->setUserString ("ToolTipType", "ItemPtr"); button->setUserString ("ToolTipType", "ItemPtr");
button->setUserData(item); button->setUserData(MWWorld::Ptr(item));
if (mMagicSelectionDialog) if (mMagicSelectionDialog)
mMagicSelectionDialog->setVisible(false); mMagicSelectionDialog->setVisible(false);
@ -278,7 +278,7 @@ namespace MWGui
if (Misc::StringUtils::ciEqual(it->getCellRef().getRefId(), id)) if (Misc::StringUtils::ciEqual(it->getCellRef().getRefId(), id))
{ {
item = *it; item = *it;
button->setUserData(item); button->setUserData(MWWorld::Ptr(item));
break; break;
} }
} }

@ -68,7 +68,7 @@ void Recharge::start (const MWWorld::Ptr &item)
{ {
mGemIcon->setItem(item); mGemIcon->setItem(item);
mGemIcon->setUserString("ToolTipType", "ItemPtr"); mGemIcon->setUserString("ToolTipType", "ItemPtr");
mGemIcon->setUserData(item); mGemIcon->setUserData(MWWorld::Ptr(item));
updateView(); updateView();
} }

@ -66,7 +66,7 @@ void Repair::startRepairItem(const MWWorld::Ptr &item)
mToolIcon->setItem(item); mToolIcon->setItem(item);
mToolIcon->setUserString("ToolTipType", "ItemPtr"); mToolIcon->setUserString("ToolTipType", "ItemPtr");
mToolIcon->setUserData(item); mToolIcon->setUserData(MWWorld::Ptr(item));
updateRepairView(); updateRepairView();
} }

@ -278,7 +278,7 @@ namespace MWGui
{ {
if (spell.mType == Spell::Type_EnchantedItem) if (spell.mType == Spell::Type_EnchantedItem)
{ {
widget->setUserData(spell.mItem); widget->setUserData(MWWorld::Ptr(spell.mItem));
widget->setUserString("ToolTipType", "ItemPtr"); widget->setUserString("ToolTipType", "ItemPtr");
} }
else else

@ -238,7 +238,30 @@ namespace MWGui
} }
if (value.getBase() < 100) if (value.getBase() < 100)
{
nameWidget->setUserString("Visible_SkillMaxed", "false");
nameWidget->setUserString("UserData^Hidden_SkillMaxed", "true");
nameWidget->setUserString("Visible_SkillProgressVBox", "true");
nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false");
valueWidget->setUserString("Visible_SkillMaxed", "false");
valueWidget->setUserString("UserData^Hidden_SkillMaxed", "true");
valueWidget->setUserString("Visible_SkillProgressVBox", "true");
valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false");
setSkillProgress(nameWidget, value.getProgress(), parSkill);
setSkillProgress(valueWidget, value.getProgress(), parSkill); setSkillProgress(valueWidget, value.getProgress(), parSkill);
} else {
nameWidget->setUserString("Visible_SkillMaxed", "true");
nameWidget->setUserString("UserData^Hidden_SkillMaxed", "false");
nameWidget->setUserString("Visible_SkillProgressVBox", "false");
nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true");
valueWidget->setUserString("Visible_SkillMaxed", "true");
valueWidget->setUserString("UserData^Hidden_SkillMaxed", "false");
valueWidget->setUserString("Visible_SkillProgressVBox", "false");
valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true");
}
} }
} }

@ -16,6 +16,9 @@
#include "../mwbase/soundmanager.hpp" #include "../mwbase/soundmanager.hpp"
#include "../mwbase/windowmanager.hpp" #include "../mwbase/windowmanager.hpp"
#include "../mwworld/inventorystore.hpp"
#include "../mwworld/class.hpp"
#include "interpretercontext.hpp" #include "interpretercontext.hpp"
#include "ref.hpp" #include "ref.hpp"
@ -205,8 +208,22 @@ namespace MWScript
int index = runtime[0].mInteger; int index = runtime[0].mInteger;
runtime.pop(); runtime.pop();
runtime.push (MWBase::Environment::get().getSoundManager()->getSoundPlaying ( bool ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying (
ptr, runtime.getStringLiteral (index))); ptr, runtime.getStringLiteral (index));
// GetSoundPlaying called on an equipped item should also look for sounds played by the equipping actor.
if (!ret && ptr.getContainerStore())
{
MWWorld::Ptr cont = MWBase::Environment::get().getWorld()->findContainer(ptr);
if (!cont.isEmpty() && cont.getClass().hasInventoryStore(cont) && cont.getClass().getInventoryStore(cont).isEquipped(ptr))
{
ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying (
cont, runtime.getStringLiteral (index));
}
}
runtime.push(ret);
} }
}; };

@ -629,7 +629,7 @@ void MWWorld::InventoryStore::flagAsModified()
mRechargingItemsUpToDate = false; mRechargingItemsUpToDate = false;
} }
bool MWWorld::InventoryStore::stacks(const ConstPtr& ptr1, const ConstPtr& ptr2) bool MWWorld::InventoryStore::stacks(const ConstPtr& ptr1, const ConstPtr& ptr2) const
{ {
bool canStack = MWWorld::ContainerStore::stacks(ptr1, ptr2); bool canStack = MWWorld::ContainerStore::stacks(ptr1, ptr2);
if (!canStack) if (!canStack)

@ -174,7 +174,7 @@ namespace MWWorld
///< \attention This function is internal to the world model and should not be called from ///< \attention This function is internal to the world model and should not be called from
/// outside. /// outside.
virtual bool stacks (const ConstPtr& ptr1, const ConstPtr& ptr2); virtual bool stacks (const ConstPtr& ptr1, const ConstPtr& ptr2) const;
///< @return true if the two specified objects can stack with each other ///< @return true if the two specified objects can stack with each other
virtual int remove(const Ptr& item, int count, const Ptr& actor); virtual int remove(const Ptr& item, int count, const Ptr& actor);

@ -3,7 +3,8 @@ execute_process (
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE EXITCODE1 RESULT_VARIABLE EXITCODE1
OUTPUT_VARIABLE TAGHASH OUTPUT_VARIABLE TAGHASH
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
execute_process ( execute_process (
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
@ -12,13 +13,17 @@ execute_process (
OUTPUT_VARIABLE COMMITHASH OUTPUT_VARIABLE COMMITHASH
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
string (COMPARE EQUAL "${EXITCODE1}:${EXITCODE2}" "0:0" SUCCESS) string (COMPARE EQUAL "${EXITCODE1}:${EXITCODE2}" "0:0" FULL_SUCCESS)
if (SUCCESS) string (COMPARE EQUAL "${EXITCODE2}" "0" COMMIT_SUCCESS)
if (FULL_SUCCESS)
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}") set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
set(OPENMW_VERSION_TAGHASH "${TAGHASH}") set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
message(STATUS "OpenMW version ${OPENMW_VERSION}") message(STATUS "OpenMW version ${OPENMW_VERSION}")
else (SUCCESS) elseif (COMMIT_SUCCESS)
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
message(STATUS "OpenMW version ${OPENMW_VERSION}")
else ()
message(WARNING "Failed to get valid version information from Git") message(WARNING "Failed to get valid version information from Git")
endif (SUCCESS) endif ()
configure_file(${VERSION_IN_FILE} ${VERSION_FILE}) configure_file(${VERSION_IN_FILE} ${VERSION_FILE})

@ -49,7 +49,7 @@ namespace Resource
return static_cast<NifFileHolder*>(obj.get())->mNifFile; return static_cast<NifFileHolder*>(obj.get())->mNifFile;
else else
{ {
Nif::NIFFilePtr file (new Nif::NIFFile(mVFS->getNormalized(name), name)); Nif::NIFFilePtr file (new Nif::NIFFile(mVFS->get(name), name));
obj = new NifFileHolder(file); obj = new NifFileHolder(file);
mCache->addEntryToObjectCache(name, obj); mCache->addEntryToObjectCache(name, obj);
return file; return file;

@ -127,8 +127,6 @@ void Skeleton::updateBoneMatrices(unsigned int traversalNumber)
for (unsigned int i=0; i<mRootBone->mChildren.size(); ++i) for (unsigned int i=0; i<mRootBone->mChildren.size(); ++i)
mRootBone->mChildren[i]->update(NULL); mRootBone->mChildren[i]->update(NULL);
} }
else
std::cerr << "Error: no root bone" << std::endl;
mNeedToUpdateBoneMatrices = false; mNeedToUpdateBoneMatrices = false;
} }

@ -87,18 +87,24 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
break; break;
case SDL_KEYDOWN: case SDL_KEYDOWN:
if (!evt.key.repeat) if (!evt.key.repeat)
{
mKeyboardListener->keyPressed(evt.key); mKeyboardListener->keyPressed(evt.key);
if (evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12) if (!isModifierHeld(KMOD_ALT) && evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12)
{
mViewer->getEventQueue()->keyPress(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1)); mViewer->getEventQueue()->keyPress(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1));
}
}
break; break;
case SDL_KEYUP: case SDL_KEYUP:
if (!evt.key.repeat) if (!evt.key.repeat)
{
mKeyboardListener->keyReleased(evt.key); mKeyboardListener->keyReleased(evt.key);
if (evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12) if (!isModifierHeld(KMOD_ALT) && evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12)
mViewer->getEventQueue()->keyRelease(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1)); mViewer->getEventQueue()->keyRelease(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1));
}
break; break;
case SDL_TEXTEDITING: case SDL_TEXTEDITING:
@ -225,7 +231,7 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
} }
} }
bool InputWrapper::isModifierHeld(SDL_Keymod mod) bool InputWrapper::isModifierHeld(int mod)
{ {
return (SDL_GetModState() & mod) != 0; return (SDL_GetModState() & mod) != 0;
} }

@ -31,7 +31,7 @@ namespace SDLUtil
void setControllerEventCallback(ControllerListener* listen) { mConListener = listen; } void setControllerEventCallback(ControllerListener* listen) { mConListener = listen; }
void capture(bool windowEventsOnly); void capture(bool windowEventsOnly);
bool isModifierHeld(SDL_Keymod mod); bool isModifierHeld(int mod);
bool isKeyDown(SDL_Scancode key); bool isKeyDown(SDL_Scancode key);
void setMouseVisible (bool visible); void setMouseVisible (bool visible);

@ -23,8 +23,7 @@ std::string Version::describe()
{ {
std::string str = "OpenMW version " + mVersion; std::string str = "OpenMW version " + mVersion;
std::string rev = mCommitHash; std::string rev = mCommitHash;
std::string tag = mTagHash; if (!rev.empty())
if (!rev.empty() && !tag.empty())
{ {
rev = rev.substr(0, 10); rev = rev.substr(0, 10);
str += "\nRevision: " + rev; str += "\nRevision: " + rev;

Loading…
Cancel
Save