使用linux framebuffer进行图形处理但禁用控制台文本 [英] using linux framebuffer for graphics but disabling console text

查看:234
本文介绍了使用linux framebuffer进行图形处理但禁用控制台文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些C代码可以在linux framebuffer控制台上绘制简单的图形.我还使用了树莓派及其复合视频输出.操作系统是raspbian,我在不使用X的情况下正在执行低级解决方案.

I have some c code that draws simple graphics on the linux framebuffer console. I'm also using the raspberry pi and it's composite video output. The OS is raspbian, and i'm doing a low level solution without using X.

我的图形运行良好,而且我还能够读取USB键盘并响应按键.

My graphics are working well, and i'm also able to read the usb keyboard and respond to key presses.

当前有一个tty终端,我的图形被覆盖了. tty仍处于活动状态,并且将按键回显到屏幕上.

Currently there is a tty terminal that my graphics are written over. The tty is still active and key presses are echoed to the screen.

我要实现的是禁用帧缓冲区上的所有控制台消息和tty,以便仅显示我的图形.有人有这样做的好方法吗?也许在该虚拟控制台上禁用tty?

What I want to achieve is to disable all console messages and ttys on the framebuffer so only my graphics are shown. Does anyone have a good way of doing this? Perhaps disabling the tty on that virtual console?

Rob

推荐答案

我认为您正在寻找的是ioctl(fd, KDSETMODE, KD_GRAPHICS).您需要在退出之前将其重新设置.

I think what you're looking for is ioctl(fd, KDSETMODE, KD_GRAPHICS). You'll need to set it back before you exit.

这篇关于使用linux framebuffer进行图形处理但禁用控制台文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆