Merge pull request #797 from caramelli/master

Fix long options for width and height
This commit is contained in:
Sascha Willems 2021-01-28 19:39:49 +01:00 committed by GitHub
commit ca17431794
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -716,11 +716,11 @@ VulkanExampleBase::VulkanExampleBase(bool enableValidation)
if ((args[i] == std::string("-f")) || (args[i] == std::string("--fullscreen"))) {
settings.fullscreen = true;
}
if ((args[i] == std::string("-w")) || (args[i] == std::string("-width"))) {
if ((args[i] == std::string("-w")) || (args[i] == std::string("--width"))) {
uint32_t w = strtol(args[i + 1], &numConvPtr, 10);
if (numConvPtr != args[i + 1]) { width = w; };
}
if ((args[i] == std::string("-h")) || (args[i] == std::string("-height"))) {
if ((args[i] == std::string("-h")) || (args[i] == std::string("--height"))) {
uint32_t h = strtol(args[i + 1], &numConvPtr, 10);
if (numConvPtr != args[i + 1]) { height = h; };
}