mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-18 03:31:31 +12:00
Use numeric_limits
rather than ~0ULL
This commit is contained in:
parent
af4163de19
commit
c49fd71722
1 changed files with 5 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
#include "SDL_vulkan.h"
|
#include "SDL_vulkan.h"
|
||||||
#include "helpers.hpp"
|
#include "helpers.hpp"
|
||||||
|
@ -30,12 +31,13 @@ void RendererVK::reset() {}
|
||||||
|
|
||||||
void RendererVK::display() {
|
void RendererVK::display() {
|
||||||
// Block, on the CPU, to ensure that this swapchain-frame is ready for more work
|
// Block, on the CPU, to ensure that this swapchain-frame is ready for more work
|
||||||
if (auto waitResult = device->waitForFences({frameFinishedFences[currentFrame].get()}, true, ~0ULL); waitResult != vk::Result::eSuccess) {
|
if (auto waitResult = device->waitForFences({frameFinishedFences[currentFrame].get()}, true, std::numeric_limits<u64>::max()); waitResult != vk::Result::eSuccess) {
|
||||||
Helpers::panic("Error waiting on swapchain fence: %s\n", vk::to_string(waitResult).c_str());
|
Helpers::panic("Error waiting on swapchain fence: %s\n", vk::to_string(waitResult).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 swapchainImageIndex = ~0u;
|
u32 swapchainImageIndex = std::numeric_limits<u32>::max();
|
||||||
if (const auto acquireResult = device->acquireNextImageKHR(swapchain.get(), ~0ULL, swapImageFreeSemaphore[currentFrame].get(), {});
|
if (const auto acquireResult =
|
||||||
|
device->acquireNextImageKHR(swapchain.get(), std::numeric_limits<u64>::max(), swapImageFreeSemaphore[currentFrame].get(), {});
|
||||||
acquireResult.result == vk::Result::eSuccess) {
|
acquireResult.result == vk::Result::eSuccess) {
|
||||||
swapchainImageIndex = acquireResult.value;
|
swapchainImageIndex = acquireResult.value;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue