MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / init

Method init

src/Window.cpp:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool Window::init(unsigned int width, unsigned int height)
52{
53 if(!Renderer::init(width, height))
54 {
55 LOG(LogError) << "Renderer failed to initialize!";
56 return false;
57 }
58
59 mInputManager->init();
60
61 mResourceManager.reloadAll();
62
63 //keep a reference to the default fonts, so they don't keep getting destroyed/recreated
64 if(mDefaultFonts.empty())
65 {
66 mDefaultFonts.push_back(Font::get(mResourceManager, Font::getDefaultPath(), FONT_SIZE_SMALL));
67 mDefaultFonts.push_back(Font::get(mResourceManager, Font::getDefaultPath(), FONT_SIZE_MEDIUM));
68 mDefaultFonts.push_back(Font::get(mResourceManager, Font::getDefaultPath(), FONT_SIZE_LARGE));
69 }
70
71 return true;
72}
73
74void Window::deinit()
75{

Callers

nothing calls this directly

Calls 4

reloadAllMethod · 0.80
push_backMethod · 0.80
initFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected