Rev 1547 | Rev 1555 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1547 | Rev 1552 | ||
---|---|---|---|
Line 124... | Line 124... | ||
124 | void gcons_change_console(int consnum) |
124 | void gcons_change_console(int consnum) |
125 | { |
125 | { |
126 | if (!use_gcons) |
126 | if (!use_gcons) |
127 | return; |
127 | return; |
128 | 128 | ||
- | 129 | if (active_console != -1) |
|
129 | draw_stat(active_console, CONS_IDLE); |
130 | draw_stat(active_console, CONS_IDLE); |
130 | active_console = consnum; |
131 | active_console = consnum; |
131 | draw_stat(consnum, CONS_ACTIVE); |
132 | draw_stat(consnum, CONS_ACTIVE); |
132 | console_has_input[consnum] = 0; |
133 | console_has_input[consnum] = 0; |
133 | 134 | ||
134 | vp_switch(console_vp); |
135 | vp_switch(console_vp); |
135 | } |
136 | } |
136 | 137 | ||
- | 138 | /** Notification function that gets called on new output to virtual console */ |
|
137 | void gcons_notify_char(int consnum) |
139 | void gcons_notify_char(int consnum) |
138 | { |
140 | { |
139 | if (!use_gcons) |
141 | if (!use_gcons) |
140 | return; |
142 | return; |
141 | 143 | ||
142 | if (consnum == active_console || console_has_input[consnum]) |
144 | if (consnum == active_console || console_has_input[consnum]) |
143 | return; |
145 | return; |
144 | 146 | ||
145 | console_has_input[consnum] = 1; |
147 | console_has_input[consnum] = 1; |
- | 148 | ||
- | 149 | if (active_console == -1) |
|
- | 150 | return; |
|
- | 151 | ||
146 | draw_stat(consnum, CONS_HAS_INPUT); |
152 | draw_stat(consnum, CONS_HAS_INPUT); |
147 | 153 | ||
148 | vp_switch(console_vp); |
154 | vp_switch(console_vp); |
- | 155 | ||
- | 156 | } |
|
- | 157 | ||
- | 158 | /** Change to kernel console */ |
|
- | 159 | void gcons_in_kernel(void) |
|
- | 160 | { |
|
- | 161 | draw_stat(active_console, CONS_IDLE); |
|
- | 162 | active_console = -1; /* Set to kernel console */ |
|
- | 163 | vp_switch(0); |
|
149 | } |
164 | } |
150 | 165 | ||
- | 166 | /** Draw a PPM pixmap to framebuffer |
|
- | 167 | * |
|
- | 168 | * @param logo Pointer to PPM data |
|
- | 169 | * @param size Size of PPM data |
|
- | 170 | * @param x Coordinate of upper left corner |
|
- | 171 | * @param y Coordinate of upper left corner |
|
- | 172 | */ |
|
151 | static void draw_pixmap(char *logo, size_t size, int x, int y) |
173 | static void draw_pixmap(char *logo, size_t size, int x, int y) |
152 | { |
174 | { |
153 | char *shm; |
175 | char *shm; |
154 | int rc; |
176 | int rc; |
155 | 177 |