mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
render/egl: make config attribs const
wlr_egl_init is not allowed to mutate these attribs.
This commit is contained in:
parent
507d9bc19e
commit
6787ff521b
2 changed files with 4 additions and 4 deletions
|
@ -69,7 +69,7 @@ struct wlr_egl {
|
||||||
* Will attempt to load all possibly required api functions.
|
* Will attempt to load all possibly required api functions.
|
||||||
*/
|
*/
|
||||||
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
|
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
|
||||||
EGLint *config_attribs, EGLint visual_id);
|
const EGLint *config_attribs, EGLint visual_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frees all related EGL resources, makes the context not-current and
|
* Frees all related EGL resources, makes the context not-current and
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <wlr/util/region.h>
|
#include <wlr/util/region.h>
|
||||||
|
|
||||||
static bool egl_get_config(EGLDisplay disp, EGLint *attribs, EGLConfig *out,
|
static bool egl_get_config(EGLDisplay disp, const EGLint *attribs,
|
||||||
EGLint visual_id) {
|
EGLConfig *out, EGLint visual_id) {
|
||||||
EGLint count = 0, matched = 0, ret;
|
EGLint count = 0, matched = 0, ret;
|
||||||
|
|
||||||
ret = eglGetConfigs(disp, NULL, 0, &count);
|
ret = eglGetConfigs(disp, NULL, 0, &count);
|
||||||
|
@ -132,7 +132,7 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
|
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
|
||||||
EGLint *config_attribs, EGLint visual_id) {
|
const EGLint *config_attribs, EGLint visual_id) {
|
||||||
// Check for EGL_EXT_platform_base before creating a display, because we
|
// Check for EGL_EXT_platform_base before creating a display, because we
|
||||||
// actually use this extension to create displays. Check for EGL_KHR_debug
|
// actually use this extension to create displays. Check for EGL_KHR_debug
|
||||||
// before creating display to get EGL logs as soon as possible.
|
// before creating display to get EGL logs as soon as possible.
|
||||||
|
|
Loading…
Reference in a new issue