您尚未登录。

楼主 # 2024-01-20 20:17:44

wj8331585
会员
注册时间: 2023-02-07
已发帖子: 44
积分: 19

关于tina linux,Buildroot-YuzukiSBC不能正常运行SDL程序的问题

最近在T113平台移植Funkey OS,而Funkey里面游戏都是基于SDL的,参照大佬的帖子移植SDL1.2.15   https://bbs.aw-ol.com/topic/3727/d1s%E7%A7%BB%E6%A4%8Dsdl1-2-15%E7%89%88%E6%9C%AC ,发现不管是在tina和Buildroot-YuzukiSBC下都无法正常运行。提示错误如下:




# ./main
[  812.542963] [DISP] var_to_disp_fb,line:513:
[  812.542969] invalid bits_per_pixel :8
[  812.551818] [DISP] var_to_disp_fb,line:513:
[  812.551821] invalid bits_per_pixel :8
[  812.560611] [DISP] var_to_disp_fb,line:513:
[  812.560614] invalid bits_per_pixel :8
[  812.569450] [DISP] var_to_disp_fb,line:513:
[  812.569454] invalid bits_per_pixel :8
[  812.578308] [DISP] var_to_disp_fb,line:513:
[  812.578311] invalid bits_per_pixel :8
[  812.587165] [DISP] var_to_disp_fb,line:513:
[  812.587168] invalid bits_per_pixel :8
[  812.595991] [DISP] var_to_disp_fb,line:513:
[  812.595994] invalid bits_per_pixel :8
[  812.604816] [DISP] var_to_disp_fb,line:513:
[  812.604819] invalid bits_per_pixel :8
[  812.613625] [DISP] var_to_disp_fb,line:513:
[  812.613628] invalid bits_per_pixel :8
[  812.622600] [DISP] var_to_disp_fb,line:513:
[  812.622604] invalid bits_per_pixel :8
[  812.631435] [DISP] var_to_disp_fb,line:513:
[  812.631437] invalid bits_per_pixel :8
[  812.640232] [DISP] var_to_disp_fb,line:513:
[  812.640235] invalid bits_per_pixel :8
[  812.649049] [DISP] var_to_disp_fb,line:513:
[  812.649052] invalid bits_per_pixel :8
[  812.657861] [DISP] var_to_disp_fb,line:513:
[  812.657864] invalid bits_per_pixel :8
[  812.666670] [DISP] var_to_disp_fb,line:513:
[  812.666673] invalid bits_per_pixel :8
[  812.675488] [DISP] var_to_disp_fb,line:506:
[  812.675492] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.685323] [DISP] var_to_disp_fb,line:506:
[  812.685327] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.695048] [DISP] var_to_disp_fb,line:506:
[  812.695052] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.704746] [DISP] var_to_disp_fb,line:506:
[  812.704750] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.714433] [DISP] var_to_disp_fb,line:506:
[  812.714439] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.724125] [DISP] var_to_disp_fb,line:506:
[  812.724129] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.733960] [DISP] var_to_disp_fb,line:506:
[  812.733965] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.743663] [DISP] var_to_disp_fb,line:506:
[  812.743667] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.753353] [DISP] var_to_disp_fb,line:506:
[  812.753357] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.763039] [DISP] var_to_disp_fb,line:506:
[  812.763047] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.772735] [DISP] var_to_disp_fb,line:506:
[  812.772739] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.782460] [DISP] var_to_disp_fb,line:506:
[  812.782465] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.792150] [DISP] var_to_disp_fb,line:506:
[  812.792154] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.801843] [DISP] var_to_disp_fb,line:506:
[  812.801849] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.811537] [DISP] var_to_disp_fb,line:506:
[  812.811541] invalid fmt,off<a:24,r:16,g:8,b:0>
[  812.903009] [DISP] var_to_disp_fb,line:513:
[  812.903014] invalid bits_per_pixel :8
[  812.911856] [DISP] var_to_disp_fb,line:513:
[  812.911859] invalid bits_per_pixel :8
[  812.920648] [DISP] var_to_disp_fb,line:513:
[  812.920651] invalid bits_per_pixel :8
[  812.929497] [DISP] var_to_disp_fb,line:513:
[  812.929500] invalid bits_per_pixel :8
[  812.938354] [DISP] var_to_disp_fb,line:513:
[  812.938357] invalid bits_per_pixel :8
[  812.947181] [DISP] var_to_disp_fb,line:513:
[  812.947184] invalid bits_per_pixel :8
[  812.956005] [DISP] var_to_disp_fb,line:513:
[  812.956008] invalid bits_per_pixel :8
[  812.964816] [DISP] var_to_disp_fb,line:513:
[  812.964821] invalid bits_per_pixel :8
[  812.973626] [DISP] var_to_disp_fb,line:513:
[  812.973629] invalid bits_per_pixel :8
[  812.982471] [DISP] var_to_disp_fb,line:513:
[  812.982475] invalid bits_per_pixel :8
[  812.991263] [DISP] var_to_disp_fb,line:513:
[  812.991266] invalid bits_per_pixel :8
[  813.000086] [DISP] var_to_disp_fb,line:513:
[  813.000089] invalid bits_per_pixel :8
[  813.008896] [DISP] var_to_disp_fb,line:513:
[  813.008899] invalid bits_per_pixel :8
[  813.017705] [DISP] var_to_disp_fb,line:513:
[  813.017707] invalid bits_per_pixel :8
[  813.026518] [DISP] var_to_disp_fb,line:513:
[  813.026521] invalid bits_per_pixel :8
[  813.035439] [DISP] var_to_disp_fb,line:506:
[  813.035444] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.045148] [DISP] var_to_disp_fb,line:506:
[  813.045153] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.054835] [DISP] var_to_disp_fb,line:506:
[  813.054839] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.064532] [DISP] var_to_disp_fb,line:506:
[  813.064536] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.074219] [DISP] var_to_disp_fb,line:506:
[  813.074223] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.083951] [DISP] var_to_disp_fb,line:506:
[  813.083955] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.093645] [DISP] var_to_disp_fb,line:506:
[  813.093649] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.103335] [DISP] var_to_disp_fb,line:506:
[  813.103340] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.113020] [DISP] var_to_disp_fb,line:506:
[  813.113024] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.122902] [DISP] var_to_disp_fb,line:506:
[  813.122908] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.132612] [DISP] var_to_disp_fb,line:506:
[  813.132616] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.142309] [DISP] var_to_disp_fb,line:506:
[  813.142313] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.152003] [DISP] var_to_disp_fb,line:506:
[  813.152009] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.161687] [DISP] var_to_disp_fb,line:506:
[  813.161691] invalid fmt,off<a:24,r:16,g:8,b:0>
[  813.171380] [DISP] var_to_disp_fb,line:506:
[  813.171384] invalid fmt,off<a:24,r:16,g:8,b:0>
Segmentation fault
#

测试SDL程序
#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>

int main(int argc, char **argv)
{
    SDL_Rect rt = {0};
    SDL_Surface *screen = NULL;

    SDL_Init(SDL_INIT_VIDEO);
    screen = SDL_SetVideoMode(320, 240, 16, SDL_HWSURFACE);

    SDL_FillRect(screen, &screen->clip_rect, SDL_MapRGB(screen->format, 0xff, 0x00, 0x00));

    rt.x = 50;
    rt.y = 50;
    rt.w = 30;
    rt.h = 30;
    SDL_FillRect(screen, &rt, SDL_MapRGB(screen->format, 0x00, 0xff, 0x00));

    rt.x = 100;
    rt.y = 100;
    rt.w = 50;
    rt.h = 100;
    SDL_FillRect(screen, &rt, SDL_MapRGB(screen->format, 0x00, 0x00, 0xff));

    SDL_Flip(screen);
    SDL_Delay(3000);
    SDL_Quit();
    return 0;
}



有人遇到这样的情况吗?

最近编辑记录 wj8331585 (2024-01-20 20:22:43)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn