directfb: Use DirectFBErrorFatal for errors we don't handle well
In case we fail to initialize DirectFB, use the DirectFBErrorFatal to quit as there is no way we can recover from this error and the QPA backend has already been selected. Change-Id: I8001bf32d0a14ba21c2ec13121748a6384b87c2b Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
This commit is contained in:
parent
6ef939455f
commit
7da24c14fd
@ -54,7 +54,7 @@ IDirectFB *QDirectFbConvenience::dfbInterface()
|
||||
if (!dfb) {
|
||||
DFBResult result = DirectFBCreate(&dfb);
|
||||
if (result != DFB_OK) {
|
||||
DirectFBError("QDirectFBConvenience: error creating DirectFB interface",result);
|
||||
DirectFBErrorFatal("QDirectFBConvenience: error creating DirectFB interface", result);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -65,10 +65,9 @@ IDirectFBDisplayLayer *QDirectFbConvenience::dfbDisplayLayer(int display)
|
||||
{
|
||||
IDirectFBDisplayLayer *layer;
|
||||
DFBResult result = QDirectFbConvenience::dfbInterface()->GetDisplayLayer(QDirectFbConvenience::dfbInterface(),display,&layer);
|
||||
if (result != DFB_OK) {
|
||||
DirectFBError("QDirectFbConvenience: "
|
||||
"Unable to get primary display layer!", result);
|
||||
}
|
||||
if (result != DFB_OK)
|
||||
DirectFBErrorFatal("QDirectFbConvenience: "
|
||||
"Unable to get primary display layer!", result);
|
||||
return layer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user