mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
- Create `Include/` folder for all main projects - Fix some issues here and there (found while moving things) - All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
25 lines
594 B
C++
25 lines
594 B
C++
#pragma once
|
|
|
|
#include "SdlTouch.h"
|
|
#include <Tactility/hal/Display.h>
|
|
|
|
extern lv_disp_t* displayHandle;
|
|
|
|
class SdlDisplay : public tt::hal::Display {
|
|
public:
|
|
bool start() override {
|
|
return displayHandle != nullptr;
|
|
}
|
|
|
|
bool stop() override { tt_crash("Not supported"); }
|
|
|
|
tt::hal::Touch* _Nullable createTouch() override { return dynamic_cast<tt::hal::Touch*>(new SdlTouch()); }
|
|
|
|
lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; }
|
|
};
|
|
|
|
tt::hal::Display* createDisplay() {
|
|
return static_cast<tt::hal::Display*>(new SdlDisplay());
|
|
}
|
|
|