MCPcopy Create free account
hub / github.com/dborth/vbagx / SystemInit

Function SystemInit

source/system.cpp:141–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139#endif
140
141void SystemInit() {
142 #ifdef HW_RVL
143 L2Enhance();
144
145 u32 ios = IOS_GetVersion();
146
147 if(!SupportedIOS(ios))
148 {
149 s32 preferred = IOS_GetPreferredVersion();
150
151 if(SupportedIOS(preferred))
152 IOS_ReloadIOS(preferred);
153 }
154 #else
155 ipl_set_config(6); // disable Qoob modchip
156 #endif
157
158 USBGeckoOutput();
159 __exception_setreload(8);
160
161 InitializeVideo(); // Initialize video
162 InitialiseSound();
163
164 #ifdef HW_RVL
165 // Wii Power/Reset buttons
166 __STM_Close();
167 __STM_Init();
168 __STM_Close();
169 __STM_Init();
170 SYS_SetPowerCallback(ShutdownCB);
171 SYS_SetResetCallback(ResetCB);
172
173 WiiDRC_Init();
174 isWiiVC = WiiDRC_Inited();
175 WPAD_Init();
176 WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownCB);
177 DI_Init();
178 USBStorage_Initialize();
179 #else
180 DVD_Init (); // Initialize DVD subsystem (GameCube only)
181 #endif
182
183 SetupPads();
184 InitDeviceThread();
185 MountAllFAT(); // Initialize libFAT for SD and USB
186
187 #ifdef HW_RVL
188 InitMem2Manager();
189 #endif
190
191 InitFreeType((u8*)font_ttf, font_ttf_size); // Initialize font system
192}
193
194static void ExitCleanup()
195{

Callers 1

mainFunction · 0.85

Calls 12

SupportedIOSFunction · 0.85
ipl_set_configFunction · 0.85
USBGeckoOutputFunction · 0.85
InitializeVideoFunction · 0.85
InitialiseSoundFunction · 0.85
WiiDRC_InitFunction · 0.85
WiiDRC_InitedFunction · 0.85
SetupPadsFunction · 0.85
InitDeviceThreadFunction · 0.85
MountAllFATFunction · 0.85
InitMem2ManagerFunction · 0.85
InitFreeTypeFunction · 0.85

Tested by

no test coverage detected