mirror of
https://github.com/labwc/labwc.git
synced 2026-03-29 07:58:10 -04:00
rcxml: avoid crash when checking environment for WLR_DRM_NO_ATOMIC
This commit is contained in:
parent
78418b6dd3
commit
417fa21a8e
1 changed files with 6 additions and 3 deletions
|
|
@ -742,9 +742,12 @@ entry(xmlNode *node, char *nodename, char *content)
|
||||||
set_adaptive_sync_mode(content, &rc.adaptive_sync);
|
set_adaptive_sync_mode(content, &rc.adaptive_sync);
|
||||||
} else if (!strcasecmp(nodename, "allowTearing.core")) {
|
} else if (!strcasecmp(nodename, "allowTearing.core")) {
|
||||||
set_bool(content, &rc.allow_tearing);
|
set_bool(content, &rc.allow_tearing);
|
||||||
if (rc.allow_tearing && strcmp(getenv("WLR_DRM_NO_ATOMIC"), "1")) {
|
if (rc.allow_tearing) {
|
||||||
rc.allow_tearing = false;
|
char *no_atomic_env = getenv("WLR_DRM_NO_ATOMIC");
|
||||||
wlr_log(WLR_INFO, "WLR_DRM_NO_ATOMIC is not 1, tearing disabled");
|
if (!no_atomic_env || strcmp(no_atomic_env, "1") != 0) {
|
||||||
|
rc.allow_tearing = false;
|
||||||
|
wlr_log(WLR_ERROR, "tearing requires WLR_DRM_NO_ATOMIC=1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(nodename, "reuseOutputMode.core")) {
|
} else if (!strcasecmp(nodename, "reuseOutputMode.core")) {
|
||||||
set_bool(content, &rc.reuse_output_mode);
|
set_bool(content, &rc.reuse_output_mode);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue