mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2025-02-26 23:54:17 +01:00
backup
This commit is contained in:
parent
c073f6607c
commit
34cf9df0df
@ -156,19 +156,22 @@ VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateInstance(
|
|||||||
|
|
||||||
char* str = malloc(4096);
|
char* str = malloc(4096);
|
||||||
int n = fread(str, 1, 4096, f);
|
int n = fread(str, 1, 4096, f);
|
||||||
|
fclose(f);
|
||||||
str[n] = '\0';
|
str[n] = '\0';
|
||||||
|
|
||||||
str = strstr(str, "Hardware");
|
char* hw = strstr(str, "Hardware");
|
||||||
str = strstr(str, "BCM");
|
hw = strstr(hw, "BCM");
|
||||||
|
|
||||||
str[7] = '\0';
|
hw[7] = '\0';
|
||||||
|
|
||||||
if(strcmp(str, "BCM2835") &&
|
if(strcmp(hw, "BCM2835") &&
|
||||||
strcmp(str, "BCM2836") &&
|
strcmp(hw, "BCM2836") &&
|
||||||
strcmp(str, "BCM2837"))
|
strcmp(hw, "BCM2837"))
|
||||||
{
|
{
|
||||||
return VK_ERROR_INITIALIZATION_FAILED;
|
return VK_ERROR_INITIALIZATION_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user