Merge pull request #87288 from akien-mga/3.x-uwp-fix-get_unique_id-build

[3.x] UWP: Fix VS 2017 build with new `get_unique_id` method
This commit is contained in:
Rémi Verschelde 2024-01-17 13:47:32 +01:00
commit b0eb2b4e59
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -712,7 +712,7 @@ void OS_UWP::set_icon(const Ref<Image> &p_icon) {
String OS_UWP::get_unique_id() const { String OS_UWP::get_unique_id() const {
// Get the hardware token and read it into an array of bytes. // Get the hardware token and read it into an array of bytes.
HardwareToken ^ token = HardwareIdentification::GetPackageSpecificToken(nullptr); HardwareToken ^ token = HardwareIdentification::GetPackageSpecificToken(nullptr);
IBuffer hwId = token->Id; IBuffer ^ hwId = token->Id;
DataReader ^ dr = DataReader::FromBuffer(hwId); DataReader ^ dr = DataReader::FromBuffer(hwId);
uint8_t *data = new uint8_t[hwId->Length]; uint8_t *data = new uint8_t[hwId->Length];
dr->ReadBytes(Platform::ArrayReference<uint8_t>(data, hwId->Length)); dr->ReadBytes(Platform::ArrayReference<uint8_t>(data, hwId->Length));