MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / fbSetupScreen

Function fbSetupScreen

source/kernel/devs/devfb.cpp:330–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void fbSetupScreen() {
331 bOpenGL = 0;
332 DISPATCH_MAIN_THREAD_BLOCK_BEGIN
333 destroySDL2();
334 sdlWindow = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, fb_var_screeninfo.xres, fb_var_screeninfo.yres, SDL_WINDOW_SHOWN);
335 sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, 0);
336 sdlTexture = SDL_CreateTexture(sdlRenderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, fb_var_screeninfo.xres, fb_var_screeninfo.yres);
337
338 SDL_ShowCursor(0);
339 DISPATCH_MAIN_THREAD_BLOCK_END
340
341 fb_fix_screeninfo.visual = 2; // FB_VISUAL_TRUECOLOR
342 fb_fix_screeninfo.type = 0; // FB_TYPE_PACKED_PIXELS
343 //fb_fix_screeninfo.smem_start = ADDRESS_PROCESS_FRAME_BUFFER_ADDRESS;
344
345 fb_var_screeninfo.red.offset = 16;
346 fb_var_screeninfo.green.offset = 8;
347 fb_var_screeninfo.blue.offset = 0;
348 fb_var_screeninfo.red.length = 8;
349 fb_var_screeninfo.green.length = 8;
350 fb_var_screeninfo.blue.length = 8;
351 fb_fix_screeninfo.line_length = 4 * fb_var_screeninfo.xres;
352 fb_fix_screeninfo.smem_len = fb_fix_screeninfo.line_length*fb_var_screeninfo.yres_virtual;
353}
354
355class DevFB : public FsVirtualOpenNode {
356public:

Callers 3

es_glXMakeCurrentFunction · 0.85
mesa_glXMakeCurrentFunction · 0.85
ioctlMethod · 0.85

Calls 4

SDL_CreateWindowFunction · 0.85
SDL_CreateRendererFunction · 0.85
SDL_CreateTextureFunction · 0.85
SDL_ShowCursorFunction · 0.85

Tested by

no test coverage detected