static Eina_Bool
_e_comp_screen_fake_output_set(E_Comp_Screen *e_comp_screen)
{
- E_Output *output = NULL;
+ E_Output *primary_output = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
- output = e_output_find_by_index(0);
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
- if (!e_output_hwc_setup(output))
+ if (!e_output_hwc_setup(primary_output))
{
ERR("fail to e_output_hwc_setup.");
return EINA_FALSE;
}
+ if (!e_output_fake_config_set(primary_output, 2, 1))
+ {
+ e_error_message_show(_("Fail to set the fake output config!\n"));
+ e_hwc_ecore_evas_deinit();
+ return EINA_FALSE;
+ }
+
return EINA_TRUE;
}
}
//TODO: if there is no output connected, make the fake output which is connected.
-
if (!connection_check)
{
if (!_e_comp_screen_fake_output_set(e_comp_screen))
/* get the size of the primary output */
e_output_size_get(primary_output, &scr_w, &scr_h);
- /* if output is disconnected, set the default width, height */
- if (scr_w == 0 || scr_h == 0)
- {
- scr_w = 2;
- scr_h = 1;
-
- if (!e_output_fake_config_set(primary_output, scr_w, scr_h))
- {
- e_hwc_ecore_evas_deinit();
- e_error_message_show(_("Fail to set the fake output config!\n"));
- return EINA_FALSE;
- }
- }
-
EHINF("GL available:%d config engine:%d screen size:%dx%d", hwc,
e_comp_gl_get(), e_comp_config_get()->engine, scr_w, scr_h);