aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Bzdek <joey@lunarg.com>2017-06-14 10:33:36 -0600
committerjoey-lunarg <joey@lunarg.com>2017-07-14 14:15:00 -0600
commit33bc5c8c021cd5f337554d33d5ce85a0e6b364b3 (patch)
tree3955369556093988aea4e5ea83ec57deeb02caef
parent15eb070fdbfc376e872555ba170429fc5aacebda (diff)
downloadusermoji-33bc5c8c021cd5f337554d33d5ce85a0e6b364b3.tar.xz
demos: Clang-format Wayland and cube.cpp refactor
Change-Id: I73dac6489e41a94fc53a1c7942888a3a6479a805
-rw-r--r--demos/cube.c3
-rw-r--r--demos/cube.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 0fd29f91..2a949ea2 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -2781,8 +2781,7 @@ static void demo_run(struct demo *demo) {
while (!demo->quit) {
if (demo->pause) {
wl_display_dispatch(demo->display); // block and wait for input
- }
- else {
+ } else {
wl_display_dispatch_pending(demo->display); // don't block
demo_draw(demo);
demo->curFrame++;
diff --git a/demos/cube.cpp b/demos/cube.cpp
index 87a01d99..41011b26 100644
--- a/demos/cube.cpp
+++ b/demos/cube.cpp
@@ -324,7 +324,7 @@ struct Demo {
uint32_t swapchainImageCount;
vk::SwapchainKHR swapchain;
- std::unique_ptr<SwapchainBuffers[]> buffers;
+ std::unique_ptr<SwapchainImageResources[]> swapchain_image_resources;
vk::PresentModeKHR presentMode;
vk::Fence fences[FRAME_LAG];
uint32_t frame_index;
@@ -410,7 +410,7 @@ static void pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32
static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button,
uint32_t state) {
- Demo *demo = (Demo *)data;
+ Demo *demo = (Demo *)data;
if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) {
wl_shell_surface_move(demo->shell_surface, demo->seat, serial);
}