22 #ifndef BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H 23 #define BACKENDS_GRAPHICS_SDL_SDLGRAPHICS_H 25 #include "backends/graphics/windowed.h" 26 #include "backends/platform/sdl/sdl-window.h" 28 #include "common/events.h" 29 #include "common/rect.h" 96 virtual bool showMouse(
bool visible)
override;
97 bool lockMouse(
bool lock)
override;
99 virtual bool saveScreenshot(
const Common::Path &filename)
const {
return false; }
100 void saveScreenshot()
override;
110 int screenWidth, screenHeight;
141 enum CustomEventAction {
142 kActionToggleFullscreen = 100,
143 kActionToggleMouseCapture,
144 kActionSaveScreenshot,
145 kActionToggleAspectRatioCorrection,
146 kActionToggleFilteredScaling,
147 kActionCycleStretchMode,
148 kActionIncreaseScaleFactor,
149 kActionDecreaseScaleFactor,
150 kActionNextScaleFilter,
151 kActionPreviousScaleFilter
157 bool defaultGraphicsModeConfig()
const;
164 #if SDL_VERSION_ATLEAST(2, 0, 0) 166 SDL_GL_GetDrawableSize(_window->getSDLWindow(), width, height);
171 *width = _hwScreen->w;
175 *height = _hwScreen->h;
180 virtual void showSystemMouseCursor(
bool visible);
188 #if SDL_VERSION_ATLEAST(2, 0, 0) 190 void unlockWindowSize() {
191 _allowWindowSizeReset =
true;
198 bool _allowWindowSizeReset;
199 int _hintedWidth, _hintedHeight;
201 bool createOrUpdateWindow(
const int width,
const int height,
const Uint32 flags);
204 SDL_Surface *_hwScreen;
209 void toggleFullScreen();
211 #if defined(USE_IMGUI) && SDL_VERSION_ATLEAST(2, 0, 0) 213 void setImGuiCallbacks(
const ImGuiCallbacks &callbacks)
override;
216 ImGuiCallbacks _imGuiCallbacks;
217 bool _imGuiReady =
false;
218 bool _imGuiInited =
false;
219 SDL_Renderer *_imGuiSDLRenderer =
nullptr;
221 void initImGui(SDL_Renderer *renderer,
void *glContext);
virtual void activateManager()
virtual bool notifyMousePosition(Common::Point &mouse)
void setSystemMousePosition(const int x, const int y) override
Definition: sdl-events.h:40
Common::Rect getPreferredFullscreenResolution()
bool notifyEvent(const Common::Event &event) override
Definition: sdl-graphics.h:38
virtual void deactivateManager()
SdlWindow * getWindow() const
Definition: sdl-graphics.h:134
virtual void notifyVideoExpose()=0
void getWindowSizeFromSdl(int *width, int *height) const
Definition: sdl-graphics.h:163
void handleResizeImpl(const int width, const int height) override
Definition: windowed.h:52
Definition: sdl-graphics.h:109
bool setState(const State &state)
RotationMode
Definition: rotationmode.h:44
void notifyActiveAreaChanged() override
Definition: sdl-window.h:30
virtual void notifyResize(const int width, const int height)
Definition: sdl-graphics.h:77