Changeset 7fc81da in mainline


Ignore:
Timestamp:
2022-01-29T22:12:15Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e629ad4
Parents:
36aec61e
Message:

128 columns is not enough for everybody

Fixes corrupted graphical console display in VESA modes > 1024x768.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/output/output.c

    r36aec61e r7fc81da  
    4444#include "output.h"
    4545
    46 #define MAX_COLS  128
    47 #define MAX_ROWS  128
    48 
    4946typedef struct {
    5047        link_t link;
     
    115112static void srv_get_dimensions(ipc_call_t *icall)
    116113{
    117         sysarg_t cols = MAX_COLS;
    118         sysarg_t rows = MAX_ROWS;
    119 
    120         list_foreach(outdevs, link, outdev_t, dev) {
    121                 cols = min(cols, dev->cols);
    122                 rows = min(rows, dev->rows);
     114        sysarg_t cols = 0;
     115        sysarg_t rows = 0;
     116        bool first;
     117
     118        first = true;
     119        list_foreach(outdevs, link, outdev_t, dev) {
     120                if (first) {
     121                        cols = dev->cols;
     122                        rows = dev->rows;
     123                        first = false;
     124                } else {
     125                        cols = min(cols, dev->cols);
     126                        rows = min(rows, dev->rows);
     127                }
    123128        }
    124129
Note: See TracChangeset for help on using the changeset viewer.