Skip to content
Snippets Groups Projects
Commit b33dff4c authored by jwendt's avatar jwendt
Browse files

correct compiler problems

#463
parent b5f13198
No related branches found
No related tags found
1 merge request!156Feature/#463 mouse keyboard device
......@@ -70,6 +70,10 @@ class PHOENIX_EXPORT DisplaySystemWindow : public DisplaySystem {
void OnSDLEvent(const SDL_Event& event) override;
boost::signals2::signal<void()> quit_signal_;
};
// DisplaySystemWindow never calls Update on sdl_event_receiver, so if no
// other SDLDevice like Mouse or Keyboard is present the quit signal is never
// fired. The rational behind that is that the SDL Events are only polled from
// within the DeviceSystem
SDLEventReceiver sdl_event_receiver;
};
......
......@@ -36,6 +36,7 @@ class PHOENIX_EXPORT Device {
class EventDistributer {
public:
virtual ~EventDistributer() = default;
virtual void Update() = 0;
void AddDevice(Device* device);
void RemoveDevice(Device* device);
......
......@@ -49,6 +49,7 @@ class PHOENIX_EXPORT SDLDevice : public Device {
protected:
class SDLEventDistributer : public EventDistributer {
public:
virtual ~SDLEventDistributer() = default;
void Update() override;
};
static SDLEventDistributer SDL_event_distributer;
......
......@@ -56,6 +56,7 @@ class PHOENIX_EXPORT TrackedDevice : public Device {
protected:
class OpenVREventDistributer : public EventDistributer {
public:
virtual ~OpenVREventDistributer() = default;
void Update() override;
};
static OpenVREventDistributer vr_event_distributer;
......
......@@ -32,7 +32,7 @@
#include "phx/core/logger.hpp"
#include "phx/core/system.hpp"
#include "phx/display/display_system_window.hpp"
#include "phx/input/input_system.hpp"
#include "phx/input/device_system.hpp"
#include "phx/rendering/rendering_system.hpp"
#include "phx/scripting/behavior.hpp"
#include "phx/setup.hpp"
......@@ -338,11 +338,11 @@ SCENARIO("An engine can be setup by the default setup", "[phx][phx::Engine]") {
REQUIRE(rendering_system != nullptr);
REQUIRE(rendering_system->GetEngine() == engine.get());
}
THEN("It has an input system") {
phx::InputSystem* input_system =
engine->GetSystem<phx::InputSystem>();
REQUIRE(input_system != nullptr);
REQUIRE(input_system->GetEngine() == engine.get());
THEN("It has a device system") {
phx::DeviceSystem* device_system =
engine->GetSystem<phx::DeviceSystem>();
REQUIRE(device_system != nullptr);
REQUIRE(device_system->GetEngine() == engine.get());
}
THEN("A default empty scene has been created") {
REQUIRE(engine->GetScene() != nullptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment