diff options
Diffstat (limited to 'kmscube')
| -rw-r--r-- | kmscube/cube-egl.cpp | 6 | ||||
| -rw-r--r-- | kmscube/cube-gbm.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/kmscube/cube-egl.cpp b/kmscube/cube-egl.cpp index 3ff6ea9..8184a7d 100644 --- a/kmscube/cube-egl.cpp +++ b/kmscube/cube-egl.cpp @@ -84,16 +84,16 @@ EglState::EglState(void* native_display, EGLint native_visual_id) // elgChooseConfig does implement matching by EGL_NATIVE_VISUAL_ID, do a manual // loop. Picks the first returned if native_visual_id is not set. - for (const auto& config : configs) { + for (const auto& cfg : configs) { EGLint id; - b = eglGetConfigAttrib(m_display, config, EGL_NATIVE_VISUAL_ID, &id); + b = eglGetConfigAttrib(m_display, cfg, EGL_NATIVE_VISUAL_ID, &id); if (!b) { printf("failed to get native visual id\n"); continue; } if (id == native_visual_id || !native_visual_id) { - m_config = config; + m_config = cfg; break; } } diff --git a/kmscube/cube-gbm.cpp b/kmscube/cube-gbm.cpp index 5b0715a..f18ae60 100644 --- a/kmscube/cube-gbm.cpp +++ b/kmscube/cube-gbm.cpp @@ -129,8 +129,8 @@ public: if (fb) return fb; - uint32_t width = gbm_bo_get_width(bo); - uint32_t height = gbm_bo_get_height(bo); + uint32_t bo_width = gbm_bo_get_width(bo); + uint32_t bo_height = gbm_bo_get_height(bo); uint32_t stride = gbm_bo_get_stride(bo); uint32_t handle = gbm_bo_get_handle(bo).u32; PixelFormat format = fourcc_to_pixel_format(gbm_bo_get_format(bo)); @@ -139,7 +139,7 @@ public: vector<uint32_t> strides{ stride }; vector<uint32_t> offsets{ 0 }; - fb = new ExtFramebuffer(card, width, height, format, handles, strides, offsets); + fb = new ExtFramebuffer(card, bo_width, bo_height, format, handles, strides, offsets); gbm_bo_set_user_data(bo, fb, drm_fb_destroy_callback); |
