Add FirmwareVersion 8.1.0 support

This commit is contained in:
Michael Scire 2019-06-18 23:49:09 -07:00
parent 777984476e
commit 281534d9f8
2 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
enum FirmwareVersion : u32 { enum FirmwareVersion : u32 {
@ -40,6 +40,7 @@ enum AtmosphereTargetFirmware : u32 {
AtmosphereTargetFirmware_620 = 7, AtmosphereTargetFirmware_620 = 7,
AtmosphereTargetFirmware_700 = 8, AtmosphereTargetFirmware_700 = 8,
AtmosphereTargetFirmware_800 = 9, AtmosphereTargetFirmware_800 = 9,
AtmosphereTargetFirmware_810 = 10,
}; };
FirmwareVersion GetRuntimeFirmwareVersion(); FirmwareVersion GetRuntimeFirmwareVersion();

View File

@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <mutex> #include <mutex>
#include <switch.h> #include <switch.h>
#include <stratosphere.hpp> #include <stratosphere.hpp>
@ -42,10 +42,10 @@ static void _CacheValues(void)
if (R_FAILED(svcCallSecureMonitor(&args)) || args.X[0] != 0) { if (R_FAILED(svcCallSecureMonitor(&args)) || args.X[0] != 0) {
std::abort(); std::abort();
} }
target_fw = (args.X[1] >> 0x08) & 0xFF; target_fw = (args.X[1] >> 0x08) & 0xFF;
} }
switch (static_cast<AtmosphereTargetFirmware>(target_fw)) { switch (static_cast<AtmosphereTargetFirmware>(target_fw)) {
case AtmosphereTargetFirmware_100: case AtmosphereTargetFirmware_100:
g_firmware_version = FirmwareVersion_100; g_firmware_version = FirmwareVersion_100;
@ -70,6 +70,7 @@ static void _CacheValues(void)
g_firmware_version = FirmwareVersion_700; g_firmware_version = FirmwareVersion_700;
break; break;
case AtmosphereTargetFirmware_800: case AtmosphereTargetFirmware_800:
case AtmosphereTargetFirmware_810:
g_firmware_version = FirmwareVersion_800; g_firmware_version = FirmwareVersion_800;
break; break;
default: default: