Author: richard
Date: Mon Jan 26 06:12:06 2009
New Revision: 3931
URL: http://svn.slimdevices.com?rev=3931&root=Jive&view=rev
Log:
r3...@harrypotter (orig r3930): richard | 2009-01-26 14:08:02 +0000
Bug: N/A
Description:
Use correct screen bit depth when creating RGB surfaces.
Added some debug on initialization that reports screen properties.
Added uptime report in About applet.
Modified:
7.4/branches/pango/ (props changed)
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/AboutJiveApplet.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/strings.txt
7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_surface.c
7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/system.c
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
Propchange: 7.4/branches/pango/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Jan 26 06:12:06 2009
@@ -4,7 +4,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:3856
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:3914
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:3930
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/AboutJiveApplet.lua
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/AboutJiveApplet.lua?rev=3931&root=Jive&r1=3930&r2=3931&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/AboutJiveApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/AboutJiveApplet.lua
Mon Jan 26 06:12:06 2009
@@ -21,6 +21,7 @@
local JIVE_VERSION = jive.JIVE_VERSION
+local debug = require("jive.utils.debug")
local log =
require("jive.utils.log").logger("applets.setup")
module(...)
@@ -32,11 +33,26 @@
local version = JIVE_VERSION
+ local uptime = System:getUptime()
+
+ local ut = {}
+ if uptime.days > 0 then
+ ut[#ut + 1] = tostring(self:string("UPTIME_DAYS", uptime.days))
+ end
+ if uptime.hours > 0 then
+ ut[#ut + 1] = tostring(self:string("UPTIME_HOURS",
uptime.hours))
+ end
+ ut[#ut + 1] = tostring(self:string("UPTIME_MINUTES", uptime.minutes))
+ ut = table.concat(ut, " ")
+
local about = {
tostring(self:string("ABOUT_VERSION")),
version,
"",
tostring(self:string("ABOUT_MAC_ADDRESS",
System:getMacAddress()) or ""),
+ "",
+ tostring(self:string("UPTIME")),
+ ut,
"",
tostring(self:string("ABOUT_CREDITS")),
" Sean Adams",
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/strings.txt
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/strings.txt?rev=3931&root=Jive&r1=3930&r2=3931&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/strings.txt
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/AboutJive/strings.txt
Mon Jan 26 06:12:06 2009
@@ -16,16 +16,16 @@
SV Om
ABOUT_COPYRIGHT
- DA Copyright 2007-2008, Logitech.
- DE Copyright 2007-2008, Logitech.
- EN Copyright 2007-2008, Logitech.
- ES Copyright 2007-2008, Logitech.
- FI Copyright 2007-2008, Logitech.
- FR Copyright 2007-2008, Logitech.
- IT Copyright 2007-2008, Logitech.
- NL Copyright 2007-2008, Logitech.
- NO Opphavsrett 2007â2008, Logitech.
- SV © 2007â2008 Logitech.
+ DA Copyright 2007-2009, Logitech.
+ DE Copyright 2007-2009, Logitech.
+ EN Copyright 2007-2009, Logitech.
+ ES Copyright 2007-2009, Logitech.
+ FI Copyright 2007-2009, Logitech.
+ FR Copyright 2007-2009, Logitech.
+ IT Copyright 2007-2009, Logitech.
+ NL Copyright 2007-2009, Logitech.
+ NO Opphavsrett 2007â2009, Logitech.
+ SV © 2007â2009 Logitech.
ABOUT_MAC_ADDRESS
DA MAC-adresse: %s
@@ -75,3 +75,15 @@
NO Med enerett
SV Med ensamrätt
+UPTIME
+ EN Uptime:
+
+UPTIME_DAYS
+ EN %s days
+
+UPTIME_HOURS
+ EN %s hours
+
+UPTIME_MINUTES
+ EN %s minutes
+
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_framework.c?rev=3931&root=Jive&r1=3930&r2=3931&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_framework.c Mon
Jan 26 06:12:06 2009
@@ -4,6 +4,7 @@
** This file is subject to the Logitech Public Source License Version 1.0.
Please see the LICENCE file for details.
*/
+#define RUNTIME_DEBUG 1
#include "common.h"
#include "jive.h"
@@ -118,6 +119,7 @@
static int jiveL_init(lua_State *L) {
SDL_Rect r;
+ const SDL_VideoInfo *video_info;
JiveSurface *srf, *splash, *icon;
Uint16 splash_w, splash_h;
@@ -153,12 +155,13 @@
exit(-1);
}
-
pangocontext = jive_create_sdl_pango_context();
-
-
-
+ /* report video info */
+ video_info = SDL_GetVideoInfo();
+ DEBUG_TRACE("%d bits per pixel [R<<%d G<<%d B<<%d]",
video_info->vfmt->BitsPerPixel, video_info->vfmt->Rshift,
video_info->vfmt->Gshift, video_info->vfmt->Bshift)
+ DEBUG_TRACE("Hardware acceleration %s available",
video_info->hw_available?"is":"is not");
+
/* Register callback for additional events (used for multimedia keys)*/
SDL_EventState(SDL_SYSWMEVENT,SDL_ENABLE);
SDL_SetEventFilter(filter_events);
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_surface.c
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_surface.c?rev=3931&root=Jive&r1=3930&r2=3931&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_surface.c
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/jive_surface.c Mon
Jan 26 06:12:06 2009
@@ -9,6 +9,9 @@
#include "jive.h"
+Uint16 default_bpp;
+
+
JiveSurface *jive_surface_set_video_mode(Uint16 w, Uint16 h, Uint16 bpp, bool
fullscreen) {
JiveSurface *srf;
SDL_Surface *sdl;
@@ -28,12 +31,11 @@
return NULL;
}
- if ( (sdl->flags & SDL_HWSURFACE) == 0) {
- printf("Not using a hardware surface\n");
- }
- else if ( (sdl->flags & SDL_DOUBLEBUF) == 0) {
- printf("WARNING: Not using a hardware double buffer\n");
- }
+ if ( (sdl->flags & SDL_HWSURFACE) && !(sdl->flags & SDL_DOUBLEBUF)) {
+ DEBUG_ERROR("WARNING: Not using a hardware double buffer\n");
+ }
+
+ default_bpp = bpp;
srf = calloc(sizeof(JiveSurface), 1);
srf->refcount = 1;
@@ -46,7 +48,7 @@
JiveSurface *srf;
SDL_Surface *sdl;
- sdl = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 16, 0, 0, 0, 0);
+ sdl = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, default_bpp, 0, 0, 0,
0);
/* Opaque surface */
SDL_SetAlpha(sdl, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/system.c
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/system.c?rev=3931&root=Jive&r1=3930&r2=3931&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/system.c (original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/ui/system.c Mon Jan 26
06:12:06 2009
@@ -57,6 +57,32 @@
else {
lua_pushnil(L);
}
+ return 1;
+}
+
+
+static int system_get_uptime(lua_State *L) {
+ Uint32 uptime;
+ int updays, upminutes, uphours;
+
+ // FIXME wraps around after 49.7 days
+ uptime = SDL_GetTicks() / 1000;
+
+ updays = (int) uptime / (60*60*24);
+ upminutes = (int) uptime / 60;
+ uphours = (upminutes / 60) % 24;
+ upminutes %= 60;
+
+ lua_newtable(L);
+ lua_pushinteger(L, updays);
+ lua_setfield(L, -2, "days");
+
+ lua_pushinteger(L, uphours);
+ lua_setfield(L, -2, "hours");
+
+ lua_pushinteger(L, upminutes);
+ lua_setfield(L, -2, "minutes");
+
return 1;
}
@@ -240,6 +266,7 @@
{ "getMachine", system_get_machine },
{ "getMacAddress", system_get_mac_address },
{ "getUUID", system_get_uuid },
+ { "getUptime", system_get_uptime },
{ "getUserDir", system_get_user_dir },
{ "findFile", system_find_file },
{ "init", system_init },
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
URL:
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua?rev=3931&root=Jive&r1=3930&r2=3931&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
Mon Jan 26 06:12:06 2009
@@ -6,6 +6,7 @@
local table = require("jive.utils.table")
local AppletMeta = require("jive.AppletMeta")
+local LocalPlayer = require("jive.slim.LocalPlayer")
local Framework = require("jive.ui.Framework")
local System = require("jive.System")
@@ -68,6 +69,11 @@
settings.mac = table.concat(mac, ":")
end
+ -- Set player device type
+ --LocalPlayer:setDeviceType("controller", "Controller")
+
+ settings.mac = "00:04:20:ff:ff:10"
+
if store then
log:debug("Mac Address: ", settings.mac)
meta:storeSettings()
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins