Skip to content

Commit 54edd3d

Browse files
committed
fixes
- remove non-null libseat assertion (since we can run without libseat as well) - use LOG_DEBUG instead of LOG_ERROR for libseat_open_seat error - make locales output use LOG_DEBUG_UNPREFIXED - fix integer type for bitmask in modesetting.c
1 parent e6aa20b commit 54edd3d

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

src/flutter-pi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,6 @@ static int on_drmdev_open(const char *path, int flags, void **fd_metadata_out, v
20562056

20572057
DEBUG_ASSERT_NOT_NULL(path);
20582058
DEBUG_ASSERT_NOT_NULL(fd_metadata_out);
2059-
DEBUG_ASSERT_NOT_NULL(userdata);
20602059
libseat = userdata;
20612060

20622061
if (libseat != NULL) {
@@ -2087,7 +2086,6 @@ static void on_drmdev_close(int fd, void *fd_metadata, void *userdata) {
20872086
int ok, device_id;
20882087

20892088
DEBUG_ASSERT_NOT_NULL(fd_metadata);
2090-
DEBUG_ASSERT_NOT_NULL(userdata);
20912089
libseat = userdata;
20922090

20932091
if (libseat != NULL) {
@@ -2330,7 +2328,7 @@ struct flutterpi *flutterpi_new_from_args(int argc, char **argv) {
23302328

23312329
libseat = libseat_open_seat(&libseat_interface, fpi);
23322330
if (libseat == NULL) {
2333-
LOG_ERROR("Couldn't open libseat. Flutter-pi will run without session switching support. libseat_open_seat: %s\n", strerror(errno));
2331+
LOG_DEBUG("Couldn't open libseat. Flutter-pi will run without session switching support. libseat_open_seat: %s\n", strerror(errno));
23342332
}
23352333

23362334
if (libseat != NULL) {

src/locales.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -409,41 +409,41 @@ const FlutterLocale *locales_on_compute_platform_resolved_locale(struct locales
409409
}
410410

411411
void locales_print(const struct locales *locales) {
412-
DEBUG_ASSERT(locales != NULL);
412+
DEBUG_ASSERT_NOT_NULL(locales);
413413

414-
printf("==============Locale==============\n");
415-
printf("Flutter locale:\n");
414+
LOG_DEBUG_UNPREFIXED("==============Locale==============\n");
415+
LOG_DEBUG_UNPREFIXED("Flutter locale:\n");
416416
if (locales->default_flutter_locale != NULL) {
417-
printf(" default: %s", locales->default_flutter_locale->language_code);
417+
LOG_DEBUG_UNPREFIXED(" default: %s", locales->default_flutter_locale->language_code);
418418
if (locales->default_flutter_locale->country_code != NULL) {
419-
printf("_%s", locales->default_flutter_locale->country_code);
419+
LOG_DEBUG_UNPREFIXED("_%s", locales->default_flutter_locale->country_code);
420420
}
421421
if (locales->default_flutter_locale->script_code != NULL) {
422-
printf(".%s", locales->default_flutter_locale->script_code);
422+
LOG_DEBUG_UNPREFIXED(".%s", locales->default_flutter_locale->script_code);
423423
}
424424
if (locales->default_flutter_locale->variant_code != NULL) {
425-
printf("@%s", locales->default_flutter_locale->variant_code);
425+
LOG_DEBUG_UNPREFIXED("@%s", locales->default_flutter_locale->variant_code);
426426
}
427427

428-
printf("\n");
428+
LOG_DEBUG_UNPREFIXED("\n");
429429
} else {
430-
printf(" default: NULL\n");
430+
LOG_DEBUG_UNPREFIXED(" default: NULL\n");
431431
}
432432

433-
printf(" locales:");
433+
LOG_DEBUG_UNPREFIXED(" locales:");
434434
for (size_t idx = 0; idx < locales->n_locales; idx++) {
435435
const FlutterLocale *locale = locales->flutter_locales[idx];
436-
printf(" %s", locale->language_code);
436+
LOG_DEBUG_UNPREFIXED(" %s", locale->language_code);
437437
if (locale->country_code != NULL) {
438-
printf("_%s", locale->country_code);
438+
LOG_DEBUG_UNPREFIXED("_%s", locale->country_code);
439439
}
440440
if (locale->script_code != NULL) {
441-
printf(".%s", locale->script_code);
441+
LOG_DEBUG_UNPREFIXED(".%s", locale->script_code);
442442
}
443443
if (locale->variant_code != NULL) {
444-
printf("@%s", locale->variant_code);
444+
LOG_DEBUG_UNPREFIXED("@%s", locale->variant_code);
445445
}
446446
}
447447

448-
printf("\n===================================\n");
448+
LOG_DEBUG_UNPREFIXED("\n===================================\n");
449449
}

src/modesetting.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static int get_supported_modified_formats(
472472
int index = 0;
473473
for (int i = 0; i < blob->count_modifiers; i++) {
474474
for (int j = modifiers[i].offset; (j < blob->count_formats) && (j < modifiers[i].offset + 64); j++) {
475-
bool is_format_bit_set = (modifiers[i].formats & (1 << (j % 64))) != 0;
475+
bool is_format_bit_set = (modifiers[i].formats & (1ull << (j % 64))) != 0;
476476
if (!is_format_bit_set) {
477477
continue;
478478
}

0 commit comments

Comments
 (0)