daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/devs/kakaroto/build_ps3efl.sh b/devs/kakaroto/build_ps3efl.sh
  2. index ffcd8ef..4f3c40b 100755
  3. --- a/devs/kakaroto/build_ps3efl.sh
  4. +++ b/devs/kakaroto/build_ps3efl.sh
  5. @@ -16,8 +16,8 @@ ESKISS_DATADIR="/dev_hdd0/game/$ESKISS_APPID/USRDIR/"
  6.  MINIMAL_TOC="-mminimal-toc"
  7.  #DEBUG_CFLAGS="-g -ggdb -O0"
  8.  DEBUG_CFLAGS="-g -O3"
  9. -CONFIGURE=1
  10. -CLEAN_RULE="clean"
  11. +CONFIGURE=0
  12. +CLEAN_RULE=""
  13.  FSELF="make_fself"
  14.  
  15.  alias ps3-configure='AR="powerpc64-ps3-elf-ar" CC="powerpc64-ps3-elf-gcc" RANLIB="powerpc64-ps3-elf-ranlib" CFLAGS="$DEBUG_CFLAGS -Wall -I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include $MINIMAL_TOC $MYCFLAGS" CPPFLAGS="-I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include" CXXFLAGS="-I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include"  LDFLAGS="-L$PSL1GHT/ppu/lib -L$PS3DEV/portlibs/ppu/lib" PKG_CONFIG_LIBDIR="$PSL1GHT/ppu/lib/pkgconfig" PKG_CONFIG_PATH="$PS3DEV/portlibs/ppu/lib/pkgconfig"  PKG_CONFIG="pkg-config --static" ./configure   --prefix="$PS3DEV/portlibs/ppu"   --host=powerpc64-ps3-elf    --includedir="$PS3DEV/portlibs/ppu/include"   --libdir="$PS3DEV/portlibs/ppu/lib" '
  16. @@ -103,6 +103,7 @@ function escape {
  17.  function eina {
  18.      cd eina || return 1
  19.      if [ $CONFIGURE == "1" ]; then
  20. +        #MYCFLAGS="-DDEBUG"
  21.          ps3-configure || return 1
  22.      fi
  23.      make $CLEAN_RULE all && \
  24. @@ -137,7 +138,7 @@ function expat {
  25.  function fontconfig {
  26.      cd fontconfig-2.8.0 || return 1
  27.      if [ $CONFIGURE == "1" ]; then
  28. -        ps3-configure --with-arch=powerpc64 --disable-docs || return 1
  29. +        ps3-configure --with-arch=powerpc64 --disable-docs --sysconfdir=/app_home || return 1
  30.      fi
  31.  
  32.      if test $CLEAN_RULE != "" ; then
  33. @@ -182,7 +183,7 @@ function ecore {
  34.      cd ecore  || return 1
  35.  
  36.      if [ $CONFIGURE == "1" ]; then
  37. -        ps3-configure --disable-ecore-x --enable-ecore-sdl --enable-ecore-evas-software-sdl --enable-ecore-psl1ght --enable-ecore-evas-psl1ght --disable-ecore-con || return 1
  38. +        ps3-configure --disable-ecore-x --enable-ecore-sdl --enable-ecore-evas-software-sdl --enable-ecore-psl1ght --enable-ecore-evas-psl1ght --enable-ecore-con --enable-cares || return 1
  39.      fi
  40.      make $CLEAN_RULE all && \
  41.          ps3-smi && \
  42. @@ -253,10 +254,16 @@ function elementary {
  43.  ## TODO!! remove dlopen
  44.      cd elementary || return 1
  45.      if [ $CONFIGURE == "1" ]; then
  46. -        ps3-configure --disable-quick-launch --disable-elementary-config --disable-elementary-test || return 1
  47. +        ps3-configure --disable-quick-launch --datadir=/app_home || return 1
  48.      fi
  49.      make $CLEAN_RULE all EDJE_CC=edje_cc EET_EET=eet && \
  50.          ps3-smi && \
  51. +        cp src/bin/elementary_config elementary_config.elf && \
  52. +        sprxlinker elementary_config.elf && \
  53. +        make_fself elementary_config.elf elementary_config.self && \
  54. +        cp src/bin/elementary_test elementary_test.elf && \
  55. +        sprxlinker elementary_test.elf && \
  56. +        make_fself elementary_test.elf elementary_test.self && \
  57.          cd ..
  58.  
  59.  }
  60. @@ -320,7 +327,7 @@ else
  61.      done
  62.  fi
  63.  
  64. -rm *.log
  65. +#rm *.log
  66.  
  67.  end=`date +%s`
  68.  ELAPSED=`expr $end - $start`
  69. diff --git a/ecore/configure.ac b/ecore/configure.ac
  70. index fd19ce0..be515ad 100644
  71. --- a/ecore/configure.ac
  72. +++ b/ecore/configure.ac
  73. @@ -1328,6 +1328,22 @@ have_openssl="no"
  74.  have_cares="no"
  75.  if test "x${have_ecore_con}" = "xyes" ; then
  76.  
  77. +   # Verify IPV6 availability in headers
  78. +   have_ipv6="no"
  79. +   AC_CHECK_TYPES([struct ipv6_mreq], [have_ipv6="yes"], [have_ipv6="no"],
  80. +               [[
  81. +#ifdef HAVE_NETINET_IN_H
  82. +# include <netinet/in.h>
  83. +#endif
  84. +#ifdef HAVE_WS2TCPIP_H
  85. +# include <ws2tcpip.h>
  86. +#endif
  87. +        ]])
  88. +
  89. +   if test "x${have_ipv6}" = "xyes" ; then
  90. +      AC_DEFINE(HAVE_IPV6, 1, [Define if IPV6 is supported])
  91. +   fi
  92. +
  93.     ECORE_CHECK_CURL([${want_curl}],
  94.        [
  95.         have_curl="yes"
  96. diff --git a/ecore/ecore-psl1ght.pc.in b/ecore/ecore-psl1ght.pc.in
  97. index 9479c39..e81f4e8 100644
  98. --- a/ecore/ecore-psl1ght.pc.in
  99. +++ b/ecore/ecore-psl1ght.pc.in
  100. @@ -8,5 +8,5 @@ Description: E core library, PSL1GHT module
  101.  @pkgconfig_requires_private@: @requirements_ecore_psl1ght@
  102.  Version: @VERSION@
  103.  Libs: -L${libdir} -lecore_psl1ght
  104. -Libs.private: -lio -lsysutil
  105. +Libs.private: -lio -lsysutil -lgem -lcamera -lspurs
  106.  Cflags: -I${includedir}/ecore-@VMAJ@
  107. diff --git a/ecore/src/lib/ecore_con/ecore_con.c b/ecore/src/lib/ecore_con/ecore_con.c
  108. index c59cc7c..812a52a 100644
  109. --- a/ecore/src/lib/ecore_con/ecore_con.c
  110. +++ b/ecore/src/lib/ecore_con/ecore_con.c
  111. @@ -869,7 +869,11 @@ ecore_con_client_port_get(Ecore_Con_Client *cl)
  112.       }
  113.     if (cl->client_addr->sa_family == AF_INET)
  114.       return ((struct sockaddr_in*)cl->client_addr)->sin_port;
  115. +#ifdef HAVE_IPV6
  116.     return ((struct sockaddr_in6*)cl->client_addr)->sin6_port;
  117. +#else
  118. +   return -1;
  119. +#endif
  120.  }
  121.  
  122.  EAPI double
  123. @@ -1440,7 +1444,9 @@ _ecore_con_cb_udp_listen(void           *data,
  124.     Ecore_Con_Server *svr;
  125.     Ecore_Con_Type type;
  126.     struct ip_mreq mreq;
  127. +#ifdef HAVE_IPV6
  128.     struct ipv6_mreq mreq6;
  129. +#endif
  130.     const int on = 1;
  131.  
  132.     svr = data;
  133. @@ -1477,6 +1483,7 @@ _ecore_con_cb_udp_listen(void           *data,
  134.                    goto error;
  135.                 }
  136.            }
  137. +#ifdef HAVE_IPV6
  138.          else if (net_info->info.ai_family == AF_INET6)
  139.            {
  140.               if (!inet_pton(net_info->info.ai_family, net_info->ip,
  141. @@ -1493,6 +1500,7 @@ _ecore_con_cb_udp_listen(void           *data,
  142.                    goto error;
  143.                 }
  144.            }
  145. +#endif
  146.       }
  147.  
  148.     if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on, sizeof(on)) != 0)
  149. @@ -1765,6 +1773,9 @@ static const char *
  150.  _ecore_con_pretty_ip(struct sockaddr *client_addr,
  151.                       socklen_t        size)
  152.  {
  153. +#ifndef HAVE_IPV6
  154. +   char ipbuf[INET_ADDRSTRLEN + 1];
  155. +#else
  156.     char ipbuf[INET6_ADDRSTRLEN + 1];
  157.  
  158.     /* show v4mapped address in pretty form */
  159. @@ -1783,8 +1794,9 @@ _ecore_con_pretty_ip(struct sockaddr *client_addr,
  160.               return eina_stringshare_add(ipbuf);
  161.            }
  162.       }
  163. +#endif
  164.  
  165. -   if (getnameinfo(client_addr, size, ipbuf, sizeof (ipbuf), NULL, 0, NI_NUMERICHOST))
  166. +   if (ares_getnameinfo(client_addr, size, ipbuf, sizeof (ipbuf), NULL, 0, NI_NUMERICHOST))
  167.       return eina_stringshare_add("0.0.0.0");
  168.  
  169.     ipbuf[sizeof(ipbuf) - 1] = 0;
  170. diff --git a/ecore/src/lib/ecore_con/ecore_con_ares.c b/ecore/src/lib/ecore_con/ecore_con_ares.c
  171. index 95369d6..74bf091 100644
  172. --- a/ecore/src/lib/ecore_con/ecore_con_ares.c
  173. +++ b/ecore/src/lib/ecore_con/ecore_con_ares.c
  174. @@ -41,7 +41,9 @@ struct _Ecore_Con_CAres
  175.  
  176.     union {
  177.        struct in_addr  v4;
  178. +#ifdef HAVE_IPV6
  179.        struct in6_addr v6;
  180. +#endif
  181.     } addr;
  182.  
  183.     Eina_Bool byaddr : 1;
  184. @@ -124,7 +126,11 @@ ecore_con_info_tcp_connect(Ecore_Con_Server *svr,
  185.     struct addrinfo hints;
  186.  
  187.     memset(&hints, 0, sizeof(struct addrinfo));
  188. +#ifdef HAVE_IPV6
  189.     hints.ai_family = AF_INET6;
  190. +#else
  191. +   hints.ai_family = AF_INET;
  192. +#endif
  193.     hints.ai_socktype = SOCK_STREAM;
  194.     hints.ai_flags = AI_CANONNAME;
  195.     hints.ai_protocol = IPPROTO_TCP;
  196. @@ -143,7 +149,11 @@ ecore_con_info_tcp_listen(Ecore_Con_Server *svr,
  197.     struct addrinfo hints;
  198.  
  199.     memset(&hints, 0, sizeof(struct addrinfo));
  200. +#ifdef HAVE_IPV6
  201.     hints.ai_family = AF_INET6;
  202. +#else
  203. +   hints.ai_family = AF_INET;
  204. +#endif
  205.     hints.ai_socktype = SOCK_STREAM;
  206.     hints.ai_flags = AI_PASSIVE;
  207.     hints.ai_protocol = IPPROTO_TCP;
  208. @@ -162,7 +172,11 @@ ecore_con_info_udp_connect(Ecore_Con_Server *svr,
  209.     struct addrinfo hints;
  210.  
  211.     memset(&hints, 0, sizeof(struct addrinfo));
  212. +#ifdef HAVE_IPV6
  213.     hints.ai_family = AF_INET6;
  214. +#else
  215. +   hints.ai_family = AF_INET;
  216. +#endif
  217.     hints.ai_socktype = SOCK_DGRAM;
  218.     hints.ai_flags = AI_CANONNAME;
  219.     hints.ai_protocol = IPPROTO_UDP;
  220. @@ -181,7 +195,11 @@ ecore_con_info_udp_listen(Ecore_Con_Server *svr,
  221.     struct addrinfo hints;
  222.  
  223.     memset(&hints, 0, sizeof(struct addrinfo));
  224. +#ifdef HAVE_IPV6
  225.     hints.ai_family = AF_INET6;
  226. +#else
  227. +   hints.ai_family = AF_INET;
  228. +#endif
  229.     hints.ai_socktype = SOCK_DGRAM;
  230.     hints.ai_flags = AI_PASSIVE;
  231.     hints.ai_protocol = IPPROTO_UDP;
  232. @@ -200,7 +218,11 @@ ecore_con_info_mcast_listen(Ecore_Con_Server *svr,
  233.     struct addrinfo hints;
  234.  
  235.     memset(&hints, 0, sizeof(struct addrinfo));
  236. +#ifdef HAVE_IPV6
  237.     hints.ai_family = AF_INET6;
  238. +#else
  239. +   hints.ai_family = AF_INET;
  240. +#endif
  241.     hints.ai_socktype = SOCK_DGRAM;
  242.     hints.ai_flags = 0;
  243.     hints.ai_protocol = IPPROTO_UDP;
  244. @@ -262,7 +284,11 @@ ecore_con_info_get(Ecore_Con_Server *svr,
  245.                     struct addrinfo  *hints)
  246.  {
  247.     Ecore_Con_CAres *cares;
  248. +#ifdef HAVE_IPV6
  249.     int ai_family = AF_INET6;
  250. +#else
  251. +   int ai_family = AF_INET;
  252. +#endif
  253.  
  254.     cares = calloc(1, sizeof(Ecore_Con_CAres));
  255.     if (!cares)
  256. @@ -288,6 +314,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
  257.                             (ares_host_callback)_ecore_con_info_ares_host_cb,
  258.                             cares);
  259.       }
  260. +#ifdef HAVE_IPV6
  261.     else if (inet_pton(AF_INET6, svr->name, &cares->addr.v6) == 1)
  262.       {
  263.          cares->byaddr = EINA_TRUE;
  264. @@ -298,6 +325,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
  265.                             (ares_host_callback)_ecore_con_info_ares_host_cb,
  266.                             cares);
  267.       }
  268. +#endif
  269.     else
  270.       {
  271.          cares->byaddr = EINA_FALSE;
  272. @@ -432,7 +460,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
  273.                addr = (struct sockaddr *)addri;
  274.                break;
  275.             }
  276. -
  277. +#ifdef HAVE_IPV6
  278.             case AF_INET6:
  279.             {
  280.                struct sockaddr_in6 *addri6;
  281. @@ -454,7 +482,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
  282.                addr = (struct sockaddr *)addri6;
  283.                break;
  284.             }
  285. -
  286. +#endif
  287.             default:
  288.               ERR("Unknown addrtype %i", hostent->h_addrtype);
  289.               goto on_error;
  290. @@ -470,6 +498,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
  291.        case ARES_ENOTFOUND: /* address notfound */
  292.          if (arg->byaddr)
  293.            {
  294. +#ifdef HAVE_IPV6
  295.               /* This happen when host doesn't have a reverse. */
  296.                if (arg->isv6)
  297.                  {
  298. @@ -492,6 +521,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
  299.                     addr = (struct sockaddr *)addri6;
  300.                  }
  301.                else
  302. +#endif
  303.                  {
  304.                     struct sockaddr_in *addri;
  305.  
  306. @@ -511,8 +541,11 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
  307.                  }
  308.  
  309.                if (!_ecore_con_info_ares_getnameinfo(arg,
  310. +#ifdef HAVE_IPV6
  311.                                                      arg->isv6 ? AF_INET6 :
  312. +#else
  313.                                                      AF_INET,
  314. +#endif
  315.                                                      NULL, addr,
  316.                                                      addrlen))
  317.                  goto on_error;
  318. diff --git a/ecore/src/lib/ecore_con/ecore_con_local.c b/ecore/src/lib/ecore_con/ecore_con_local.c
  319. index 1d8afd2..f02cc1f 100644
  320. --- a/ecore/src/lib/ecore_con/ecore_con_local.c
  321. +++ b/ecore/src/lib/ecore_con/ecore_con_local.c
  322. @@ -59,6 +59,9 @@ ecore_con_local_connect(Ecore_Con_Server *svr,
  323.                          Eina_Bool (*cb_done)(void *data, Ecore_Fd_Handler *fd_handler),
  324.                          void *data __UNUSED__)
  325.  {
  326. +#ifndef HAVE_LOCAL_SOCKETS
  327. +   return 0;
  328. +#else
  329.     char buf[4096];
  330.     struct sockaddr_un socket_unix;
  331.     int curstate = 0;
  332. @@ -158,6 +161,7 @@ ecore_con_local_connect(Ecore_Con_Server *svr,
  333.     if (!svr->delete_me) ecore_con_event_server_add(svr);
  334.  
  335.     return 1;
  336. +#endif
  337.  }
  338.  
  339.  int
  340. @@ -170,6 +174,7 @@ ecore_con_local_listen(
  341.    void *data
  342.    __UNUSED__)
  343.  {
  344. +#ifdef HAVE_LOCAL_SOCKETS
  345.     char buf[4096];
  346.     struct sockaddr_un socket_unix;
  347.     struct linger lin;
  348. @@ -306,6 +311,7 @@ start:
  349.  error_umask:
  350.     umask(pmode);
  351.  error:
  352. +#endif /* HAVE_LOCAL_SOCKETS */
  353.     return 0;
  354.  }
  355.  
  356. diff --git a/ecore/src/lib/ecore_con/ecore_con_url.c b/ecore/src/lib/ecore_con/ecore_con_url.c
  357. index f6547de..10a298f 100644
  358. --- a/ecore/src/lib/ecore_con/ecore_con_url.c
  359. +++ b/ecore/src/lib/ecore_con/ecore_con_url.c
  360. @@ -21,11 +21,16 @@
  361.  # include <ws2tcpip.h>
  362.  #endif
  363.  
  364. +#ifdef HAVE_ESCAPE
  365. +# include <Escape.h>
  366. +#endif
  367. +
  368.  #include "Ecore.h"
  369.  #include "ecore_private.h"
  370.  #include "Ecore_Con.h"
  371.  #include "ecore_con_private.h"
  372.  
  373. +
  374.  int ECORE_CON_EVENT_URL_DATA = 0;
  375.  int ECORE_CON_EVENT_URL_COMPLETE = 0;
  376.  int ECORE_CON_EVENT_URL_PROGRESS = 0;
  377. diff --git a/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c b/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c
  378. index a34ca70..d8c5f53 100644
  379. --- a/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c
  380. +++ b/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c
  381. @@ -24,6 +24,12 @@ static const char               *ecore_evas_psl1ght_default = "EFL PSL1GHT";
  382.  static int                      _ecore_evas_fps_debug = 0;
  383.  static Ecore_Poller             *ecore_evas_event;
  384.  
  385. +static unsigned int
  386. +_ecore_evas_time_get ()
  387. +{
  388. +   return ((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
  389. +}
  390. +
  391.  static Ecore_Evas *
  392.  _ecore_evas_psl1ght_match(void)
  393.  {
  394. @@ -199,20 +205,46 @@ _ecore_evas_psl1ght_free(Ecore_Evas *ee)
  395.  }
  396.  
  397.  static void
  398. +_ecore_evas_screen_resized (Ecore_Evas *ee)
  399. +{
  400. +   int w, h;
  401. +
  402. +   return;
  403. +   ecore_psl1ght_screen_resolution_get (&w, &h);
  404. +   printf ("Screen got resized to %dx%d, real res is %dx%d\n",
  405. +       ee->w, ee->h, w, h);
  406. +
  407. +   if (w != ee->w || h != ee->h) {
  408. +      ee->req.w = ee->w = w;
  409. +      ee->req.h = ee->h = h;
  410. +      evas_output_size_set(ee->evas, ee->w, ee->h);
  411. +      evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
  412. +      ecore_psl1ght_resolution_set (w, h);
  413. +      evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
  414. +
  415. +      _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
  416. +          _ecore_evas_time_get());
  417. +      if (ee->func.fn_resize) ee->func.fn_resize(ee);
  418. +   }
  419. +}
  420. +
  421. +static void
  422.  _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
  423.  {
  424.     if ((w == ee->w) && (h == ee->h)) return;
  425.     ee->w = w;
  426.     ee->h = h;
  427.  
  428. -   /* TODO: see real resolution and move evas to center on screen */
  429.     evas_output_size_set(ee->evas, ee->w, ee->h);
  430. +
  431.     evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
  432.     evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
  433.  
  434.     ecore_psl1ght_resolution_set (w, h);
  435.  
  436.     if (ee->func.fn_resize) ee->func.fn_resize(ee);
  437. +
  438. +   _ecore_evas_screen_resized (ee);
  439.  }
  440.  
  441.  static void
  442. @@ -222,6 +254,15 @@ _ecore_evas_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int
  443.  }
  444.  
  445.  static void
  446. +_ecore_evas_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h)
  447. +{
  448. +   if (x) *x = 0;
  449. +   if (y) *y = 0;
  450. +   ecore_psl1ght_optimal_screen_resolution_get (w, h);
  451. +   printf ("screen_geometry_get : %dx%d\n", w?*w:0, h?*h:0);
  452. +}
  453. +
  454. +static void
  455.  _ecore_evas_object_cursor_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
  456.  {
  457.     Ecore_Evas *ee;
  458. @@ -313,7 +354,7 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func =
  459.     NULL, //transparent
  460.  
  461.     NULL, // render
  462. -   NULL  // screen_geometry_get
  463. +   _ecore_evas_screen_geometry_get  // screen_geometry_get
  464.  };
  465.  
  466.  EAPI Ecore_Evas*
  467. @@ -348,7 +389,7 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
  468.     ee->prop.borderless = 1;
  469.     ee->prop.override = 1;
  470.     ee->prop.maximized = 1;
  471. -   ee->prop.fullscreen = 1;
  472. +   ee->prop.fullscreen = 0;
  473.     ee->prop.withdrawn = 0;
  474.     ee->prop.sticky = 0;
  475.     ee->prop.window = 0;
  476. @@ -400,8 +441,11 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
  477.  
  478.     psl1ght_ee = ee;
  479.  
  480. -   evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
  481. +   evas_event_feed_mouse_in(ee->evas, _ecore_evas_time_get (), NULL);
  482.     evas_focus_in(ee->evas);
  483. +   _ecore_evas_screen_resized (ee);
  484. +
  485. +   ecore_evas_cursor_set(ee, "/app_home/cursor.png", EVAS_LAYER_MAX, 0, 0);
  486.  
  487.     return ee;
  488.  }
  489. diff --git a/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h b/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
  490. index fc2d07b..e689b2b 100644
  491. --- a/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
  492. +++ b/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
  493. @@ -111,6 +111,9 @@ EAPI int        ecore_psl1ght_shutdown(void);
  494.  EAPI void       ecore_psl1ght_resolution_set(int width, int height);
  495.  EAPI void       ecore_psl1ght_poll_events(void);
  496.  
  497. +EAPI void ecore_psl1ght_screen_resolution_get (int *w, int *h);
  498. +EAPI void ecore_psl1ght_optimal_screen_resolution_get (int *w, int *h);
  499. +
  500.  #ifdef __cplusplus
  501.  }
  502.  #endif
  503. diff --git a/ecore/src/lib/ecore_psl1ght/Makefile.am b/ecore/src/lib/ecore_psl1ght/Makefile.am
  504. index b72945b..8e7328a 100644
  505. --- a/ecore/src/lib/ecore_psl1ght/Makefile.am
  506. +++ b/ecore/src/lib/ecore_psl1ght/Makefile.am
  507. @@ -16,7 +16,9 @@ includes_HEADERS = Ecore_Psl1ght.h
  508.  includesdir = $(includedir)/ecore-@VMAJ@
  509.  
  510.  libecore_psl1ght_la_SOURCES = \
  511. -ecore_psl1ght.c
  512. +ecore_psl1ght.c \
  513. +moveutil.c \
  514. +spursutil.c
  515.  
  516.  libecore_psl1ght_la_LIBADD = \
  517.  $(top_builddir)/src/lib/ecore/libecore.la \
  518. diff --git a/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c b/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
  519. index 89e66dc..6bdd8a4 100644
  520. --- a/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
  521. +++ b/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
  522. @@ -4,9 +4,15 @@
  523.  
  524.  #include <sysutil/video.h>
  525.  #include <sysutil/sysutil.h>
  526. +#include <sysmodule/sysmodule.h>
  527.  #include <io/pad.h>
  528.  #include <io/mouse.h>
  529.  #include <io/kb.h>
  530. +#include <io/camera.h>
  531. +#include <io/move.h>
  532. +#include <sys/process.h>
  533. +
  534. +#include "moveutil.h"
  535.  
  536.  #include "Eina.h"
  537.  #include "Ecore_Psl1ght.h"
  538. @@ -16,6 +22,9 @@
  539.  #include "ecore_private.h"
  540.  #include "Ecore_Psl1ght_Keys.h"
  541.  
  542. +/* Allocate 1MB stack to avoid overflows */
  543. +SYS_PROCESS_PARAM( 1001, 0x100000 );
  544. +
  545.  int _ecore_psl1ght_log_dom = -1;
  546.  
  547.  EAPI int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0;
  548. @@ -26,14 +35,24 @@ EAPI int ECORE_PSL1GHT_EVENT_EXPOSE = 0;
  549.  static int _ecore_psl1ght_init_count = 0;
  550.  static int window_width = 0;
  551.  static int window_height = 0;
  552. +/* Mouse support */
  553.  static int mouse_connected = FALSE;
  554.  static u8 mouse_buttons = 0;
  555.  static int mouse_x = 0;
  556.  static int mouse_y = 0;
  557. +/* Keyboard support */
  558.  static int keyboard_connected = FALSE;
  559.  static KbLed keyboard_leds = {{0}};
  560.  static KbMkey keyboard_mods = {{0}};
  561.  static u16 keyboard_old_key = 0;
  562. +/* Pad support */
  563. +static padData pad_data;
  564. +static int pad_old_x = 0;
  565. +static int pad_old_o = 0;
  566. +/* Move support */
  567. +static int move_connected = FALSE;
  568. +static moveContext *move_context = NULL;
  569. +u16 move_buttons = 0;
  570.  
  571.  static void xmb_event_handler (u64 status, u64 param, void * user_data);
  572.  
  573. @@ -55,6 +74,7 @@ ecore_psl1ght_init(const char *name __UNUSED__)
  574.  {
  575.     videoState state;
  576.     videoResolution resolution;
  577. +   int ret, camera_loaded, gem_loaded;
  578.  
  579.     if(++_ecore_psl1ght_init_count != 1)
  580.       return _ecore_psl1ght_init_count;
  581. @@ -85,9 +105,40 @@ ecore_psl1ght_init(const char *name __UNUSED__)
  582.          return --_ecore_psl1ght_init_count;
  583.       }
  584.  
  585. +   /* Pad support */
  586.     ioPadInit (7);
  587. +   /* Mouse support */
  588.     ioMouseInit(2);
  589. +   mouse_buttons = 0;
  590. +   mouse_x = 0;
  591. +   mouse_y = 0;
  592. +
  593. +   /* Keyboard support */
  594.     ioKbInit(2);
  595. +   keyboard_leds._KbLedU.leds = 0;
  596. +   keyboard_mods._KbMkeyU.mkeys = 0;
  597. +
  598. +   /* Initialize Move */
  599. +   move_context = NULL;
  600. +   move_buttons = 0;
  601. +
  602. +   camera_loaded = !sysModuleIsLoaded (SYSMODULE_CAMERA);
  603. +   if (!camera_loaded)
  604. +      ret = sysModuleLoad (SYSMODULE_CAMERA);
  605. +   else
  606. +      ret = 0;
  607. +   if (ret == 0) {
  608. +      gem_loaded = !sysModuleIsLoaded (SYSMODULE_GEM);
  609. +      if (!gem_loaded)
  610. +         ret = sysModuleLoad (SYSMODULE_GEM);
  611. +      if (ret == 0) {
  612. +         move_context = initMove ();
  613. +      } else {
  614. +         if (gem_loaded)
  615. +            sysModuleUnload (SYSMODULE_CAMERA);
  616. +      }
  617. +   }
  618. +
  619.     sysUtilRegisterCallback (SYSUTIL_EVENT_SLOT0, xmb_event_handler, NULL);
  620.  
  621.     ECORE_PSL1GHT_EVENT_GOT_FOCUS     = ecore_event_type_new();
  622. @@ -125,6 +176,14 @@ ecore_psl1ght_shutdown(void)
  623.     ioPadEnd();
  624.     ioMouseEnd();
  625.     ioKbEnd();
  626. +
  627. +   if (move_context) {
  628. +      endMove (move_context);
  629. +      move_context = NULL;
  630. +      sysModuleUnload (SYSMODULE_CAMERA);
  631. +      sysModuleUnload (SYSMODULE_GEM);
  632. +   }
  633. +
  634.     sysUtilUnregisterCallback(SYSUTIL_EVENT_SLOT0);
  635.  
  636.     return _ecore_psl1ght_init_count;
  637. @@ -312,7 +371,7 @@ _ecore_psl1ght_event_key(u16 key)
  638.  }
  639.  
  640.  static void
  641. -_ecore_psl1ght_mouse_move (s8 x_axis, s8 y_axis)
  642. +_ecore_psl1ght_mouse_move (s32 x_axis, s32 y_axis)
  643.  {
  644.     Ecore_Event_Mouse_Move *ev;
  645.  
  646. @@ -326,6 +385,7 @@ _ecore_psl1ght_mouse_move (s8 x_axis, s8 y_axis)
  647.     if (mouse_x > window_width) mouse_x = window_width;
  648.     if (mouse_y > window_height) mouse_y = window_height;
  649.  
  650. +   printf ("New mouse position : %d,%d\n", mouse_x, mouse_y);
  651.     ev->window = 0;
  652.     ev->root_window = 0;
  653.     ev->event_window = 0;
  654. @@ -413,13 +473,11 @@ _ecore_psl1ght_poll_joypad (void)
  655.          if (padinfo.status[i])
  656.            {
  657.               int analog_h, analog_v;
  658. -             static padData paddata;
  659. -             static int old_x = 0, old_o = 0;
  660.  
  661. -             if (ioPadGetData (i, &paddata) != 0)
  662. +             if (ioPadGetData (i, &pad_data) != 0)
  663.                  continue;
  664. -             analog_h = paddata.ANA_L_H - 0x80;
  665. -             analog_v = paddata.ANA_L_V - 0x80;
  666. +             analog_h = pad_data.ANA_L_H - 0x80;
  667. +             analog_v = pad_data.ANA_L_V - 0x80;
  668.  
  669.               if (analog_h > PAD_STICK_DEADZONE)
  670.                  analog_h -= PAD_STICK_DEADZONE;
  671. @@ -440,12 +498,12 @@ _ecore_psl1ght_poll_joypad (void)
  672.               if(analog_h != 0 || analog_v != 0)
  673.                  _ecore_psl1ght_mouse_move (analog_h, analog_v);
  674.  
  675. -             if (old_x != paddata.BTN_CROSS)
  676. -                _ecore_psl1ght_mouse_button (1, paddata.BTN_CROSS);
  677. -             if (old_o != paddata.BTN_CIRCLE)
  678. -                _ecore_psl1ght_mouse_button (3, paddata.BTN_CIRCLE);
  679. -             old_x = paddata.BTN_CROSS;
  680. -             old_o = paddata.BTN_CIRCLE;
  681. +             if (pad_old_x != pad_data.BTN_CROSS)
  682. +                _ecore_psl1ght_mouse_button (1, pad_data.BTN_CROSS);
  683. +             if (pad_old_o != pad_data.BTN_CIRCLE)
  684. +                _ecore_psl1ght_mouse_button (3, pad_data.BTN_CIRCLE);
  685. +             pad_old_x = pad_data.BTN_CROSS;
  686. +             pad_old_o = pad_data.BTN_CIRCLE;
  687.  
  688.               //pad_buttons = paddata.buttons;
  689.            }
  690. @@ -513,6 +571,72 @@ _ecore_psl1ght_poll_mouse (void)
  691.  }
  692.  
  693.  static void
  694. +_ecore_psl1ght_poll_move (void)
  695. +{
  696. +   int i;
  697. +   u16 new_buttons;
  698. +   static int t_pressed = 0;
  699. +   static int calibrated = 0;
  700. +   static float prev_x = 0;
  701. +   static float prev_y = 0;
  702. +   static int gyro = 0;
  703. +   float x, y, z;
  704. +
  705. +   /* Check move events */
  706. +   processMove (move_context);
  707. +   new_buttons = move_context->state.paddata.buttons & (~move_buttons);
  708. +   move_buttons = move_context->state.paddata.buttons;
  709. +
  710. +   moveGet3DPosition (move_context, &x, &y, &z);
  711. +   //printf ("Move 3D position is : %f, %f, %f\n", x,y,z);
  712. +
  713. +   switch (new_buttons) {
  714. +     case 1:
  715. +        gyro = !gyro;
  716. +        break;
  717. +     case 4:
  718. +        // Move button
  719. +        printf ("Calibrating\n");
  720. +        gemCalibrate (0);
  721. +        calibrated = 1;
  722. +        break;
  723. +     case 8:
  724. +        // start button
  725. +        _ecore_psl1ght_mouse_move ((window_width / 2) - mouse_x, (window_height / 2) - mouse_y);
  726. +        break;
  727. +   }
  728. +
  729. +   if (calibrated) {
  730. +      float x_axis, y_axis;
  731. +
  732. +      if (gyro) {
  733. +         gemInertialState gem_inert;
  734. +
  735. +         gemGetInertialState (0, 0, 0, &gem_inert);
  736. +         x_axis = -vec_array (gem_inert.gyro, 1)*25;
  737. +         y_axis = -vec_array (gem_inert.gyro, 0)*25;
  738. +         if (abs (x_axis) > 2 || abs (y_axis) > 2)
  739. +         _ecore_psl1ght_mouse_move (x_axis, y_axis);
  740. +      } else {
  741. +         x_axis = (x - prev_x)*2.5;
  742. +         y_axis = -(y - prev_y)*2.5;
  743. +         prev_x = x;
  744. +         prev_y = y;
  745. +         _ecore_psl1ght_mouse_move (x_axis, y_axis);
  746. +      }
  747. +
  748. +      if (!t_pressed && (move_buttons & 0x2)) {
  749. +         printf ("T pressed\n");
  750. +         _ecore_psl1ght_mouse_button (1, 1);
  751. +      } else if (t_pressed && (move_buttons & 0x2) == 0) {
  752. +         printf ("T released\n");
  753. +         _ecore_psl1ght_mouse_button (1, 0);
  754. +      }
  755. +      t_pressed = move_buttons & 0x2;
  756. +   }
  757. +}
  758. +
  759. +static void
  760.  _ecore_psl1ght_poll_keyboard (void)
  761.  {
  762.     KbInfo kbInfo;
  763. @@ -587,6 +711,7 @@ xmb_event_handler (u64 status, u64 param, void * user_data)
  764.  {
  765.     printf ("Received event %lX\n", status);
  766.     if (status == SYSUTIL_EXIT_GAME) {
  767. +      ecore_main_loop_quit();
  768.     } else if (status == SYSUTIL_MENU_OPEN) {
  769.     } else if (status == SYSUTIL_MENU_CLOSE) {
  770.     } else if (status == SYSUTIL_DRAW_BEGIN) {
  771. @@ -600,18 +725,11 @@ ecore_psl1ght_poll_events(void)
  772.  
  773.     _ecore_psl1ght_poll_joypad ();
  774.     _ecore_psl1ght_poll_mouse ();
  775. +   if (move_context)
  776. +      _ecore_psl1ght_poll_move ();
  777.     _ecore_psl1ght_poll_keyboard ();
  778.  
  779.     sysUtilCheckCallback ();
  780. -
  781. -  /*
  782. -          case PSL1GHT_VIDEOEXPOSE:
  783. -             ecore_event_add(ECORE_PSL1GHT_EVENT_EXPOSE, NULL, NULL, NULL);
  784. -             break;
  785. -          case PSL1GHT_QUIT:
  786. -             ecore_main_loop_quit();
  787. -             break;
  788. -  */
  789.  }
  790.  
  791.  EAPI void
  792. @@ -622,3 +740,45 @@ ecore_psl1ght_resolution_set (int width, int height)
  793.     if (mouse_x > window_width) mouse_x = window_width;
  794.     if (mouse_y > window_height) mouse_y = window_height;
  795.  }
  796. +
  797. +EAPI void
  798. +ecore_psl1ght_screen_resolution_get (int *w, int *h)
  799. +{
  800. +  videoState state;
  801. +  videoResolution resolution;
  802. +
  803. +  /* Get the state of the display */
  804. +  if (videoGetState (0, 0, &state) == 0 &&
  805. +      videoGetResolution (state.displayMode.resolution, &resolution) == 0) {
  806. +    if (w) *w = resolution.width;
  807. +    if (h) *h = resolution.height;
  808. +  } else {
  809. +    if (w) *w = 0;
  810. +    if (h) *h = 0;
  811. +  }
  812. +}
  813. +
  814. +EAPI void
  815. +ecore_psl1ght_optimal_screen_resolution_get (int *w, int *h)
  816. +{
  817. +  videoDeviceInfo info;
  818. +  videoResolution res;
  819. +  int area = 720 * 480;
  820. +  int mode_area;
  821. +  int i;
  822. +
  823. +  if (w) *w = 720;
  824. +  if (h) *h = 480;
  825. +
  826. +  videoGetDeviceInfo(0, 0, &info);
  827. +
  828. +  for (i = 0; i < info.availableModeCount; i++) {
  829. +    videoGetResolution (info.availableModes[i].resolution, &res);
  830. +    mode_area = res.width * res.height;
  831. +    if (mode_area > area) {
  832. +      area = mode_area;
  833. +      if (w) *w = res.width;
  834. +      if (h) *h = res.height;
  835. +    }
  836. +  }
  837. +}
  838. diff --git a/elementary/configure.ac b/elementary/configure.ac
  839. index 447f0f9..a612f6c 100644
  840. --- a/elementary/configure.ac
  841. +++ b/elementary/configure.ac
  842. @@ -220,18 +220,10 @@ PKG_CHECK_MODULES([ELEMENTARY],
  843.      ecore-evas >= 1.0.999
  844.      ecore-file >= 1.0.999
  845.      ecore-imf >= 1.0.999
  846. +    ecore-con >= 1.0.999
  847.      edje >= 1.0.999
  848.     ]
  849.  )
  850. -PKG_CHECK_MODULES([ELEMENTARY_MAP],
  851. -    ecore-con >= 1.0.999, [have_ecore_con="yes"], [have_ecore_con="no"])
  852. -
  853. -if test "x${have_ecore_con}" = "xyes" ; then
  854. -   ELEMENTARY_CFLAGS="$ELEMENTARY_CFLAGS $ELEMENTARY_MAP_CFLAGS"
  855. -   ELEMENTARY_LDFLAGS="$ELEMENTARY_LDFLAGS $ELEMENTARY_MAP_LDFLAGS"
  856. -   ELEMENTARY_LIBS="$ELEMENTARY_LIBS $ELEMENTARY_MAP_LIBS"
  857. -fi
  858. -AM_CONDITIONAL([BUILD_ELEMENTARY_MAP], [test "x${have_ecore_con}" = "xyes"])
  859.  
  860.  PKG_CHECK_MODULES([EIO],
  861.     [eio],
  862. diff --git a/elementary/src/bin/Makefile.am b/elementary/src/bin/Makefile.am
  863. index 95a59ca..43fa6c3 100644
  864. --- a/elementary/src/bin/Makefile.am
  865. +++ b/elementary/src/bin/Makefile.am
  866. @@ -76,6 +76,7 @@ test_label.c \
  867.  test_launcher.c \
  868.  test_layout.c \
  869.  test_list.c \
  870. +test_map.c \
  871.  test_menu.c \
  872.  test_multi.c \
  873.  test_naviframe.c \
  874. @@ -109,10 +110,6 @@ if HAVE_EIO
  875.  elementary_test_SOURCES += test_eio.c
  876.  endif
  877.  
  878. -if BUILD_ELEMENTARY_MAP
  879. -elementary_test_SOURCES += test_map.c
  880. -endif
  881. -
  882.  elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
  883.     @ELEMENTARY_EWEATHER_LIBS@ \
  884.     @ELEMENTARY_EDBUS_LIBS@ \
  885. diff --git a/elementary/src/bin/config.c b/elementary/src/bin/config.c
  886. index 72d01e9..b7dad06 100644
  887. --- a/elementary/src/bin/config.c
  888. +++ b/elementary/src/bin/config.c
  889. @@ -2622,6 +2622,7 @@ _elm_engine_supported(const char *engine)
  890.        "opengl_x11",
  891.        "software_gdi",
  892.        "software_16_wince_gdi",
  893. +      "psl1ght",
  894.        "sdl",
  895.        "software_16_sdl",
  896.        "opengl_sdl",
  897. diff --git a/elementary/src/bin/test.c b/elementary/src/bin/test.c
  898. index 8bb1c42..a56e87a 100644
  899. --- a/elementary/src/bin/test.c
  900. +++ b/elementary/src/bin/test.c
  901. @@ -497,7 +497,11 @@ elm_main(int argc, char **argv)
  902.               autorun = argv[2];
  903.            }
  904.       }
  905. -
  906. +   else
  907. +     {
  908. +       test_win_only = EINA_TRUE;
  909. +       autorun = "3D";
  910. +     }
  911.     /* put here any init specific to this app like parsing args etc. */
  912.     my_win_main(autorun, test_win_only); /* create main window */
  913.     elm_run(); /* and run the program now  and handle all events etc. */
  914. diff --git a/elementary/src/bin/test_anim.c b/elementary/src/bin/test_anim.c
  915. index 9711a6e..ed3c754 100644
  916. --- a/elementary/src/bin/test_anim.c
  917. +++ b/elementary/src/bin/test_anim.c
  918. @@ -32,7 +32,7 @@ anim(void *data)
  919.  
  920.     evas_output_viewport_get(evas_object_evas_get(win), 0, 0, &vw, &vh);
  921.     r = 48;
  922. -   t = ecore_loop_time_get();
  923. +   t = ((double)((long) (ecore_loop_time_get() * 1000000) % 1000000000)) / 1000000;
  924.     fac = 2.0 / (double)((sizeof(names) / sizeof(char *) / 2));
  925.     evas_pointer_canvas_xy_get(evas_object_evas_get(win), &x, &y);
  926.     lx = x;
  927. @@ -43,7 +43,7 @@ anim(void *data)
  928.          bub = evas_object_data_get(win, names[i * 2]);
  929.          sh = evas_object_data_get(win, names[(i * 2) + 1]);
  930.          zz = (((2 + sin(t * 6 + (M_PI * (i * fac)))) / 3) * 64) * 2;
  931. -        xx = (cos(t * 4 + (M_PI * (i * fac))) * r) * 2;
  932. +        xx = (cos(t * 4 + (M_PI * (i * fac))) * r) * 2 ;
  933.          yy = (sin(t * 6 + (M_PI * (i * fac))) * r) * 2;
  934.  
  935.          w = zz;
  936. diff --git a/elementary/src/lib/Elementary.h.in b/elementary/src/lib/Elementary.h.in
  937. index 8a2e584..140a23c 100644
  938. --- a/elementary/src/lib/Elementary.h.in
  939. +++ b/elementary/src/lib/Elementary.h.in
  940. @@ -373,7 +373,7 @@ contact with the developers and maintainers.
  941.  #include <Ecore_Evas.h>
  942.  #include <Ecore_File.h>
  943.  #include <Ecore_IMF.h>
  944. -//#include <Ecore_Con.h>
  945. +#include <Ecore_Con.h>
  946.  #include <Edje.h>
  947.  
  948.  #ifndef PATH_MAX
  949. @@ -1877,6 +1877,7 @@ extern "C" {
  950.      * @li "opengl_x11"
  951.      * @li "software_gdi"
  952.      * @li "software_16_wince_gdi"
  953. +    * @li "psl1ght"
  954.      * @li "sdl"
  955.      * @li "software_16_sdl"
  956.      * @li "opengl_sdl"
  957. @@ -3495,6 +3496,7 @@ extern "C" {
  958.      * exits)
  959.      * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software
  960.      * rendering)
  961. +    * @li "psl1ght" (PS3 rendering using PSL1GHT)
  962.      * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL
  963.      * buffer)
  964.      * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2
  965. diff --git a/elementary/src/lib/Makefile.am b/elementary/src/lib/Makefile.am
  966. index 16e6dc2..04f0313 100644
  967. --- a/elementary/src/lib/Makefile.am
  968. +++ b/elementary/src/lib/Makefile.am
  969. @@ -85,6 +85,7 @@ elm_layout.c \
  970.  elm_list.c \
  971.  elm_main.c \
  972.  elm_mapbuf.c \
  973. +elm_map.c \
  974.  elm_menu.c \
  975.  elm_notify.c \
  976.  elm_pager.c \
  977. @@ -123,10 +124,6 @@ els_scroller.c \
  978.  els_scroller.h \
  979.  els_tooltip.c
  980.  
  981. -if BUILD_ELEMENTARY_MAP
  982. -libelementary_la_SOURCES += elm_map.c
  983. -endif
  984. -
  985.  libelementary_la_CFLAGS =
  986.  libelementary_la_LIBADD = \
  987.  @my_libs@ \
  988. diff --git a/elementary/src/lib/elm_config.c b/elementary/src/lib/elm_config.c
  989. index 319a0d5..5ef2d79 100644
  990. --- a/elementary/src/lib/elm_config.c
  991. +++ b/elementary/src/lib/elm_config.c
  992. @@ -27,6 +27,7 @@ const char *_elm_engines[] = {
  993.     "opengl_x11",
  994.     "software_gdi",
  995.     "software_16_wince_gdi",
  996. +   "psl1ght",
  997.     "sdl",
  998.     "software_16_sdl",
  999.     "opengl_sdl",
  1000. @@ -1017,7 +1018,7 @@ _config_sub_apply(void)
  1001.     edje_scale_set(_elm_config->scale);
  1002.     edje_password_show_last_set(_elm_config->password_show_last);
  1003.     edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
  1004. -   if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
  1005. +   //if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
  1006.  }
  1007.  
  1008.  static Eina_Bool
  1009. @@ -1445,6 +1446,8 @@ _env_get(void)
  1010.          else if ((!strcasecmp(s, "directfb")) ||
  1011.                   (!strcasecmp(s, "dfb")))
  1012.            eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_DIRECTFB);
  1013. +        else if ((!strcasecmp(s, "psl1ght")))
  1014. +          eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_PSL1GHT);
  1015.          else if ((!strcasecmp(s, "sdl")) ||
  1016.                   (!strcasecmp(s, "software-sdl")) ||
  1017.                   (!strcasecmp(s, "software_sdl")))
  1018. diff --git a/elementary/src/lib/elm_main.c b/elementary/src/lib/elm_main.c
  1019. index 2f2ea11..b07fc93 100644
  1020. --- a/elementary/src/lib/elm_main.c
  1021. +++ b/elementary/src/lib/elm_main.c
  1022. @@ -386,7 +386,7 @@ elm_quicklaunch_init(int    argc,
  1023.  
  1024.     if (argv) _elm_appname = strdup(ecore_file_file_get(argv[0]));
  1025.  
  1026. -   pfx = eina_prefix_new(NULL, elm_quicklaunch_init,
  1027. +   pfx = eina_prefix_new(argv[0], elm_quicklaunch_init,
  1028.                           "ELM", "elementary", "config/profile.cfg",
  1029.                           PACKAGE_LIB_DIR, /* don't have a bin dir currently */
  1030.                           PACKAGE_LIB_DIR,
  1031. @@ -421,7 +421,7 @@ elm_quicklaunch_sub_init(int    argc,
  1032.          ecore_app_args_set(argc, (const char **)argv);
  1033.          evas_init();
  1034.          edje_init();
  1035. -        _elm_module_init();
  1036. +        //_elm_module_init();
  1037.          _elm_config_sub_init();
  1038.  #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
  1039.          if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
  1040. @@ -456,7 +456,7 @@ elm_quicklaunch_sub_shutdown(void)
  1041.     if (!quicklaunch_on)
  1042.       {
  1043.          _elm_win_shutdown();
  1044. -        _elm_module_shutdown();
  1045. +        //_elm_module_shutdown();
  1046.          ecore_con_url_shutdown();
  1047.          ecore_con_shutdown();
  1048.          ecore_imf_shutdown();
  1049. @@ -727,7 +727,7 @@ elm_quicklaunch_fork(int    argc,
  1050.            }
  1051.          ecore_evas_init(); // FIXME: check errors
  1052.          ecore_imf_init();
  1053. -        _elm_module_init();
  1054. +        //_elm_module_init();
  1055.  #endif
  1056.       }
  1057.  
  1058. diff --git a/elementary/src/lib/elm_priv.h b/elementary/src/lib/elm_priv.h
  1059. index a715a0e..af16f5a 100644
  1060. --- a/elementary/src/lib/elm_priv.h
  1061. +++ b/elementary/src/lib/elm_priv.h
  1062. @@ -75,10 +75,11 @@ extern const char *_elm_engines[];
  1063.  #define ELM_OPENGL_X11        (_elm_engines[6])
  1064.  #define ELM_SOFTWARE_WIN32    (_elm_engines[7])
  1065.  #define ELM_SOFTWARE_16_WINCE (_elm_engines[8])
  1066. -#define ELM_SOFTWARE_SDL      (_elm_engines[9])
  1067. -#define ELM_SOFTWARE_16_SDL   (_elm_engines[10])
  1068. -#define ELM_OPENGL_SDL        (_elm_engines[11])
  1069. -#define ELM_BUFFER            (_elm_engines[12])
  1070. +#define ELM_SOFTWARE_PSL1GHT  (_elm_engines[9])
  1071. +#define ELM_SOFTWARE_SDL      (_elm_engines[10])
  1072. +#define ELM_SOFTWARE_16_SDL   (_elm_engines[11])
  1073. +#define ELM_OPENGL_SDL        (_elm_engines[12])
  1074. +#define ELM_BUFFER            (_elm_engines[13])
  1075.  
  1076.  #define ELM_FONT_TOKEN_STYLE ":style="
  1077.  
  1078. diff --git a/elementary/src/lib/elm_win.c b/elementary/src/lib/elm_win.c
  1079. index 9b3f0ca..0705543 100644
  1080. --- a/elementary/src/lib/elm_win.c
  1081. +++ b/elementary/src/lib/elm_win.c
  1082. @@ -1350,9 +1350,9 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
  1083.  #define FALLBACK_TRY(engine)                                              \
  1084.     if (!win->ee)                                                          \
  1085.     do {                                                                   \
  1086. -        CRITICAL(engine " engine creation failed. Trying software X11."); \
  1087. +        CRITICAL(engine " engine creation failed. Trying to find one.");  \
  1088.          elm_engine_set(ELM_SOFTWARE_X11);                                 \
  1089. -        win->ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1);       \
  1090. +        win->ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL);       \
  1091.     } while (0)
  1092.  #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
  1093.  
  1094. @@ -1386,6 +1386,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
  1095.               win->client_message_handler = ecore_event_handler_add
  1096.                  (ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, win);
  1097.  #endif
  1098. +             FALLBACK_TRY("Sofware X11");
  1099.            }
  1100.          else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
  1101.            {
  1102. @@ -1458,6 +1459,11 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
  1103.               win->ee = ecore_evas_software_wince_gdi_new(NULL, 0, 0, 1, 1);
  1104.               FALLBACK_TRY("Sofware-16-WinCE");
  1105.            }
  1106. +        else if (ENGINE_COMPARE(ELM_SOFTWARE_PSL1GHT))
  1107. +          {
  1108. +             win->ee = ecore_evas_psl1ght_new(NULL, 1, 1);
  1109. +             FALLBACK_TRY("PSL1GHT");
  1110. +          }
  1111.          else if (ENGINE_COMPARE(ELM_SOFTWARE_SDL))
  1112.            {
  1113.               win->ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
  1114. @@ -1484,13 +1490,18 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
  1115.               win->shot.info = eina_stringshare_add(_elm_config->engine + 5);
  1116.               _shot_init(win);
  1117.            }
  1118. +        else
  1119. +          {
  1120. +             CRITICAL("Unknown engine : %s", _elm_config->engine);
  1121. +             FALLBACK_TRY("Unknown engine ");
  1122. +          }
  1123.  #undef FALLBACK_TRY
  1124.          break;
  1125.       }
  1126.  
  1127.     if (!win->ee)
  1128.       {
  1129. -        ERR("Cannot create window.");
  1130. +        ERR("Cannot create window with engine %s.", _elm_config->engine);
  1131.          free(win);
  1132.          return NULL;
  1133.       }
  1134. diff --git a/evas/src/modules/engines/psl1ght/evas_engine.c b/evas/src/modules/engines/psl1ght/evas_engine.c
  1135. index b072995..d84be2c 100644
  1136. --- a/evas/src/modules/engines/psl1ght/evas_engine.c
  1137. +++ b/evas/src/modules/engines/psl1ght/evas_engine.c
  1138. @@ -392,6 +392,14 @@ eng_output_flush(void *data)
  1139.        gcm_scale.inY = 0;
  1140.        gcm_scale.inW = (width & ~1); // Width must be a multiple of 2
  1141.        gcm_scale.inH = height;
  1142. +      if (gcm_scale.inW < 2) // Minimum inW value is 2
  1143. +        gcm_scale.inW = 2;
  1144. +      if (gcm_scale.inW > 2046) // Maximum inW value is 2046
  1145. +        gcm_scale.inW = 2046;
  1146. +      if (gcm_scale.inH < 1) // Minimum inH value is 1
  1147. +        gcm_scale.inH = 1;
  1148. +      if (gcm_scale.inH > 2047) // Maximum inW value is 2047
  1149. +        gcm_scale.inH = 2047;
  1150.        gcm_scale.pitch = sizeof(u32) * width;
  1151.  
  1152.  
  1153. diff --git a/evas/src/modules/engines/psl1ght/rsxutil.c b/evas/src/modules/engines/psl1ght/rsxutil.c
  1154. index 16d1378..a2f947d 100644
  1155. --- a/evas/src/modules/engines/psl1ght/rsxutil.c
  1156. +++ b/evas/src/modules/engines/psl1ght/rsxutil.c
  1157. @@ -119,9 +119,9 @@ getPreferredResolution (u16 width, u16 height)
  1158.    videoResolution res;
  1159.    int area = width * height;
  1160.    int mode_area;
  1161. -  int min_area_diff = abs (area - (1920 * 1080));
  1162. +  int min_area_diff = abs (area - (720 * 480));
  1163.    int area_diff;
  1164. -  u8 resolution = VIDEO_RESOLUTION_1080;
  1165. +  u8 resolution = VIDEO_RESOLUTION_480;
  1166.    int i;
  1167.  
  1168.    videoGetDeviceInfo(0, 0, &info);
  1169. @@ -228,9 +228,6 @@ initScreen (void *host_addr, u32 size)
  1170.    if (context)
  1171.      rsxFinish (context, 0);
  1172.  
  1173. -  if (host_addr)
  1174. -    free (host_addr);
  1175. -
  1176.    return NULL;
  1177.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top