31 #if COMPONENT_LASERDISC
40 , display(reactor.getDisplay())
41 , renderSettings(reactor.getDisplay().getRenderSettings())
45 consoleLayer = screen->createConsoleLayer(reactor, console);
46 snowLayer = screen->createSnowLayer(display);
47 osdGuiLayer = screen->createOSDGUILayer(display.
getOSDGUI());
58 HWND hWnd = getSDLWindowHandle();
60 AltSpaceSuppressor::Start(hWnd);
68 assert(getSDLWindowHandle());
69 AltSpaceSuppressor::Stop();
84 std::string videoSource = (vdp.
getName() ==
"VDP")
92 switch (screen->getSDLFormat().BytesPerPixel) {
95 return make_unique<SDLRasterizer<word>>(
96 vdp, display, *screen,
97 make_unique<FBPostProcessor<word>>(
98 motherBoard, display, *screen,
99 videoSource, 640, 240,
true));
103 return make_unique<SDLRasterizer<unsigned>>(
104 vdp, display, *screen,
105 make_unique<FBPostProcessor<unsigned>>(
106 motherBoard, display, *screen,
107 videoSource, 640, 240,
true));
114 return make_unique<SDLRasterizer<unsigned>>(
115 vdp, display, *screen,
116 make_unique<GLPostProcessor>(
117 motherBoard, display, *screen,
118 videoSource, 640, 240,
true));
128 std::string videoSource = (vdp.
getName() ==
"Sunrise GFX9000")
136 switch (screen->getSDLFormat().BytesPerPixel) {
139 return make_unique<V9990SDLRasterizer<word>>(
140 vdp, display, *screen,
141 make_unique<FBPostProcessor<word>>(
142 motherBoard, display, *screen,
143 videoSource, 1280, 240,
true));
147 return make_unique<V9990SDLRasterizer<unsigned>>(
148 vdp, display, *screen,
149 make_unique<FBPostProcessor<unsigned>>(
150 motherBoard, display, *screen,
151 videoSource, 1280, 240,
true));
158 return make_unique<V9990SDLRasterizer<unsigned>>(
159 vdp, display, *screen,
160 make_unique<GLPostProcessor>(
161 motherBoard, display, *screen,
162 videoSource, 1280, 240,
true));
169 #if COMPONENT_LASERDISC
173 std::string videoSource =
"Laserdisc";
179 switch (screen->getSDLFormat().BytesPerPixel) {
182 return make_unique<LDSDLRasterizer<word>>(
184 make_unique<FBPostProcessor<word>>(
185 motherBoard, display, *screen,
186 videoSource, 640, 480,
false));
190 return make_unique<LDSDLRasterizer<unsigned>>(
192 make_unique<FBPostProcessor<unsigned>>(
193 motherBoard, display, *screen,
194 videoSource, 640, 480,
false));
201 return make_unique<LDSDLRasterizer<unsigned>>(
203 make_unique<GLPostProcessor>(
204 motherBoard, display, *screen,
205 videoSource, 640, 480,
false));
213 void SDLVideoSystem::getWindowSize(
unsigned& width,
unsigned& height)
221 if (factor > 3) factor = 3;
232 width = 320 * factor;
233 height = 240 * factor;
241 unsigned width, height;
242 getWindowSize(width, height);
243 if (width != screen->getWidth() || height != screen->getHeight()) {
249 return screen->setFullScreen(fullScreenTarget);
261 screen->saveScreenshot(filename);
267 std::unique_ptr<OutputSurface> surf = screen->createOffScreenSurface();
269 surf->saveScreenshot(filename);
275 screen->setWindowTitle(title);
283 void SDLVideoSystem::resize()
288 unsigned width, height;
289 getWindowSize(width, height);
296 screen = make_unique<SDLVisibleSurface>(
297 width, height, fullscreen, renderSettings,
298 eventDistributor, inputEventGenerator);
302 screen = make_unique<SDLGLVisibleSurface>(
303 width, height, fullscreen, renderSettings,
304 eventDistributor, inputEventGenerator);
307 screen = make_unique<SDLGLVisibleSurface>(
308 width, height, fullscreen, renderSettings,
309 eventDistributor, inputEventGenerator,
313 screen = make_unique<SDLGLVisibleSurface>(
314 width, height, fullscreen, renderSettings,
315 eventDistributor, inputEventGenerator,
322 inputEventGenerator.
reinit();
325 void SDLVideoSystem::update(
const Setting& subject)
336 int SDLVideoSystem::signalEvent(
const std::shared_ptr<const Event>& )