X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Flinux%2Fgamecontroller_platform.h;h=9bc6f589b36ba0af40ee19a028cf322753421294;hb=8d0f0839d1fc5195fce1b77c36e7f3b5b114e696;hp=517b1b099cc33e522aac398908fc50db9cf8b98a;hpb=d17c22c1da1915afbcb9e39f4bd5e7e28259a110;p=libs%2Fgui.git diff --git a/source/input/linux/gamecontroller_platform.h b/source/input/linux/gamecontroller_platform.h index 517b1b0..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 @@ -18,11 +18,15 @@ public: 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; } }; @@ -30,6 +34,8 @@ public: struct GameController::Private { JsDevice *dev; + + static std::vector detected_controllers; }; } // namespace Input