Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/devs/kakaroto/build_ps3efl.sh b/devs/kakaroto/build_ps3efl.sh
- index ffcd8ef..4f3c40b 100755
- --- a/devs/kakaroto/build_ps3efl.sh
- +++ b/devs/kakaroto/build_ps3efl.sh
- @@ -16,8 +16,8 @@ ESKISS_DATADIR="/dev_hdd0/game/$ESKISS_APPID/USRDIR/"
- MINIMAL_TOC="-mminimal-toc"
- #DEBUG_CFLAGS="-g -ggdb -O0"
- DEBUG_CFLAGS="-g -O3"
- -CONFIGURE=1
- -CLEAN_RULE="clean"
- +CONFIGURE=0
- +CLEAN_RULE=""
- FSELF="make_fself"
- 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" '
- @@ -103,6 +103,7 @@ function escape {
- function eina {
- cd eina || return 1
- if [ $CONFIGURE == "1" ]; then
- + #MYCFLAGS="-DDEBUG"
- ps3-configure || return 1
- fi
- make $CLEAN_RULE all && \
- @@ -137,7 +138,7 @@ function expat {
- function fontconfig {
- cd fontconfig-2.8.0 || return 1
- if [ $CONFIGURE == "1" ]; then
- - ps3-configure --with-arch=powerpc64 --disable-docs || return 1
- + ps3-configure --with-arch=powerpc64 --disable-docs --sysconfdir=/app_home || return 1
- fi
- if test $CLEAN_RULE != "" ; then
- @@ -182,7 +183,7 @@ function ecore {
- cd ecore || return 1
- if [ $CONFIGURE == "1" ]; then
- - 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
- + 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
- fi
- make $CLEAN_RULE all && \
- ps3-smi && \
- @@ -253,10 +254,16 @@ function elementary {
- ## TODO!! remove dlopen
- cd elementary || return 1
- if [ $CONFIGURE == "1" ]; then
- - ps3-configure --disable-quick-launch --disable-elementary-config --disable-elementary-test || return 1
- + ps3-configure --disable-quick-launch --datadir=/app_home || return 1
- fi
- make $CLEAN_RULE all EDJE_CC=edje_cc EET_EET=eet && \
- ps3-smi && \
- + cp src/bin/elementary_config elementary_config.elf && \
- + sprxlinker elementary_config.elf && \
- + make_fself elementary_config.elf elementary_config.self && \
- + cp src/bin/elementary_test elementary_test.elf && \
- + sprxlinker elementary_test.elf && \
- + make_fself elementary_test.elf elementary_test.self && \
- cd ..
- }
- @@ -320,7 +327,7 @@ else
- done
- fi
- -rm *.log
- +#rm *.log
- end=`date +%s`
- ELAPSED=`expr $end - $start`
- diff --git a/ecore/configure.ac b/ecore/configure.ac
- index fd19ce0..be515ad 100644
- --- a/ecore/configure.ac
- +++ b/ecore/configure.ac
- @@ -1328,6 +1328,22 @@ have_openssl="no"
- have_cares="no"
- if test "x${have_ecore_con}" = "xyes" ; then
- + # Verify IPV6 availability in headers
- + have_ipv6="no"
- + AC_CHECK_TYPES([struct ipv6_mreq], [have_ipv6="yes"], [have_ipv6="no"],
- + [[
- +#ifdef HAVE_NETINET_IN_H
- +# include <netinet/in.h>
- +#endif
- +#ifdef HAVE_WS2TCPIP_H
- +# include <ws2tcpip.h>
- +#endif
- + ]])
- +
- + if test "x${have_ipv6}" = "xyes" ; then
- + AC_DEFINE(HAVE_IPV6, 1, [Define if IPV6 is supported])
- + fi
- +
- ECORE_CHECK_CURL([${want_curl}],
- [
- have_curl="yes"
- diff --git a/ecore/ecore-psl1ght.pc.in b/ecore/ecore-psl1ght.pc.in
- index 9479c39..e81f4e8 100644
- --- a/ecore/ecore-psl1ght.pc.in
- +++ b/ecore/ecore-psl1ght.pc.in
- @@ -8,5 +8,5 @@ Description: E core library, PSL1GHT module
- @pkgconfig_requires_private@: @requirements_ecore_psl1ght@
- Version: @VERSION@
- Libs: -L${libdir} -lecore_psl1ght
- -Libs.private: -lio -lsysutil
- +Libs.private: -lio -lsysutil -lgem -lcamera -lspurs
- Cflags: -I${includedir}/ecore-@VMAJ@
- diff --git a/ecore/src/lib/ecore_con/ecore_con.c b/ecore/src/lib/ecore_con/ecore_con.c
- index c59cc7c..812a52a 100644
- --- a/ecore/src/lib/ecore_con/ecore_con.c
- +++ b/ecore/src/lib/ecore_con/ecore_con.c
- @@ -869,7 +869,11 @@ ecore_con_client_port_get(Ecore_Con_Client *cl)
- }
- if (cl->client_addr->sa_family == AF_INET)
- return ((struct sockaddr_in*)cl->client_addr)->sin_port;
- +#ifdef HAVE_IPV6
- return ((struct sockaddr_in6*)cl->client_addr)->sin6_port;
- +#else
- + return -1;
- +#endif
- }
- EAPI double
- @@ -1440,7 +1444,9 @@ _ecore_con_cb_udp_listen(void *data,
- Ecore_Con_Server *svr;
- Ecore_Con_Type type;
- struct ip_mreq mreq;
- +#ifdef HAVE_IPV6
- struct ipv6_mreq mreq6;
- +#endif
- const int on = 1;
- svr = data;
- @@ -1477,6 +1483,7 @@ _ecore_con_cb_udp_listen(void *data,
- goto error;
- }
- }
- +#ifdef HAVE_IPV6
- else if (net_info->info.ai_family == AF_INET6)
- {
- if (!inet_pton(net_info->info.ai_family, net_info->ip,
- @@ -1493,6 +1500,7 @@ _ecore_con_cb_udp_listen(void *data,
- goto error;
- }
- }
- +#endif
- }
- if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on, sizeof(on)) != 0)
- @@ -1765,6 +1773,9 @@ static const char *
- _ecore_con_pretty_ip(struct sockaddr *client_addr,
- socklen_t size)
- {
- +#ifndef HAVE_IPV6
- + char ipbuf[INET_ADDRSTRLEN + 1];
- +#else
- char ipbuf[INET6_ADDRSTRLEN + 1];
- /* show v4mapped address in pretty form */
- @@ -1783,8 +1794,9 @@ _ecore_con_pretty_ip(struct sockaddr *client_addr,
- return eina_stringshare_add(ipbuf);
- }
- }
- +#endif
- - if (getnameinfo(client_addr, size, ipbuf, sizeof (ipbuf), NULL, 0, NI_NUMERICHOST))
- + if (ares_getnameinfo(client_addr, size, ipbuf, sizeof (ipbuf), NULL, 0, NI_NUMERICHOST))
- return eina_stringshare_add("0.0.0.0");
- ipbuf[sizeof(ipbuf) - 1] = 0;
- diff --git a/ecore/src/lib/ecore_con/ecore_con_ares.c b/ecore/src/lib/ecore_con/ecore_con_ares.c
- index 95369d6..74bf091 100644
- --- a/ecore/src/lib/ecore_con/ecore_con_ares.c
- +++ b/ecore/src/lib/ecore_con/ecore_con_ares.c
- @@ -41,7 +41,9 @@ struct _Ecore_Con_CAres
- union {
- struct in_addr v4;
- +#ifdef HAVE_IPV6
- struct in6_addr v6;
- +#endif
- } addr;
- Eina_Bool byaddr : 1;
- @@ -124,7 +126,11 @@ ecore_con_info_tcp_connect(Ecore_Con_Server *svr,
- struct addrinfo hints;
- memset(&hints, 0, sizeof(struct addrinfo));
- +#ifdef HAVE_IPV6
- hints.ai_family = AF_INET6;
- +#else
- + hints.ai_family = AF_INET;
- +#endif
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_CANONNAME;
- hints.ai_protocol = IPPROTO_TCP;
- @@ -143,7 +149,11 @@ ecore_con_info_tcp_listen(Ecore_Con_Server *svr,
- struct addrinfo hints;
- memset(&hints, 0, sizeof(struct addrinfo));
- +#ifdef HAVE_IPV6
- hints.ai_family = AF_INET6;
- +#else
- + hints.ai_family = AF_INET;
- +#endif
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_PASSIVE;
- hints.ai_protocol = IPPROTO_TCP;
- @@ -162,7 +172,11 @@ ecore_con_info_udp_connect(Ecore_Con_Server *svr,
- struct addrinfo hints;
- memset(&hints, 0, sizeof(struct addrinfo));
- +#ifdef HAVE_IPV6
- hints.ai_family = AF_INET6;
- +#else
- + hints.ai_family = AF_INET;
- +#endif
- hints.ai_socktype = SOCK_DGRAM;
- hints.ai_flags = AI_CANONNAME;
- hints.ai_protocol = IPPROTO_UDP;
- @@ -181,7 +195,11 @@ ecore_con_info_udp_listen(Ecore_Con_Server *svr,
- struct addrinfo hints;
- memset(&hints, 0, sizeof(struct addrinfo));
- +#ifdef HAVE_IPV6
- hints.ai_family = AF_INET6;
- +#else
- + hints.ai_family = AF_INET;
- +#endif
- hints.ai_socktype = SOCK_DGRAM;
- hints.ai_flags = AI_PASSIVE;
- hints.ai_protocol = IPPROTO_UDP;
- @@ -200,7 +218,11 @@ ecore_con_info_mcast_listen(Ecore_Con_Server *svr,
- struct addrinfo hints;
- memset(&hints, 0, sizeof(struct addrinfo));
- +#ifdef HAVE_IPV6
- hints.ai_family = AF_INET6;
- +#else
- + hints.ai_family = AF_INET;
- +#endif
- hints.ai_socktype = SOCK_DGRAM;
- hints.ai_flags = 0;
- hints.ai_protocol = IPPROTO_UDP;
- @@ -262,7 +284,11 @@ ecore_con_info_get(Ecore_Con_Server *svr,
- struct addrinfo *hints)
- {
- Ecore_Con_CAres *cares;
- +#ifdef HAVE_IPV6
- int ai_family = AF_INET6;
- +#else
- + int ai_family = AF_INET;
- +#endif
- cares = calloc(1, sizeof(Ecore_Con_CAres));
- if (!cares)
- @@ -288,6 +314,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
- (ares_host_callback)_ecore_con_info_ares_host_cb,
- cares);
- }
- +#ifdef HAVE_IPV6
- else if (inet_pton(AF_INET6, svr->name, &cares->addr.v6) == 1)
- {
- cares->byaddr = EINA_TRUE;
- @@ -298,6 +325,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
- (ares_host_callback)_ecore_con_info_ares_host_cb,
- cares);
- }
- +#endif
- else
- {
- cares->byaddr = EINA_FALSE;
- @@ -432,7 +460,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
- addr = (struct sockaddr *)addri;
- break;
- }
- -
- +#ifdef HAVE_IPV6
- case AF_INET6:
- {
- struct sockaddr_in6 *addri6;
- @@ -454,7 +482,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
- addr = (struct sockaddr *)addri6;
- break;
- }
- -
- +#endif
- default:
- ERR("Unknown addrtype %i", hostent->h_addrtype);
- goto on_error;
- @@ -470,6 +498,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
- case ARES_ENOTFOUND: /* address notfound */
- if (arg->byaddr)
- {
- +#ifdef HAVE_IPV6
- /* This happen when host doesn't have a reverse. */
- if (arg->isv6)
- {
- @@ -492,6 +521,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
- addr = (struct sockaddr *)addri6;
- }
- else
- +#endif
- {
- struct sockaddr_in *addri;
- @@ -511,8 +541,11 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg,
- }
- if (!_ecore_con_info_ares_getnameinfo(arg,
- +#ifdef HAVE_IPV6
- arg->isv6 ? AF_INET6 :
- +#else
- AF_INET,
- +#endif
- NULL, addr,
- addrlen))
- goto on_error;
- diff --git a/ecore/src/lib/ecore_con/ecore_con_local.c b/ecore/src/lib/ecore_con/ecore_con_local.c
- index 1d8afd2..f02cc1f 100644
- --- a/ecore/src/lib/ecore_con/ecore_con_local.c
- +++ b/ecore/src/lib/ecore_con/ecore_con_local.c
- @@ -59,6 +59,9 @@ ecore_con_local_connect(Ecore_Con_Server *svr,
- Eina_Bool (*cb_done)(void *data, Ecore_Fd_Handler *fd_handler),
- void *data __UNUSED__)
- {
- +#ifndef HAVE_LOCAL_SOCKETS
- + return 0;
- +#else
- char buf[4096];
- struct sockaddr_un socket_unix;
- int curstate = 0;
- @@ -158,6 +161,7 @@ ecore_con_local_connect(Ecore_Con_Server *svr,
- if (!svr->delete_me) ecore_con_event_server_add(svr);
- return 1;
- +#endif
- }
- int
- @@ -170,6 +174,7 @@ ecore_con_local_listen(
- void *data
- __UNUSED__)
- {
- +#ifdef HAVE_LOCAL_SOCKETS
- char buf[4096];
- struct sockaddr_un socket_unix;
- struct linger lin;
- @@ -306,6 +311,7 @@ start:
- error_umask:
- umask(pmode);
- error:
- +#endif /* HAVE_LOCAL_SOCKETS */
- return 0;
- }
- diff --git a/ecore/src/lib/ecore_con/ecore_con_url.c b/ecore/src/lib/ecore_con/ecore_con_url.c
- index f6547de..10a298f 100644
- --- a/ecore/src/lib/ecore_con/ecore_con_url.c
- +++ b/ecore/src/lib/ecore_con/ecore_con_url.c
- @@ -21,11 +21,16 @@
- # include <ws2tcpip.h>
- #endif
- +#ifdef HAVE_ESCAPE
- +# include <Escape.h>
- +#endif
- +
- #include "Ecore.h"
- #include "ecore_private.h"
- #include "Ecore_Con.h"
- #include "ecore_con_private.h"
- +
- int ECORE_CON_EVENT_URL_DATA = 0;
- int ECORE_CON_EVENT_URL_COMPLETE = 0;
- int ECORE_CON_EVENT_URL_PROGRESS = 0;
- diff --git a/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c b/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c
- index a34ca70..d8c5f53 100644
- --- a/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c
- +++ b/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c
- @@ -24,6 +24,12 @@ static const char *ecore_evas_psl1ght_default = "EFL PSL1GHT";
- static int _ecore_evas_fps_debug = 0;
- static Ecore_Poller *ecore_evas_event;
- +static unsigned int
- +_ecore_evas_time_get ()
- +{
- + return ((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
- +}
- +
- static Ecore_Evas *
- _ecore_evas_psl1ght_match(void)
- {
- @@ -199,20 +205,46 @@ _ecore_evas_psl1ght_free(Ecore_Evas *ee)
- }
- static void
- +_ecore_evas_screen_resized (Ecore_Evas *ee)
- +{
- + int w, h;
- +
- + return;
- + ecore_psl1ght_screen_resolution_get (&w, &h);
- + printf ("Screen got resized to %dx%d, real res is %dx%d\n",
- + ee->w, ee->h, w, h);
- +
- + if (w != ee->w || h != ee->h) {
- + ee->req.w = ee->w = w;
- + ee->req.h = ee->h = h;
- + evas_output_size_set(ee->evas, ee->w, ee->h);
- + evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
- + ecore_psl1ght_resolution_set (w, h);
- + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
- +
- + _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
- + _ecore_evas_time_get());
- + if (ee->func.fn_resize) ee->func.fn_resize(ee);
- + }
- +}
- +
- +static void
- _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
- {
- if ((w == ee->w) && (h == ee->h)) return;
- ee->w = w;
- ee->h = h;
- - /* TODO: see real resolution and move evas to center on screen */
- evas_output_size_set(ee->evas, ee->w, ee->h);
- +
- evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
- evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
- ecore_psl1ght_resolution_set (w, h);
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- +
- + _ecore_evas_screen_resized (ee);
- }
- static void
- @@ -222,6 +254,15 @@ _ecore_evas_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int
- }
- static void
- +_ecore_evas_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h)
- +{
- + if (x) *x = 0;
- + if (y) *y = 0;
- + ecore_psl1ght_optimal_screen_resolution_get (w, h);
- + printf ("screen_geometry_get : %dx%d\n", w?*w:0, h?*h:0);
- +}
- +
- +static void
- _ecore_evas_object_cursor_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
- {
- Ecore_Evas *ee;
- @@ -313,7 +354,7 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func =
- NULL, //transparent
- NULL, // render
- - NULL // screen_geometry_get
- + _ecore_evas_screen_geometry_get // screen_geometry_get
- };
- EAPI Ecore_Evas*
- @@ -348,7 +389,7 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
- ee->prop.borderless = 1;
- ee->prop.override = 1;
- ee->prop.maximized = 1;
- - ee->prop.fullscreen = 1;
- + ee->prop.fullscreen = 0;
- ee->prop.withdrawn = 0;
- ee->prop.sticky = 0;
- ee->prop.window = 0;
- @@ -400,8 +441,11 @@ ecore_evas_psl1ght_new(const char* name, int w, int h)
- psl1ght_ee = ee;
- - evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
- + evas_event_feed_mouse_in(ee->evas, _ecore_evas_time_get (), NULL);
- evas_focus_in(ee->evas);
- + _ecore_evas_screen_resized (ee);
- +
- + ecore_evas_cursor_set(ee, "/app_home/cursor.png", EVAS_LAYER_MAX, 0, 0);
- return ee;
- }
- diff --git a/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h b/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
- index fc2d07b..e689b2b 100644
- --- a/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
- +++ b/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
- @@ -111,6 +111,9 @@ EAPI int ecore_psl1ght_shutdown(void);
- EAPI void ecore_psl1ght_resolution_set(int width, int height);
- EAPI void ecore_psl1ght_poll_events(void);
- +EAPI void ecore_psl1ght_screen_resolution_get (int *w, int *h);
- +EAPI void ecore_psl1ght_optimal_screen_resolution_get (int *w, int *h);
- +
- #ifdef __cplusplus
- }
- #endif
- diff --git a/ecore/src/lib/ecore_psl1ght/Makefile.am b/ecore/src/lib/ecore_psl1ght/Makefile.am
- index b72945b..8e7328a 100644
- --- a/ecore/src/lib/ecore_psl1ght/Makefile.am
- +++ b/ecore/src/lib/ecore_psl1ght/Makefile.am
- @@ -16,7 +16,9 @@ includes_HEADERS = Ecore_Psl1ght.h
- includesdir = $(includedir)/ecore-@VMAJ@
- libecore_psl1ght_la_SOURCES = \
- -ecore_psl1ght.c
- +ecore_psl1ght.c \
- +moveutil.c \
- +spursutil.c
- libecore_psl1ght_la_LIBADD = \
- $(top_builddir)/src/lib/ecore/libecore.la \
- diff --git a/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c b/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
- index 89e66dc..6bdd8a4 100644
- --- a/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
- +++ b/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
- @@ -4,9 +4,15 @@
- #include <sysutil/video.h>
- #include <sysutil/sysutil.h>
- +#include <sysmodule/sysmodule.h>
- #include <io/pad.h>
- #include <io/mouse.h>
- #include <io/kb.h>
- +#include <io/camera.h>
- +#include <io/move.h>
- +#include <sys/process.h>
- +
- +#include "moveutil.h"
- #include "Eina.h"
- #include "Ecore_Psl1ght.h"
- @@ -16,6 +22,9 @@
- #include "ecore_private.h"
- #include "Ecore_Psl1ght_Keys.h"
- +/* Allocate 1MB stack to avoid overflows */
- +SYS_PROCESS_PARAM( 1001, 0x100000 );
- +
- int _ecore_psl1ght_log_dom = -1;
- EAPI int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0;
- @@ -26,14 +35,24 @@ EAPI int ECORE_PSL1GHT_EVENT_EXPOSE = 0;
- static int _ecore_psl1ght_init_count = 0;
- static int window_width = 0;
- static int window_height = 0;
- +/* Mouse support */
- static int mouse_connected = FALSE;
- static u8 mouse_buttons = 0;
- static int mouse_x = 0;
- static int mouse_y = 0;
- +/* Keyboard support */
- static int keyboard_connected = FALSE;
- static KbLed keyboard_leds = {{0}};
- static KbMkey keyboard_mods = {{0}};
- static u16 keyboard_old_key = 0;
- +/* Pad support */
- +static padData pad_data;
- +static int pad_old_x = 0;
- +static int pad_old_o = 0;
- +/* Move support */
- +static int move_connected = FALSE;
- +static moveContext *move_context = NULL;
- +u16 move_buttons = 0;
- static void xmb_event_handler (u64 status, u64 param, void * user_data);
- @@ -55,6 +74,7 @@ ecore_psl1ght_init(const char *name __UNUSED__)
- {
- videoState state;
- videoResolution resolution;
- + int ret, camera_loaded, gem_loaded;
- if(++_ecore_psl1ght_init_count != 1)
- return _ecore_psl1ght_init_count;
- @@ -85,9 +105,40 @@ ecore_psl1ght_init(const char *name __UNUSED__)
- return --_ecore_psl1ght_init_count;
- }
- + /* Pad support */
- ioPadInit (7);
- + /* Mouse support */
- ioMouseInit(2);
- + mouse_buttons = 0;
- + mouse_x = 0;
- + mouse_y = 0;
- +
- + /* Keyboard support */
- ioKbInit(2);
- + keyboard_leds._KbLedU.leds = 0;
- + keyboard_mods._KbMkeyU.mkeys = 0;
- +
- + /* Initialize Move */
- + move_context = NULL;
- + move_buttons = 0;
- +
- + camera_loaded = !sysModuleIsLoaded (SYSMODULE_CAMERA);
- + if (!camera_loaded)
- + ret = sysModuleLoad (SYSMODULE_CAMERA);
- + else
- + ret = 0;
- + if (ret == 0) {
- + gem_loaded = !sysModuleIsLoaded (SYSMODULE_GEM);
- + if (!gem_loaded)
- + ret = sysModuleLoad (SYSMODULE_GEM);
- + if (ret == 0) {
- + move_context = initMove ();
- + } else {
- + if (gem_loaded)
- + sysModuleUnload (SYSMODULE_CAMERA);
- + }
- + }
- +
- sysUtilRegisterCallback (SYSUTIL_EVENT_SLOT0, xmb_event_handler, NULL);
- ECORE_PSL1GHT_EVENT_GOT_FOCUS = ecore_event_type_new();
- @@ -125,6 +176,14 @@ ecore_psl1ght_shutdown(void)
- ioPadEnd();
- ioMouseEnd();
- ioKbEnd();
- +
- + if (move_context) {
- + endMove (move_context);
- + move_context = NULL;
- + sysModuleUnload (SYSMODULE_CAMERA);
- + sysModuleUnload (SYSMODULE_GEM);
- + }
- +
- sysUtilUnregisterCallback(SYSUTIL_EVENT_SLOT0);
- return _ecore_psl1ght_init_count;
- @@ -312,7 +371,7 @@ _ecore_psl1ght_event_key(u16 key)
- }
- static void
- -_ecore_psl1ght_mouse_move (s8 x_axis, s8 y_axis)
- +_ecore_psl1ght_mouse_move (s32 x_axis, s32 y_axis)
- {
- Ecore_Event_Mouse_Move *ev;
- @@ -326,6 +385,7 @@ _ecore_psl1ght_mouse_move (s8 x_axis, s8 y_axis)
- if (mouse_x > window_width) mouse_x = window_width;
- if (mouse_y > window_height) mouse_y = window_height;
- + printf ("New mouse position : %d,%d\n", mouse_x, mouse_y);
- ev->window = 0;
- ev->root_window = 0;
- ev->event_window = 0;
- @@ -413,13 +473,11 @@ _ecore_psl1ght_poll_joypad (void)
- if (padinfo.status[i])
- {
- int analog_h, analog_v;
- - static padData paddata;
- - static int old_x = 0, old_o = 0;
- - if (ioPadGetData (i, &paddata) != 0)
- + if (ioPadGetData (i, &pad_data) != 0)
- continue;
- - analog_h = paddata.ANA_L_H - 0x80;
- - analog_v = paddata.ANA_L_V - 0x80;
- + analog_h = pad_data.ANA_L_H - 0x80;
- + analog_v = pad_data.ANA_L_V - 0x80;
- if (analog_h > PAD_STICK_DEADZONE)
- analog_h -= PAD_STICK_DEADZONE;
- @@ -440,12 +498,12 @@ _ecore_psl1ght_poll_joypad (void)
- if(analog_h != 0 || analog_v != 0)
- _ecore_psl1ght_mouse_move (analog_h, analog_v);
- - if (old_x != paddata.BTN_CROSS)
- - _ecore_psl1ght_mouse_button (1, paddata.BTN_CROSS);
- - if (old_o != paddata.BTN_CIRCLE)
- - _ecore_psl1ght_mouse_button (3, paddata.BTN_CIRCLE);
- - old_x = paddata.BTN_CROSS;
- - old_o = paddata.BTN_CIRCLE;
- + if (pad_old_x != pad_data.BTN_CROSS)
- + _ecore_psl1ght_mouse_button (1, pad_data.BTN_CROSS);
- + if (pad_old_o != pad_data.BTN_CIRCLE)
- + _ecore_psl1ght_mouse_button (3, pad_data.BTN_CIRCLE);
- + pad_old_x = pad_data.BTN_CROSS;
- + pad_old_o = pad_data.BTN_CIRCLE;
- //pad_buttons = paddata.buttons;
- }
- @@ -513,6 +571,72 @@ _ecore_psl1ght_poll_mouse (void)
- }
- static void
- +_ecore_psl1ght_poll_move (void)
- +{
- + int i;
- + u16 new_buttons;
- + static int t_pressed = 0;
- + static int calibrated = 0;
- + static float prev_x = 0;
- + static float prev_y = 0;
- + static int gyro = 0;
- + float x, y, z;
- +
- + /* Check move events */
- + processMove (move_context);
- + new_buttons = move_context->state.paddata.buttons & (~move_buttons);
- + move_buttons = move_context->state.paddata.buttons;
- +
- + moveGet3DPosition (move_context, &x, &y, &z);
- + //printf ("Move 3D position is : %f, %f, %f\n", x,y,z);
- +
- + switch (new_buttons) {
- + case 1:
- + gyro = !gyro;
- + break;
- + case 4:
- + // Move button
- + printf ("Calibrating\n");
- + gemCalibrate (0);
- + calibrated = 1;
- + break;
- + case 8:
- + // start button
- + _ecore_psl1ght_mouse_move ((window_width / 2) - mouse_x, (window_height / 2) - mouse_y);
- + break;
- + }
- +
- + if (calibrated) {
- + float x_axis, y_axis;
- +
- + if (gyro) {
- + gemInertialState gem_inert;
- +
- + gemGetInertialState (0, 0, 0, &gem_inert);
- + x_axis = -vec_array (gem_inert.gyro, 1)*25;
- + y_axis = -vec_array (gem_inert.gyro, 0)*25;
- + if (abs (x_axis) > 2 || abs (y_axis) > 2)
- + _ecore_psl1ght_mouse_move (x_axis, y_axis);
- + } else {
- + x_axis = (x - prev_x)*2.5;
- + y_axis = -(y - prev_y)*2.5;
- + prev_x = x;
- + prev_y = y;
- + _ecore_psl1ght_mouse_move (x_axis, y_axis);
- + }
- +
- + if (!t_pressed && (move_buttons & 0x2)) {
- + printf ("T pressed\n");
- + _ecore_psl1ght_mouse_button (1, 1);
- + } else if (t_pressed && (move_buttons & 0x2) == 0) {
- + printf ("T released\n");
- + _ecore_psl1ght_mouse_button (1, 0);
- + }
- + t_pressed = move_buttons & 0x2;
- + }
- +}
- +
- +static void
- _ecore_psl1ght_poll_keyboard (void)
- {
- KbInfo kbInfo;
- @@ -587,6 +711,7 @@ xmb_event_handler (u64 status, u64 param, void * user_data)
- {
- printf ("Received event %lX\n", status);
- if (status == SYSUTIL_EXIT_GAME) {
- + ecore_main_loop_quit();
- } else if (status == SYSUTIL_MENU_OPEN) {
- } else if (status == SYSUTIL_MENU_CLOSE) {
- } else if (status == SYSUTIL_DRAW_BEGIN) {
- @@ -600,18 +725,11 @@ ecore_psl1ght_poll_events(void)
- _ecore_psl1ght_poll_joypad ();
- _ecore_psl1ght_poll_mouse ();
- + if (move_context)
- + _ecore_psl1ght_poll_move ();
- _ecore_psl1ght_poll_keyboard ();
- sysUtilCheckCallback ();
- -
- - /*
- - case PSL1GHT_VIDEOEXPOSE:
- - ecore_event_add(ECORE_PSL1GHT_EVENT_EXPOSE, NULL, NULL, NULL);
- - break;
- - case PSL1GHT_QUIT:
- - ecore_main_loop_quit();
- - break;
- - */
- }
- EAPI void
- @@ -622,3 +740,45 @@ ecore_psl1ght_resolution_set (int width, int height)
- if (mouse_x > window_width) mouse_x = window_width;
- if (mouse_y > window_height) mouse_y = window_height;
- }
- +
- +EAPI void
- +ecore_psl1ght_screen_resolution_get (int *w, int *h)
- +{
- + videoState state;
- + videoResolution resolution;
- +
- + /* Get the state of the display */
- + if (videoGetState (0, 0, &state) == 0 &&
- + videoGetResolution (state.displayMode.resolution, &resolution) == 0) {
- + if (w) *w = resolution.width;
- + if (h) *h = resolution.height;
- + } else {
- + if (w) *w = 0;
- + if (h) *h = 0;
- + }
- +}
- +
- +EAPI void
- +ecore_psl1ght_optimal_screen_resolution_get (int *w, int *h)
- +{
- + videoDeviceInfo info;
- + videoResolution res;
- + int area = 720 * 480;
- + int mode_area;
- + int i;
- +
- + if (w) *w = 720;
- + if (h) *h = 480;
- +
- + videoGetDeviceInfo(0, 0, &info);
- +
- + for (i = 0; i < info.availableModeCount; i++) {
- + videoGetResolution (info.availableModes[i].resolution, &res);
- + mode_area = res.width * res.height;
- + if (mode_area > area) {
- + area = mode_area;
- + if (w) *w = res.width;
- + if (h) *h = res.height;
- + }
- + }
- +}
- diff --git a/elementary/configure.ac b/elementary/configure.ac
- index 447f0f9..a612f6c 100644
- --- a/elementary/configure.ac
- +++ b/elementary/configure.ac
- @@ -220,18 +220,10 @@ PKG_CHECK_MODULES([ELEMENTARY],
- ecore-evas >= 1.0.999
- ecore-file >= 1.0.999
- ecore-imf >= 1.0.999
- + ecore-con >= 1.0.999
- edje >= 1.0.999
- ]
- )
- -PKG_CHECK_MODULES([ELEMENTARY_MAP],
- - ecore-con >= 1.0.999, [have_ecore_con="yes"], [have_ecore_con="no"])
- -
- -if test "x${have_ecore_con}" = "xyes" ; then
- - ELEMENTARY_CFLAGS="$ELEMENTARY_CFLAGS $ELEMENTARY_MAP_CFLAGS"
- - ELEMENTARY_LDFLAGS="$ELEMENTARY_LDFLAGS $ELEMENTARY_MAP_LDFLAGS"
- - ELEMENTARY_LIBS="$ELEMENTARY_LIBS $ELEMENTARY_MAP_LIBS"
- -fi
- -AM_CONDITIONAL([BUILD_ELEMENTARY_MAP], [test "x${have_ecore_con}" = "xyes"])
- PKG_CHECK_MODULES([EIO],
- [eio],
- diff --git a/elementary/src/bin/Makefile.am b/elementary/src/bin/Makefile.am
- index 95a59ca..43fa6c3 100644
- --- a/elementary/src/bin/Makefile.am
- +++ b/elementary/src/bin/Makefile.am
- @@ -76,6 +76,7 @@ test_label.c \
- test_launcher.c \
- test_layout.c \
- test_list.c \
- +test_map.c \
- test_menu.c \
- test_multi.c \
- test_naviframe.c \
- @@ -109,10 +110,6 @@ if HAVE_EIO
- elementary_test_SOURCES += test_eio.c
- endif
- -if BUILD_ELEMENTARY_MAP
- -elementary_test_SOURCES += test_map.c
- -endif
- -
- elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
- @ELEMENTARY_EWEATHER_LIBS@ \
- @ELEMENTARY_EDBUS_LIBS@ \
- diff --git a/elementary/src/bin/config.c b/elementary/src/bin/config.c
- index 72d01e9..b7dad06 100644
- --- a/elementary/src/bin/config.c
- +++ b/elementary/src/bin/config.c
- @@ -2622,6 +2622,7 @@ _elm_engine_supported(const char *engine)
- "opengl_x11",
- "software_gdi",
- "software_16_wince_gdi",
- + "psl1ght",
- "sdl",
- "software_16_sdl",
- "opengl_sdl",
- diff --git a/elementary/src/bin/test.c b/elementary/src/bin/test.c
- index 8bb1c42..a56e87a 100644
- --- a/elementary/src/bin/test.c
- +++ b/elementary/src/bin/test.c
- @@ -497,7 +497,11 @@ elm_main(int argc, char **argv)
- autorun = argv[2];
- }
- }
- -
- + else
- + {
- + test_win_only = EINA_TRUE;
- + autorun = "3D";
- + }
- /* put here any init specific to this app like parsing args etc. */
- my_win_main(autorun, test_win_only); /* create main window */
- elm_run(); /* and run the program now and handle all events etc. */
- diff --git a/elementary/src/bin/test_anim.c b/elementary/src/bin/test_anim.c
- index 9711a6e..ed3c754 100644
- --- a/elementary/src/bin/test_anim.c
- +++ b/elementary/src/bin/test_anim.c
- @@ -32,7 +32,7 @@ anim(void *data)
- evas_output_viewport_get(evas_object_evas_get(win), 0, 0, &vw, &vh);
- r = 48;
- - t = ecore_loop_time_get();
- + t = ((double)((long) (ecore_loop_time_get() * 1000000) % 1000000000)) / 1000000;
- fac = 2.0 / (double)((sizeof(names) / sizeof(char *) / 2));
- evas_pointer_canvas_xy_get(evas_object_evas_get(win), &x, &y);
- lx = x;
- @@ -43,7 +43,7 @@ anim(void *data)
- bub = evas_object_data_get(win, names[i * 2]);
- sh = evas_object_data_get(win, names[(i * 2) + 1]);
- zz = (((2 + sin(t * 6 + (M_PI * (i * fac)))) / 3) * 64) * 2;
- - xx = (cos(t * 4 + (M_PI * (i * fac))) * r) * 2;
- + xx = (cos(t * 4 + (M_PI * (i * fac))) * r) * 2 ;
- yy = (sin(t * 6 + (M_PI * (i * fac))) * r) * 2;
- w = zz;
- diff --git a/elementary/src/lib/Elementary.h.in b/elementary/src/lib/Elementary.h.in
- index 8a2e584..140a23c 100644
- --- a/elementary/src/lib/Elementary.h.in
- +++ b/elementary/src/lib/Elementary.h.in
- @@ -373,7 +373,7 @@ contact with the developers and maintainers.
- #include <Ecore_Evas.h>
- #include <Ecore_File.h>
- #include <Ecore_IMF.h>
- -//#include <Ecore_Con.h>
- +#include <Ecore_Con.h>
- #include <Edje.h>
- #ifndef PATH_MAX
- @@ -1877,6 +1877,7 @@ extern "C" {
- * @li "opengl_x11"
- * @li "software_gdi"
- * @li "software_16_wince_gdi"
- + * @li "psl1ght"
- * @li "sdl"
- * @li "software_16_sdl"
- * @li "opengl_sdl"
- @@ -3495,6 +3496,7 @@ extern "C" {
- * exits)
- * @li "fb", "software-fb", "software_fb" (Linux framebuffer direct software
- * rendering)
- + * @li "psl1ght" (PS3 rendering using PSL1GHT)
- * @li "sdl", "software-sdl", "software_sdl" (SDL software rendering to SDL
- * buffer)
- * @li "gl-sdl", "gl_sdl", "opengl-sdl", "opengl_sdl" (OpenGL or OpenGL-ES2
- diff --git a/elementary/src/lib/Makefile.am b/elementary/src/lib/Makefile.am
- index 16e6dc2..04f0313 100644
- --- a/elementary/src/lib/Makefile.am
- +++ b/elementary/src/lib/Makefile.am
- @@ -85,6 +85,7 @@ elm_layout.c \
- elm_list.c \
- elm_main.c \
- elm_mapbuf.c \
- +elm_map.c \
- elm_menu.c \
- elm_notify.c \
- elm_pager.c \
- @@ -123,10 +124,6 @@ els_scroller.c \
- els_scroller.h \
- els_tooltip.c
- -if BUILD_ELEMENTARY_MAP
- -libelementary_la_SOURCES += elm_map.c
- -endif
- -
- libelementary_la_CFLAGS =
- libelementary_la_LIBADD = \
- @my_libs@ \
- diff --git a/elementary/src/lib/elm_config.c b/elementary/src/lib/elm_config.c
- index 319a0d5..5ef2d79 100644
- --- a/elementary/src/lib/elm_config.c
- +++ b/elementary/src/lib/elm_config.c
- @@ -27,6 +27,7 @@ const char *_elm_engines[] = {
- "opengl_x11",
- "software_gdi",
- "software_16_wince_gdi",
- + "psl1ght",
- "sdl",
- "software_16_sdl",
- "opengl_sdl",
- @@ -1017,7 +1018,7 @@ _config_sub_apply(void)
- edje_scale_set(_elm_config->scale);
- edje_password_show_last_set(_elm_config->password_show_last);
- edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
- - if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
- + //if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
- }
- static Eina_Bool
- @@ -1445,6 +1446,8 @@ _env_get(void)
- else if ((!strcasecmp(s, "directfb")) ||
- (!strcasecmp(s, "dfb")))
- eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_DIRECTFB);
- + else if ((!strcasecmp(s, "psl1ght")))
- + eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_PSL1GHT);
- else if ((!strcasecmp(s, "sdl")) ||
- (!strcasecmp(s, "software-sdl")) ||
- (!strcasecmp(s, "software_sdl")))
- diff --git a/elementary/src/lib/elm_main.c b/elementary/src/lib/elm_main.c
- index 2f2ea11..b07fc93 100644
- --- a/elementary/src/lib/elm_main.c
- +++ b/elementary/src/lib/elm_main.c
- @@ -386,7 +386,7 @@ elm_quicklaunch_init(int argc,
- if (argv) _elm_appname = strdup(ecore_file_file_get(argv[0]));
- - pfx = eina_prefix_new(NULL, elm_quicklaunch_init,
- + pfx = eina_prefix_new(argv[0], elm_quicklaunch_init,
- "ELM", "elementary", "config/profile.cfg",
- PACKAGE_LIB_DIR, /* don't have a bin dir currently */
- PACKAGE_LIB_DIR,
- @@ -421,7 +421,7 @@ elm_quicklaunch_sub_init(int argc,
- ecore_app_args_set(argc, (const char **)argv);
- evas_init();
- edje_init();
- - _elm_module_init();
- + //_elm_module_init();
- _elm_config_sub_init();
- #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
- if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
- @@ -456,7 +456,7 @@ elm_quicklaunch_sub_shutdown(void)
- if (!quicklaunch_on)
- {
- _elm_win_shutdown();
- - _elm_module_shutdown();
- + //_elm_module_shutdown();
- ecore_con_url_shutdown();
- ecore_con_shutdown();
- ecore_imf_shutdown();
- @@ -727,7 +727,7 @@ elm_quicklaunch_fork(int argc,
- }
- ecore_evas_init(); // FIXME: check errors
- ecore_imf_init();
- - _elm_module_init();
- + //_elm_module_init();
- #endif
- }
- diff --git a/elementary/src/lib/elm_priv.h b/elementary/src/lib/elm_priv.h
- index a715a0e..af16f5a 100644
- --- a/elementary/src/lib/elm_priv.h
- +++ b/elementary/src/lib/elm_priv.h
- @@ -75,10 +75,11 @@ extern const char *_elm_engines[];
- #define ELM_OPENGL_X11 (_elm_engines[6])
- #define ELM_SOFTWARE_WIN32 (_elm_engines[7])
- #define ELM_SOFTWARE_16_WINCE (_elm_engines[8])
- -#define ELM_SOFTWARE_SDL (_elm_engines[9])
- -#define ELM_SOFTWARE_16_SDL (_elm_engines[10])
- -#define ELM_OPENGL_SDL (_elm_engines[11])
- -#define ELM_BUFFER (_elm_engines[12])
- +#define ELM_SOFTWARE_PSL1GHT (_elm_engines[9])
- +#define ELM_SOFTWARE_SDL (_elm_engines[10])
- +#define ELM_SOFTWARE_16_SDL (_elm_engines[11])
- +#define ELM_OPENGL_SDL (_elm_engines[12])
- +#define ELM_BUFFER (_elm_engines[13])
- #define ELM_FONT_TOKEN_STYLE ":style="
- diff --git a/elementary/src/lib/elm_win.c b/elementary/src/lib/elm_win.c
- index 9b3f0ca..0705543 100644
- --- a/elementary/src/lib/elm_win.c
- +++ b/elementary/src/lib/elm_win.c
- @@ -1350,9 +1350,9 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
- #define FALLBACK_TRY(engine) \
- if (!win->ee) \
- do { \
- - CRITICAL(engine " engine creation failed. Trying software X11."); \
- + CRITICAL(engine " engine creation failed. Trying to find one."); \
- elm_engine_set(ELM_SOFTWARE_X11); \
- - win->ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1); \
- + win->ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL); \
- } while (0)
- #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
- @@ -1386,6 +1386,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
- win->client_message_handler = ecore_event_handler_add
- (ECORE_X_EVENT_CLIENT_MESSAGE, _elm_win_client_message, win);
- #endif
- + FALLBACK_TRY("Sofware X11");
- }
- else if (ENGINE_COMPARE(ELM_SOFTWARE_FB))
- {
- @@ -1458,6 +1459,11 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
- win->ee = ecore_evas_software_wince_gdi_new(NULL, 0, 0, 1, 1);
- FALLBACK_TRY("Sofware-16-WinCE");
- }
- + else if (ENGINE_COMPARE(ELM_SOFTWARE_PSL1GHT))
- + {
- + win->ee = ecore_evas_psl1ght_new(NULL, 1, 1);
- + FALLBACK_TRY("PSL1GHT");
- + }
- else if (ENGINE_COMPARE(ELM_SOFTWARE_SDL))
- {
- win->ee = ecore_evas_sdl_new(NULL, 0, 0, 0, 0, 0, 1);
- @@ -1484,13 +1490,18 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
- win->shot.info = eina_stringshare_add(_elm_config->engine + 5);
- _shot_init(win);
- }
- + else
- + {
- + CRITICAL("Unknown engine : %s", _elm_config->engine);
- + FALLBACK_TRY("Unknown engine ");
- + }
- #undef FALLBACK_TRY
- break;
- }
- if (!win->ee)
- {
- - ERR("Cannot create window.");
- + ERR("Cannot create window with engine %s.", _elm_config->engine);
- free(win);
- return NULL;
- }
- diff --git a/evas/src/modules/engines/psl1ght/evas_engine.c b/evas/src/modules/engines/psl1ght/evas_engine.c
- index b072995..d84be2c 100644
- --- a/evas/src/modules/engines/psl1ght/evas_engine.c
- +++ b/evas/src/modules/engines/psl1ght/evas_engine.c
- @@ -392,6 +392,14 @@ eng_output_flush(void *data)
- gcm_scale.inY = 0;
- gcm_scale.inW = (width & ~1); // Width must be a multiple of 2
- gcm_scale.inH = height;
- + if (gcm_scale.inW < 2) // Minimum inW value is 2
- + gcm_scale.inW = 2;
- + if (gcm_scale.inW > 2046) // Maximum inW value is 2046
- + gcm_scale.inW = 2046;
- + if (gcm_scale.inH < 1) // Minimum inH value is 1
- + gcm_scale.inH = 1;
- + if (gcm_scale.inH > 2047) // Maximum inW value is 2047
- + gcm_scale.inH = 2047;
- gcm_scale.pitch = sizeof(u32) * width;
- diff --git a/evas/src/modules/engines/psl1ght/rsxutil.c b/evas/src/modules/engines/psl1ght/rsxutil.c
- index 16d1378..a2f947d 100644
- --- a/evas/src/modules/engines/psl1ght/rsxutil.c
- +++ b/evas/src/modules/engines/psl1ght/rsxutil.c
- @@ -119,9 +119,9 @@ getPreferredResolution (u16 width, u16 height)
- videoResolution res;
- int area = width * height;
- int mode_area;
- - int min_area_diff = abs (area - (1920 * 1080));
- + int min_area_diff = abs (area - (720 * 480));
- int area_diff;
- - u8 resolution = VIDEO_RESOLUTION_1080;
- + u8 resolution = VIDEO_RESOLUTION_480;
- int i;
- videoGetDeviceInfo(0, 0, &info);
- @@ -228,9 +228,6 @@ initScreen (void *host_addr, u32 size)
- if (context)
- rsxFinish (context, 0);
- - if (host_addr)
- - free (host_addr);
- -
- return NULL;
- }
Add Comment
Please, Sign In to add comment