mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-19 03:13:14 +00:00
Made DisplayDevice more robust
This commit is contained in:
parent
67b79b0efa
commit
a0c818b4ca
@ -13,19 +13,18 @@ public:
|
||||
std::string getName() const override { return "SDL Display"; }
|
||||
std::string getDescription() const override { return ""; }
|
||||
|
||||
bool start() override {
|
||||
return displayHandle != nullptr;
|
||||
}
|
||||
|
||||
bool start() override { return true; }
|
||||
bool stop() override { tt_crash("Not supported"); }
|
||||
|
||||
bool supportsLvgl() const override { return true; }
|
||||
bool startLvgl() override { return true; }
|
||||
bool startLvgl() override { return displayHandle != nullptr; }
|
||||
bool stopLvgl() override { tt_crash("Not supported"); }
|
||||
lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; }
|
||||
|
||||
std::shared_ptr<tt::hal::touch::TouchDevice> _Nullable getTouchDevice() override { return std::make_shared<SdlTouch>(); }
|
||||
|
||||
lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; }
|
||||
bool supportsDisplayDriver() const override { return false; }
|
||||
std::shared_ptr<tt::hal::display::DisplayDriver> _Nullable getDisplayDriver() override { return nullptr; }
|
||||
};
|
||||
|
||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
||||
|
||||
@ -34,16 +34,16 @@ public:
|
||||
|
||||
/** Set a value in the range [0, 255] */
|
||||
virtual void setGammaCurve(uint8_t index) { /* NO-OP */ }
|
||||
virtual uint8_t getGammaCurveCount() const { return 0; };
|
||||
virtual uint8_t getGammaCurveCount() const { return 0; }
|
||||
|
||||
virtual bool supportsLvgl() const { return false; }
|
||||
virtual bool startLvgl() { return false; }
|
||||
virtual bool stopLvgl() { return false; }
|
||||
virtual bool supportsLvgl() const = 0;
|
||||
virtual bool startLvgl() = 0;
|
||||
virtual bool stopLvgl() = 0;
|
||||
|
||||
virtual lv_display_t* _Nullable getLvglDisplay() const = 0;
|
||||
|
||||
virtual bool supportsDisplayDriver() const { return false; }
|
||||
virtual std::shared_ptr<DisplayDriver> _Nullable getDisplayDriver() { return nullptr; }
|
||||
virtual bool supportsDisplayDriver() const = 0;
|
||||
virtual std::shared_ptr<DisplayDriver> _Nullable getDisplayDriver() = 0;
|
||||
};
|
||||
|
||||
} // namespace tt::hal::display
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user