[v0.11] Working in printer backend to show logo and text for intel iGPU

This commit is contained in:
Dr-Noob
2021-11-26 09:58:45 +01:00
parent 310486a6a2
commit ce004725ad
5 changed files with 135 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
#include <stdio.h>
#include <string.h>
#include "intel.hpp"
#include "uarch.hpp"
@@ -7,7 +8,11 @@
struct gpu_info* get_gpu_info_intel() {
struct gpu_info* gpu = (struct gpu_info*) emalloc(sizeof(struct gpu_info));
const char* name = "UHD Graphics XXX";
gpu->vendor = GPU_VENDOR_INTEL;
gpu->name = (char *) emalloc(sizeof(char) * (strlen(name) + 1));
strcpy(gpu->name, name);
return gpu;
}
@@ -15,7 +20,7 @@ struct gpu_info* get_gpu_info_intel() {
bool print_gpu_intel(struct gpu_info* gpu) {
if(gpu->vendor != GPU_VENDOR_INTEL) return false;
printf("Intel ???\n");
printf("Intel %s\n", gpu->name);
return true;
}