MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Start

Method Start

src/video/null_v.cpp:22–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20static FVideoDriver_Null iFVideoDriver_Null;
21
22std::optional<std::string_view> VideoDriver_Null::Start(const StringList &parm)
23{
24#ifdef _MSC_VER
25 /* Disable the MSVC assertion message box. */
26 _set_error_mode(_OUT_TO_STDERR);
27 _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
28 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
29#endif
30
31 this->UpdateAutoResolution();
32
33 this->ticks = GetDriverParamInt(parm, "ticks", 1000);
34 _screen.width = _screen.pitch = _cur_resolution.width;
35 _screen.height = _cur_resolution.height;
36 _screen.dst_ptr = nullptr;
37 ScreenSizeChanged();
38
39 /* Do not render, nor blit */
40 Debug(misc, 1, "Forcing blitter 'null'...");
41 BlitterFactory::SelectBlitter("null");
42 return std::nullopt;
43}
44
45void VideoDriver_Null::Stop() { }
46

Callers

nothing calls this directly

Calls 3

GetDriverParamIntFunction · 0.85
ScreenSizeChangedFunction · 0.85
UpdateAutoResolutionMethod · 0.80

Tested by

no test coverage detected