X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Flinux%2Fgamecontroller_platform.h;h=9fa7dcb2e0b5d9a544dce693c93d8d85354afa64;hb=917c43de100807f4397e36b66b1a748dbf44370e;hp=61bcdb5d67e90eda4e6d1bfe4bb2c7a9040ea815;hpb=051149e5026ff64f3ec477cf19080124b82de619;p=libs%2Fgui.git diff --git a/source/input/linux/gamecontroller_platform.h b/source/input/linux/gamecontroller_platform.h index 61bcdb5..9fa7dcb 100644 --- a/source/input/linux/gamecontroller_platform.h +++ b/source/input/linux/gamecontroller_platform.h @@ -1,5 +1,5 @@ -#ifndef GAMECONTROLLER_PRIVATE_H_ -#define GAMECONTROLLER_PRIVATE_H_ +#ifndef MSP_INPUT_GAMECONTROLLER_PLATFORM_H_ +#define MSP_INPUT_GAMECONTROLLER_PLATFORM_H_ #include #include @@ -14,14 +14,19 @@ private: public: JsDevice(const std::string &); + ~JsDevice(); std::string get_name() const; + virtual void set_block(bool) { } + virtual void set_inherit(bool) { } + protected: virtual unsigned do_read(char *, unsigned); virtual unsigned do_write(const char *, unsigned); public: + virtual const IO::Handle &get_handle(IO::Mode) { return handle; } virtual const IO::Handle &get_event_handle() { return handle; } }; @@ -29,6 +34,8 @@ public: struct GameController::Private { JsDevice *dev; + + static std::vector detected_controllers; }; } // namespace Input