Move swapchain size into a const
This commit is contained in:
parent
5193756e4d
commit
7670bfb9ff
1 changed files with 4 additions and 1 deletions
|
|
@ -19,10 +19,13 @@ use std::{
|
||||||
|
|
||||||
use super::{AppData, Buffer, Capture, CaptureImage, Event};
|
use super::{AppData, Buffer, Capture, CaptureImage, Event};
|
||||||
|
|
||||||
|
// Number of buffers to swap between
|
||||||
|
const BUFFER_COUNT: usize = 2;
|
||||||
|
|
||||||
pub struct ScreencopySession {
|
pub struct ScreencopySession {
|
||||||
formats: Option<Formats>,
|
formats: Option<Formats>,
|
||||||
// swapchain buffers
|
// swapchain buffers
|
||||||
buffers: Option<[Buffer; 2]>,
|
buffers: Option<[Buffer; BUFFER_COUNT]>,
|
||||||
session: CaptureSession,
|
session: CaptureSession,
|
||||||
// Future signaled when buffer is signaled.
|
// Future signaled when buffer is signaled.
|
||||||
// if triple buffer is used, will need more than one.
|
// if triple buffer is used, will need more than one.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue