edje: warn if loading a edj with physics

If a edj using physics is loaded for edje compiled with
physics disabled, it should warn the user.



SVN revision: 80472
This commit is contained in:
Bruno Dilly 2012-12-07 16:42:42 +00:00
parent daa5b3bdad
commit 6550798518
3 changed files with 3 additions and 6 deletions

View File

@ -945,9 +945,7 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "lua_script_only", lua_script_only, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.orientation", prop.orientation, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "broadcast_signal", broadcast_signal, EET_T_UCHAR);
#ifdef HAVE_EPHYSICS
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "physics_enabled", physics_enabled, EET_T_UCHAR);
#endif
}
EAPI void

View File

@ -450,9 +450,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
{
unsigned int i;
#ifdef HAVE_EPHYSICS
/* create physics world */
if (ed->collection->physics_enabled)
#ifdef HAVE_EPHYSICS
{
ephysics_init();
ed->world = ephysics_world_new();
@ -460,6 +459,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
ed->world, EPHYSICS_CALLBACK_WORLD_UPDATE,
_edje_physics_world_update_cb, ed);
}
#else
ERR("Edje compiled without support to physics.");
#endif
/* colorclass stuff */

View File

@ -834,9 +834,7 @@ struct _Edje_Part_Collection
unsigned char broadcast_signal;
#ifdef HAVE_EPHYSICS
unsigned char physics_enabled; /* will be 1 if a body is declared */
#endif
unsigned char checked : 1;
};