remove unnecessary code

This commit is contained in:
itsmattkc 2024-11-15 19:03:31 -08:00
parent d9d9a0ab47
commit b3ab7dcf5a

View file

@ -11,27 +11,6 @@
#define ALIGN(x, a) ((x) + (a - 1)) & (~(a - 1)) #define ALIGN(x, a) ((x) + (a - 1)) & (~(a - 1))
int set_tty(int mode)
{
/*int tty_fd = open("/dev/tty0", O_RDWR);
if (tty_fd == -1) {
fprintf(stderr, "Failed to open /dev/tty\n");
return 0;
}
if (ioctl(tty_fd, KDSETMODE, mode) < 0) {
fprintf(stderr, "Failed to set KDSETMODE: %s (%i)\n", strerror(errno), errno);
return 0;
}
close(tty_fd);*/
/*if (ioctl(STDIN_FILENO, KDSETMODE, mode) < 0) {
fprintf(stderr, "Failed to set KDSETMODE: %s (%i)\n", strerror(errno), errno);
return 0;
}*/
return 1;
}
int initialize_drm(vanilla_drm_ctx_t *ctx) int initialize_drm(vanilla_drm_ctx_t *ctx)
{ {
// Open DRM // Open DRM
@ -40,10 +19,6 @@ int initialize_drm(vanilla_drm_ctx_t *ctx)
return 0; return 0;
} }
if (!set_tty(KD_GRAPHICS)) {
return 0;
}
int ret = 0; int ret = 0;
// Find DRM output // Find DRM output
@ -92,8 +67,6 @@ int free_drm(vanilla_drm_ctx_t *ctx)
drmModeRmFB(ctx->fd, ctx->fb_id); drmModeRmFB(ctx->fd, ctx->fb_id);
} }
set_tty(KD_TEXT);
// Close DRM // Close DRM
drmClose(ctx->fd); drmClose(ctx->fd);
} }