forked from enlightenment/enlightenment
check for matching '/' in screen edid before fuzzy matching in randr init
if no / exists then this function is pointless
This commit is contained in:
parent
6dd9205e0a
commit
75a12a9461
|
@ -739,9 +739,11 @@ _screen_fuzzy_fallback_find(E_Config_Randr2 *cfg, const char *id)
|
||||||
// strip out everythng in the string from / on as that is edid
|
// strip out everythng in the string from / on as that is edid
|
||||||
// and fall back to finding just the output name in the rel
|
// and fall back to finding just the output name in the rel
|
||||||
// to identifier, rather than the specific screen id
|
// to identifier, rather than the specific screen id
|
||||||
name = alloca(strlen(id) + 1);
|
p = strchr(id, '/');
|
||||||
strcpy(name, id);
|
if (!p) return NULL;
|
||||||
if ((p = strchr(name, '/'))) *p = 0;
|
name = alloca((p - id) + 1);
|
||||||
|
strncpy(name, id, p - id);
|
||||||
|
name[p - id] = 0;
|
||||||
|
|
||||||
s = _screen_id_find(id);
|
s = _screen_id_find(id);
|
||||||
if (!s) s = _screen_output_find(name);
|
if (!s) s = _screen_output_find(name);
|
||||||
|
|
Loading…
Reference in New Issue