OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008-2010, 2015 Travis Geiselbrecht | 2 * Copyright (c) 2008-2010, 2015 Travis Geiselbrecht |
3 * | 3 * |
4 * Permission is hereby granted, free of charge, to any person obtaining | 4 * Permission is hereby granted, free of charge, to any person obtaining |
5 * a copy of this software and associated documentation files | 5 * a copy of this software and associated documentation files |
6 * (the "Software"), to deal in the Software without restriction, | 6 * (the "Software"), to deal in the Software without restriction, |
7 * including without limitation the rights to use, copy, modify, merge, | 7 * including without limitation the rights to use, copy, modify, merge, |
8 * publish, distribute, sublicense, and/or sell copies of the Software, | 8 * publish, distribute, sublicense, and/or sell copies of the Software, |
9 * and to permit persons to whom the Software is furnished to do so, | 9 * and to permit persons to whom the Software is furnished to do so, |
10 * subject to the following conditions: | 10 * subject to the following conditions: |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 * @brief Initialize graphics console on default display | 157 * @brief Initialize graphics console on default display |
158 */ | 158 */ |
159 void gfxconsole_start_on_display(void) | 159 void gfxconsole_start_on_display(void) |
160 { | 160 { |
161 static bool started = false; | 161 static bool started = false; |
162 | 162 |
163 if (started) | 163 if (started) |
164 return; | 164 return; |
165 | 165 |
166 /* pop up the console */ | 166 /* pop up the console */ |
167 struct display_info info; | 167 struct display_framebuffer fb; |
168 if (display_get_info(&info) < 0) | 168 if (display_get_framebuffer(&fb) < 0) |
169 return; | 169 return; |
170 | 170 |
171 gfx_surface *s = gfx_create_surface_from_display(&info); | 171 gfx_surface *s = gfx_create_surface_from_display(&fb); |
172 gfxconsole_start(s); | 172 gfxconsole_start(s); |
173 started = true; | 173 started = true; |
174 } | 174 } |
175 | 175 |
176 static void gfxconsole_init_hook(uint level) | 176 static void gfxconsole_init_hook(uint level) |
177 { | 177 { |
178 gfxconsole_start_on_display(); | 178 gfxconsole_start_on_display(); |
179 } | 179 } |
180 | 180 |
181 LK_INIT_HOOK(gfxconsole, &gfxconsole_init_hook, LK_INIT_LEVEL_PLATFORM); | 181 LK_INIT_HOOK(gfxconsole, &gfxconsole_init_hook, LK_INIT_LEVEL_PLATFORM); |
OLD | NEW |