diff options
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/PlatCocoa.h | 1 | ||||
-rw-r--r-- | cocoa/PlatCocoa.mm | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h index 0117fcc15..18d339536 100644 --- a/cocoa/PlatCocoa.h +++ b/cocoa/PlatCocoa.h @@ -79,6 +79,7 @@ public: CGContextRef GetContext() { return gc; } void Release() noexcept override; + int Supports(int feature) noexcept override; bool Initialised() override; void PenColour(ColourDesired fore) override; diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 2f8778d11..33c24397f 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -319,6 +319,10 @@ void GetPositions(CTLineRef line, std::vector<CGFloat> &positions) { positions.begin(), std::plus<CGFloat>()); } +const int SupportsCocoa[] = { + SC_SUPPORTS_LINE_DRAWS_FINAL, +}; + } //----------------- SurfaceImpl -------------------------------------------------------------------- @@ -452,6 +456,16 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID //-------------------------------------------------------------------------------------------------- +int SurfaceImpl::Supports(int feature) noexcept { + for (const int f : SupportsCocoa) { + if (f == feature) + return 1; + } + return 0; +} + +//-------------------------------------------------------------------------------------------------- + void SurfaceImpl::PenColour(ColourDesired fore) { if (gc) { ColourDesired colour(fore.AsInteger()); |