mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 08:49:20 -05:00
Add setting to SpiceManager that disables exceptions (closing #142)
Disable exceptions on default
This commit is contained in:
@@ -28,8 +28,10 @@
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
#include <openspace/engine/wrapper/windowwrapper.h>
|
||||
#include <openspace/util/openspacemodule.h>
|
||||
#include <openspace/util/spicemanager.h>
|
||||
#include <openspace/scene/scene.h>
|
||||
|
||||
|
||||
#include <ghoul/ghoul.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
@@ -41,11 +43,8 @@ namespace {
|
||||
const std::string _loggerCat = "SettingsEngine";
|
||||
}
|
||||
|
||||
|
||||
namespace openspace {
|
||||
|
||||
|
||||
|
||||
SettingsEngine::SettingsEngine()
|
||||
: _eyeSeparation("eyeSeparation", "Eye Separation" , 0.f, 0.f, 10.f)
|
||||
, _scenes("scenes", "Scene", properties::OptionProperty::DisplayType::Dropdown)
|
||||
@@ -53,8 +52,19 @@ SettingsEngine::SettingsEngine()
|
||||
, _busyWaitForDecode("busyWaitForDecode", "Busy Wait for decode", false)
|
||||
, _logSGCTOutOfOrderErrors("logSGCTOutOfOrderErrors", "Log SGCT out-of-order", false)
|
||||
, _useDoubleBuffering("useDoubleBuffering", "Use double buffering", false)
|
||||
, _spiceUseExceptions("enableSpiceExceptions", "Enable Spice Exceptions", false)
|
||||
{
|
||||
setName("Global Properties");
|
||||
|
||||
_spiceUseExceptions.onChange([this]{
|
||||
if (_spiceUseExceptions) {
|
||||
SpiceManager::ref().setExceptionHandling(SpiceManager::UseException::Yes);
|
||||
}
|
||||
else {
|
||||
SpiceManager::ref().setExceptionHandling(SpiceManager::UseException::No);
|
||||
}
|
||||
});
|
||||
addProperty(_spiceUseExceptions);
|
||||
}
|
||||
|
||||
void SettingsEngine::initialize() {
|
||||
|
||||
Reference in New Issue
Block a user