From 0fcc7fcab8cc13fb9ab54feafbd46cf15b4871ea Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 1 Apr 2018 18:13:21 +0200 Subject: Default VESA size parametrized in kernel config.h --- src/kernel/config.h | 3 +++ src/kernel/dev/vesa.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/kernel/config.h b/src/kernel/config.h index 1792d52..f0a1d86 100644 --- a/src/kernel/config.h +++ b/src/kernel/config.h @@ -33,4 +33,7 @@ #define SPAM_BEGIN_EXIT 1 // trace thread creation/deletion && process begin/exit #define SPAM_OOM_REASON 1 // print a message saying where we are when calling free_some_memory +#define DEFAULT_VESA_WIDTH 1024 +#define DEFAULT_VESA_HEIGHT 768 + /* vim: set ts=4 sw=4 tw=0 noet :*/ diff --git a/src/kernel/dev/vesa.c b/src/kernel/dev/vesa.c index 4a35969..29aae98 100644 --- a/src/kernel/dev/vesa.c +++ b/src/kernel/dev/vesa.c @@ -343,7 +343,7 @@ void vesa_init_driver(fs_t *iofs, vesa_mode_t *mode_data, int mode_data_c) { // Lookup a valid mode and set it for (int i = 0; i < mode_data_c; i++) { - if (mode_data[i].info.bpp == 32 && mode_data[i].info.width == 800) { + if (mode_data[i].info.bpp == 32 && mode_data[i].info.width == DEFAULT_VESA_WIDTH && mode_data[i].info.height == DEFAULT_VESA_HEIGHT) { if (vesa_set_mode(d, i)) break; } } -- cgit v1.2.3