SDLVisibleSurfaceBase.hh 749 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef SDLVISIBLESURFACEBASE_HH
  2. #define SDLVISIBLESURFACEBASE_HH
  3. #include "SDLOutputSurface.hh"
  4. #include "VisibleSurface.hh"
  5. #include "SDLSurfacePtr.hh"
  6. namespace openmsx {
  7. /** Common functionality for the plain SDL and SDLGL VisibleSurface classes.
  8. */
  9. class SDLVisibleSurfaceBase : public SDLOutputSurface, public VisibleSurface
  10. {
  11. public:
  12. void updateWindowTitle() override;
  13. bool setFullScreen(bool fullscreen) override;
  14. ~SDLVisibleSurfaceBase() override;
  15. protected:
  16. using VisibleSurface::VisibleSurface;
  17. void createSurface(int width, int height, unsigned flags);
  18. SDLSubSystemInitializer<SDL_INIT_VIDEO> videoSubSystem;
  19. SDLWindowPtr window;
  20. private:
  21. static int windowPosX;
  22. static int windowPosY;
  23. };
  24. } // namespace openmsx
  25. #endif