Read android config values [skip ci]
This commit is contained in:
parent
219da74df4
commit
9edc993bf9
4 changed files with 18 additions and 9 deletions
|
|
@ -119,6 +119,8 @@ PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults;
|
|||
PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR;
|
||||
PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR;
|
||||
|
||||
int32_t vks::android::screenDensity;
|
||||
|
||||
void *libVulkan;
|
||||
|
||||
namespace vks
|
||||
|
|
@ -282,13 +284,13 @@ namespace vks
|
|||
dlclose(libVulkan);
|
||||
}
|
||||
|
||||
int32_t getScreenDensity()
|
||||
void getDeviceConfig()
|
||||
{
|
||||
// Screen density
|
||||
AConfiguration* config = AConfiguration_new();
|
||||
AConfiguration_fromAssetManager(config, androidApp->activity->assetManager);
|
||||
int32_t density = AConfiguration_getDensity(config);
|
||||
vks::android::screenDensity = AConfiguration_getDensity(config);
|
||||
AConfiguration_delete(config);
|
||||
return density;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue