mirror of
https://github.com/Metabolix/HackBGRT.git
synced 2025-12-07 09:36:10 -08:00
If GOP is missing, use config.txt resolution or 1024x768
This commit is contained in:
10
src/main.c
10
src/main.c
@@ -44,9 +44,13 @@ static EFI_GRAPHICS_OUTPUT_PROTOCOL* GOP(void) {
|
|||||||
static void SetResolution(int w, int h) {
|
static void SetResolution(int w, int h) {
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL* gop = GOP();
|
EFI_GRAPHICS_OUTPUT_PROTOCOL* gop = GOP();
|
||||||
if (!gop) {
|
if (!gop) {
|
||||||
config.old_resolution_x = config.resolution_x = 0;
|
if (config.resolution_x <= 0 || config.resolution_y <= 0) {
|
||||||
config.old_resolution_y = config.resolution_y = 0;
|
config.resolution_x = 1024;
|
||||||
Log(config.debug, L"GOP not found!\n");
|
config.resolution_y = 768;
|
||||||
|
}
|
||||||
|
config.old_resolution_x = config.resolution_x;
|
||||||
|
config.old_resolution_y = config.resolution_y;
|
||||||
|
Log(config.debug, L"GOP not found! Assuming resolution %dx%d.\n", config.resolution_x, config.resolution_y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UINTN best_i = gop->Mode->Mode;
|
UINTN best_i = gop->Mode->Mode;
|
||||||
|
|||||||
Reference in New Issue
Block a user