X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Flinux%2Fgamecontroller_platform.h;h=224450e0cccf6aec8421770c7eb41f1329a737f8;hb=479298192e3e5b71a402f79520c90372a4c4b504;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..224450e 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,18 +18,24 @@ public: std::string get_name() const; + void set_block(bool) override { } + void set_inherit(bool) override { } + protected: - virtual unsigned do_read(char *, unsigned); - virtual unsigned do_write(const char *, unsigned); + std::size_t do_read(char *, std::size_t) override; + std::size_t do_write(const char *, std::size_t) override; public: - virtual const IO::Handle &get_event_handle() { return handle; } + const IO::Handle &get_handle(IO::Mode) override { return handle; } + const IO::Handle &get_event_handle() override { return handle; } }; struct GameController::Private { - JsDevice *dev; + JsDevice *dev = nullptr; + + static std::vector detected_controllers; }; } // namespace Input