]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/device.cpp
Change video mode before reconfiguring the window
[libs/gui.git] / source / input / device.cpp
index 23393de7efead2a93e14de6882db42e02a66c393..10f8d0cf16ff1346d57918d1bd6fbe828b58c08e 100644 (file)
@@ -1,16 +1,15 @@
-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
 #include "device.h"
 
 namespace Msp {
 namespace Input {
 
+Device::Device()
+{ }
+
+Device::~Device()
+{ }
+
 bool Device::get_button_state(unsigned btn) const
 {
        if(btn>buttons.size())
@@ -44,7 +43,7 @@ void Device::set_button_state(unsigned btn, bool state, bool event)
 
        if(state!=buttons[btn])
        {
-               buttons[btn]=state;
+               buttons[btn] = state;
 
                if(event)
                {
@@ -63,8 +62,8 @@ void Device::set_axis_value(unsigned axis, float value, bool event)
 
        if(value!=axes[axis])
        {
-               float old=axes[axis];
-               axes[axis]=value;
+               float old = axes[axis];
+               axes[axis] = value;
 
                if(event)
                        signal_axis_motion.emit(axis, value, value-old);