|
From: Tapio V. <aa...@us...> - 2010-05-17 17:00:52
|
Module: performous
Branch: master
Commit: b2d35c05b062b6e9610ea3428371fc2211dc53dc
Author: Tapio Vierros <tap...@gm...>
Date: Mon Apr 12 20:24:58 2010 +0300
Fix bug causing InputDev always unassigning and thus never throwing NotFound.
---
game/instrumentgraph.hh | 4 ++--
game/joystick.hh | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/game/instrumentgraph.hh b/game/instrumentgraph.hh
index d8e77bc..5f032ca 100644
--- a/game/instrumentgraph.hh
+++ b/game/instrumentgraph.hh
@@ -17,8 +17,8 @@ class Song;
class InstrumentGraph {
public:
/// Constructor
- InstrumentGraph(Audio& audio, Song const& song, input::InputDev input):
- m_audio(audio), m_song(song), m_input(input),
+ InstrumentGraph(Audio& audio, Song const& song, input::DevType inp):
+ m_audio(audio), m_song(song), m_input(input::DevType(inp)),
m_stream(),
m_cx(0.0, 0.2), m_width(0.5, 0.4),
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
diff --git a/game/joystick.hh b/game/joystick.hh
index 5874661..df81edb 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -4,6 +4,7 @@
#include <deque>
#include <iostream>
#include <stdexcept>
+#include <boost/noncopyable.hpp>
#include "SDL_events.h"
#include "SDL_joystick.h"
@@ -116,7 +117,7 @@ namespace input {
NoDevError(): runtime_error("No instrument of the requested type was available") {}
};
- class InputDev {
+ class InputDev: boost::noncopyable {
public:
// First gives a correct instrument type
// Then gives an unknown instrument type
|