Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image_size.width & height ==0 returns true when should return false - line 69 in Chapter 2 recipe 14 #20

Open
JoeImplode opened this issue Sep 14, 2023 · 0 comments

Comments

@JoeImplode
Copy link

In CreateSwapchainWithR8G8B8A8FormatAndMailboxPresentMode() (Chapter 2 recipe 14) on line 69 there is a conditional statement which checks if our iamge_size's width and height for our swapchain images is == 0, this returns true if so, no doubt this should be return false as is the case with the rest of the conditional statements in this function.

if( (0 == image_size.width) ||
    (0 == image_size.height) ) {
  return true;
}

Change to:

if( (0 == image_size.width) ||
    (0 == image_size.height) ) {
  return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant