mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-23 04:12:02 +00:00
fatal: fix abort in viSetDisplayPowerState on < 3.0.0
This commit is contained in:
parent
4d72c2b37a
commit
215f1bc8ee
1 changed files with 7 additions and 1 deletions
|
@ -101,7 +101,13 @@ namespace sts::fatal::srv {
|
||||||
ON_SCOPE_EXIT { viCloseDisplay(&temp_display); };
|
ON_SCOPE_EXIT { viCloseDisplay(&temp_display); };
|
||||||
|
|
||||||
/* Turn on the screen. */
|
/* Turn on the screen. */
|
||||||
|
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_300) {
|
||||||
R_TRY(viSetDisplayPowerState(&temp_display, ViPowerState_On));
|
R_TRY(viSetDisplayPowerState(&temp_display, ViPowerState_On));
|
||||||
|
} else {
|
||||||
|
/* Prior to 3.0.0, the ViPowerState enum was different (0 = Off, 1 = On). */
|
||||||
|
/* In lieu of a ViPowerState_OnDeprecated entry, just send the correct value manually. */
|
||||||
|
R_TRY(viSetDisplayPowerState(&temp_display, static_cast<ViPowerState>(1)));
|
||||||
|
}
|
||||||
|
|
||||||
/* Set alpha to 1.0f. */
|
/* Set alpha to 1.0f. */
|
||||||
R_TRY(viSetDisplayAlpha(&temp_display, 1.0f));
|
R_TRY(viSetDisplayAlpha(&temp_display, 1.0f));
|
||||||
|
|
Loading…
Reference in a new issue