openMSX
SDLVisibleSurface.hh
Go to the documentation of this file.
1 #ifndef SDLVISIBLESURFACE_HH
2 #define SDLVISIBLESURFACE_HH
3 
4 #include "VisibleSurface.hh"
5 
6 namespace openmsx {
7 
8 class SDLVisibleSurface final : public VisibleSurface
9 {
10 public:
11  SDLVisibleSurface(unsigned width, unsigned height,
12  Display& display,
13  RTScheduler& rtScheduler,
14  EventDistributor& eventDistributor,
15  InputEventGenerator& inputEventGenerator,
16  CliComm& cliComm);
17 
18  static void saveScreenshotSDL(const OutputSurface& output,
19  const std::string& filename);
20 
21 private:
22  // OutputSurface
23  void saveScreenshot(const std::string& filename) override;
24  void clearScreen() override;
25 
26  // VisibleSurface
27  void flushFrameBuffer() override;
28  void finish() override;
29  std::unique_ptr<Layer> createSnowLayer() override;
30  std::unique_ptr<Layer> createConsoleLayer(
31  Reactor& reactor, CommandConsole& console) override;
32  std::unique_ptr<Layer> createOSDGUILayer(OSDGUI& gui) override;
33  std::unique_ptr<OutputSurface> createOffScreenSurface() override;
34 };
35 
36 } // namespace openmsx
37 
38 #endif
Contains the main loop of openMSX.
Definition: Reactor.hh:66
Represents the output window/screen of openMSX.
Definition: Display.hh:31
SDLVisibleSurface(unsigned width, unsigned height, Display &display, RTScheduler &rtScheduler, EventDistributor &eventDistributor, InputEventGenerator &inputEventGenerator, CliComm &cliComm)
A frame buffer where pixels can be written to.
static void saveScreenshotSDL(const OutputSurface &output, const std::string &filename)
constexpr const char *const filename
An OutputSurface which is visible to the user, such as a window or a full screen display.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5