Why IDirectFB->GetDisplayLayer () crashes? Am I missing any steps here?
IDirectFB * dfb = (IDirectFB*)m_app->platformNativeInterface();
if(dfb){
std::cerr << "######## New resolution is " << width << "x" << height << std::endl;
IDirectFBDisplayLayer *layer = NULL;
DFBDisplayLayerConfig config;
std::cerr << "######## Getting primary IDirectFBDisplayLayer" << std::endl;
/* Get an interface to the primary layer. */
dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer); // Crashes here..
if(layer){
DFBResult dres;
std::cerr << "######## Got the primary display layer, setting admin" << std::endl;
// This level allows window stack mode switches
dres = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
if(dres != DFB_OK){
std::cerr << "######## Error: " << DirectFBErrorString(dres) << std::endl;
}
The code crashes on GetDisplayLayer() and I am not sure what's the problem here. My directfbrc looks like -
cat /etc/directfbrc
system=fbdev
fbdev=/dev/fb0
no-cursor
module-dir=/usr/local/lib/directfb-1.7-7/
pixelformat=ARGB
no-hardware
bg-color=00000000
desktop-buffer-mode=backvideo
module-dir=/usr/lib/directfb-1.7-7
I can't see anything wrong with directfb startup.
(*) Direct/Thread: Started 'SigHandler' (1653) [CRITICAL - OTHER/0] <8388608>...
~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2012-2015 DirectFB integrated media GmbH
(c) 2001-2015 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2019-09-14 13:54)
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (1654) [MESSAGING - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Switcher' (1655) [CRITICAL - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (1656) [DEFAULT - OTHER/0] <8388608>...
(*) DirectFB/FBDev: Found 'Biamp FB' (ID 0) with frame buffer at 0x80000000, 131072k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (1657) [INPUT - OTHER/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver
(*) DirectFB/Graphics: Generic Software Rasterizer 0.7 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Thread: Started 'Genefx' (1658) [DEFAULT - OTHER/0] <8388608>...
(*) FBDev/Mode: Setting 1920x1080 ARGB
(*) FBDev/Mode: Switched to 1920x1080 (virtual 1920x1080) at 32 bit (ARGB), pitch 7680
(*) FBDev/Mode: Setting 1920x1080 ARGB
(*) FBDev/Mode: Switched to 1920x1080 (virtual 1920x2160) at 32 bit (ARGB), pitch 7680
User contributions licensed under CC BY-SA 3.0