22 #ifndef PLATFORM_SDL_H 23 #define PLATFORM_SDL_H 25 #include "backends/platform/sdl/sdl-sys.h" 27 #include "backends/modular-backend.h" 28 #include "backends/mixer/sdl/sdl-mixer.h" 29 #include "backends/events/sdl/sdl-events.h" 30 #include "backends/log/log.h" 31 #include "backends/platform/sdl/sdl-window.h" 33 #include "common/array.h" 36 #define USE_MULTIPLE_RENDERERS 40 class DiscordPresence;
76 #if SDL_VERSION_ATLEAST(2, 0, 0) 85 #if SDL_VERSION_ATLEAST(2, 0, 14) 92 uint32
getMillis(
bool skipRecord =
false)
override;
105 #if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) 107 OpenGL::ContextType
getOpenGLType()
const override {
return _oglType; }
109 #if defined(USE_OPENGL) && defined(USE_GLAD) 110 void *getOpenGLProcAddress(
const char *name)
const override;
121 DiscordPresence *_presence;
147 #if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) 149 void detectOpenGLFeaturesSupport();
150 void detectAntiAliasingSupport();
152 OpenGL::ContextType _oglType;
153 bool _supportsFrameBuffer;
154 bool _supportsShaders;
172 #ifdef USE_MULTIPLE_RENDERERS 173 enum GraphicsManagerType {
174 GraphicsManagerSurfaceSDL,
176 GraphicsManagerOpenGL,
182 GraphicsModeArray _graphicsModes;
185 int _firstMode[GraphicsManagerCount];
186 int _lastMode[GraphicsManagerCount];
187 int _defaultMode[GraphicsManagerCount];
192 void setupGraphicsModes();
197 void clearGraphicsModes();
199 virtual GraphicsManagerType getDefaultGraphicsManager()
const;
207 virtual uint32 getOSDoubleClickTime()
const {
return 0; }
bool setGraphicsMode(int mode, uint flags=kGfxModeNoFlags) override
Definition: modular-backend.h:149
void initBackend() override
void getTimeAndDate(TimeDate &td, bool skipRecord=false) const override
Definition: modular-backend.h:48
virtual void messageBox(LogMessageType::Type type, const char *message)
Definition: system.h:1904
SdlWindow * _window
Definition: sdl.h:143
void setFeatureState(Feature f, bool enable) override
bool getFeatureState(Feature f) override
Definition: sdl-events.h:40
Definition: sdl-graphics.h:38
virtual Common::Array< uint > getSupportedAntiAliasingLevels() const
Definition: system.h:876
void addSysArchivesToSearchSet(Common::SearchSet &s, int priority=0) override
void engineDone() override
Common::SaveFileManager * getSavefileManager() override
Feature
Definition: system.h:403
Common::Path _logFilePath
Definition: sdl.h:132
uint32 getMillis(bool skipRecord=false) override
uint32 getDoubleClickTime() const override
void delayMillis(uint msecs) override
virtual const char *const * buildHelpDialogData() override
const GraphicsMode * getSupportedGraphicsModes() const override
void fatalError() override
int getDefaultGraphicsMode() const override
Definition: sdl-graphics.h:109
int getGraphicsMode() const override
virtual bool openUrl(const Common::String &url)
Definition: system.h:1978
virtual bool hasTextInClipboard()
Definition: system.h:1942
virtual bool setTextInClipboard(const Common::U32String &text)
Definition: system.h:1964
virtual OpenGL::ContextType getOpenGLType() const
Definition: system.h:890
Definition: archive.h:312
Common::KeymapArray getGlobalKeymaps() override
Common::MutexInternal * createMutex() override
void setWindowCaption(const Common::U32String &caption) override
Common::TimerManager * getTimerManager() override
SdlEventSource * _eventSource
Definition: sdl.h:137
void logMessage(LogMessageType::Type type, const char *message) override
void engineInit() override
Definition: savefile.h:142
virtual Common::U32String getTextFromClipboard()
Definition: system.h:1953
bool hasFeature(Feature f) override
Definition: sdl-window.h:30
virtual AudioCDManager * createAudioCDManager()
Common::HardwareInputSet * getHardwareInputSet() override
Common::String getSystemLanguage() const override