350 |
|
} |
351 |
|
|
352 |
|
// Get fbdevices file path from preferences |
353 |
< |
const char *fbd_path = PrefsFindString("fbdevices"); |
353 |
> |
const char *fbd_path = PrefsFindString("fbdevicefile"); |
354 |
|
|
355 |
|
// Open fbdevices file |
356 |
|
FILE *fp = fopen(fbd_path ? fbd_path : FBDEVICES_FILE_NAME, "r"); |
377 |
|
if ((line[0] == '#') || (line[0] == ';') || (line[0] == '\0')) |
378 |
|
continue; |
379 |
|
|
380 |
< |
if ((sscanf(line, "%s %d %x", &fb_name, &fb_depth, &fb_offset) == 3) |
380 |
> |
if ((sscanf(line, "%19s %d %x", &fb_name, &fb_depth, &fb_offset) == 3) |
381 |
|
&& (strcmp(fb_name, in_fb_name) == 0) && (fb_depth == max_depth)) { |
382 |
|
device_found = true; |
383 |
|
break; |
708 |
|
if (sscanf(mode_str, "win/%d/%d", &width, &height) == 2) |
709 |
|
display_type = DISPLAY_WINDOW; |
710 |
|
#if ENABLE_FBDEV_DGA |
711 |
< |
else if (has_dga && sscanf(mode_str, "dga/%s", fb_name) == 1) { |
711 |
> |
else if (has_dga && sscanf(mode_str, "dga/%19s", fb_name) == 1) { |
712 |
|
#else |
713 |
|
else if (has_dga && sscanf(mode_str, "dga/%d/%d", &width, &height) == 2) { |
714 |
|
#endif |