X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Flinux%2Fgamecontroller_platform.h;h=9bc6f589b36ba0af40ee19a028cf322753421294;hb=8d0f0839d1fc5195fce1b77c36e7f3b5b114e696;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..9bc6f58 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); + virtual std::size_t do_read(char *, std::size_t); + virtual std::size_t do_write(const char *, std::size_t); 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