mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 09:23:53 +00:00
Merge branch 'master' into wanderfix
This commit is contained in:
commit
3f2dbdc8a8
5 changed files with 38 additions and 20 deletions
|
@ -5,12 +5,14 @@
|
|||
Bug #2222: Fatigue's effect on selling price is backwards
|
||||
Bug #2326: After a bound item expires the last equipped item of that type is not automatically re-equipped
|
||||
Bug #2835: Player able to slowly move when overencumbered
|
||||
Bug #2862: [macOS] Can't quit launcher using Command-Q or OpenMW->Quit
|
||||
Bug #2971: Compiler did not reject lines with naked expressions beginning with x.y
|
||||
Bug #3374: Touch spells not hitting kwama foragers
|
||||
Bug #3591: Angled hit distance too low
|
||||
Bug #3629: DB assassin attack never triggers creature spawning
|
||||
Bug #3876: Landscape texture painting is misaligned
|
||||
Bug #3897: Have Goodbye give all choices the effects of Goodbye
|
||||
Bug #3911: [macOS] Typing in the "Content List name" dialog box produces double characters
|
||||
Bug #3993: Terrain texture blending map is not upscaled
|
||||
Bug #3997: Almalexia doesn't pace
|
||||
Bug #4036: Weird behaviour of AI packages if package target has non-unique ID
|
||||
|
@ -30,6 +32,7 @@
|
|||
Bug #4451: Script fails to compile when using "Begin, [ScriptName]" syntax
|
||||
Bug #4453: Quick keys behaviour is invalid for equipment
|
||||
Bug #4454: AI opens doors too slow
|
||||
Bug #4457: Item without CanCarry flag prevents shield autoequipping in dark areas
|
||||
Bug #4458: AiWander console command handles idle chances incorrectly
|
||||
Feature #4256: Implement ToggleBorders (TB) console command
|
||||
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "graphicspage.hpp"
|
||||
|
||||
#include <boost/math/common_factor.hpp>
|
||||
#include <csignal>
|
||||
#include <QDesktopWidget>
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
|
@ -11,6 +12,7 @@
|
|||
#define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
||||
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_video.h>
|
||||
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
|
@ -46,8 +48,28 @@ Launcher::GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, Settings:
|
|||
|
||||
}
|
||||
|
||||
bool Launcher::GraphicsPage::connectToSdl() {
|
||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
|
||||
SDL_SetMainReady();
|
||||
// Required for determining screen resolution and such on the Graphics tab
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
signal(SIGINT, SIG_DFL); // We don't want to use the SDL event loop in the launcher,
|
||||
// so reset SIGINT which SDL wants to redirect to an SDL_Quit event.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Launcher::GraphicsPage::setupSDL()
|
||||
{
|
||||
bool sdlConnectSuccessful = connectToSdl();
|
||||
if (!sdlConnectSuccessful)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int displays = SDL_GetNumVideoDisplays();
|
||||
|
||||
if (displays < 0)
|
||||
|
@ -67,6 +89,9 @@ bool Launcher::GraphicsPage::setupSDL()
|
|||
screenComboBox->addItem(QString(tr("Screen ")) + QString::number(i + 1));
|
||||
}
|
||||
|
||||
// Disconnect from SDL processes
|
||||
SDL_Quit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,11 @@ namespace Launcher
|
|||
QStringList getAvailableResolutions(int screen);
|
||||
QRect getMaximumResolution();
|
||||
|
||||
/**
|
||||
* Connect to the SDL so that we can use it to determine graphics
|
||||
* @return whether or not connecting to SDL is successful
|
||||
*/
|
||||
bool connectToSdl();
|
||||
bool setupSDL();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <iostream>
|
||||
#include <csignal>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
|
@ -12,24 +11,12 @@
|
|||
#define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
||||
#endif // MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
#include "maindialog.hpp"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
try
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
|
||||
SDL_SetMainReady();
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
{
|
||||
qDebug() << "SDL_Init failed: " << QString::fromUtf8(SDL_GetError());
|
||||
return 0;
|
||||
}
|
||||
signal(SIGINT, SIG_DFL); // We don't want to use the SDL event loop in the launcher,
|
||||
// so reset SIGINT which SDL wants to redirect to an SDL_Quit event.
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
// Now we make sure the current dir is set to application path
|
||||
|
@ -46,9 +33,7 @@ int main(int argc, char *argv[])
|
|||
if (result == Launcher::FirstRunDialogResultContinue)
|
||||
mainWin.show();
|
||||
|
||||
int returnValue = app.exec();
|
||||
SDL_Quit();
|
||||
return returnValue;
|
||||
return app.exec();
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
|
|
|
@ -984,7 +984,8 @@ namespace MWMechanics
|
|||
MWWorld::ContainerStoreIterator torch = inventoryStore.end();
|
||||
for (MWWorld::ContainerStoreIterator it = inventoryStore.begin(); it != inventoryStore.end(); ++it)
|
||||
{
|
||||
if (it->getTypeName() == typeid(ESM::Light).name())
|
||||
if (it->getTypeName() == typeid(ESM::Light).name() &&
|
||||
it->getClass().canBeEquipped(*it, ptr).first)
|
||||
{
|
||||
torch = it;
|
||||
break;
|
||||
|
@ -1005,8 +1006,7 @@ namespace MWMechanics
|
|||
heldIter = inventoryStore.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
||||
|
||||
// If we have a torch and can equip it, then equip it now.
|
||||
if (heldIter == inventoryStore.end()
|
||||
&& torch->getClass().canBeEquipped(*torch, ptr).first == 1)
|
||||
if (heldIter == inventoryStore.end())
|
||||
{
|
||||
inventoryStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, torch, ptr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue