aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/nvflinger/buffer_queue.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-02-10 01:14:40 -0500
committerGitHub <noreply@github.com>2018-02-10 01:14:40 -0500
commite3180c827539b11b7b4cdac1fa10186c1ec8ac54 (patch)
tree6eab1f6c8f726fca18468ad883a2ca3c010898d0 /src/core/hle/service/nvflinger/buffer_queue.cpp
parent0571220d0f616d3fbbfa380951eacb2a4aff110b (diff)
parente552a191a47081c9d4b194bbda39650b2db8da3d (diff)
Merge pull request #175 from bunnei/libnx-fixes-2
More fixes for Libnx
Diffstat (limited to 'src/core/hle/service/nvflinger/buffer_queue.cpp')
-rw-r--r--src/core/hle/service/nvflinger/buffer_queue.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/service/nvflinger/buffer_queue.cpp b/src/core/hle/service/nvflinger/buffer_queue.cpp
index c7206a6831..f90c7ca518 100644
--- a/src/core/hle/service/nvflinger/buffer_queue.cpp
+++ b/src/core/hle/service/nvflinger/buffer_queue.cpp
@@ -40,7 +40,11 @@ u32 BufferQueue::DequeueBuffer(u32 pixel_format, u32 width, u32 height) {
return igbp_buffer.format == pixel_format && igbp_buffer.width == width &&
igbp_buffer.height == height;
});
- ASSERT(itr != queue.end());
+ if (itr == queue.end()) {
+ LOG_CRITICAL(Service_NVDRV, "no free buffers for pixel_format=%d, width=%d, height=%d",
+ pixel_format, width, height);
+ itr = queue.begin();
+ }
itr->status = Buffer::Status::Dequeued;
return itr->slot;