Author: titmuss
Date: Tue Oct 14 07:12:14 2008
New Revision: 3118

URL: http://svn.slimdevices.com?rev=3118&root=Jive&view=rev
Log:
Bug: 9614
Description:
Don't needlessly change the screen resolution, this prevents blank screens at 
startup on the Controller.


Modified:
    
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
    7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
    
7.3/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/FullscreenSkin/FullscreenSkinApplet.lua

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua?rev=3118&root=Jive&r1=3117&r2=3118&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 (original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 Tue Oct 14 07:12:14 2008
@@ -98,10 +98,8 @@
 
 -- skin
 -- The meta arranges for this to be called to skin Jive.
-function skin(self, s, reload)
-       if not reload then
-               Framework:setVideoMode(240, 320, 16, false)
-       end
+function skin(self, s)
+       Framework:setVideoMode(240, 320, 16, false)
 
        local screenWidth, screenHeight = Framework:getScreenSize()
 

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c?rev=3118&root=Jive&r1=3117&r2=3118&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c (original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c Tue Oct 14 
07:12:14 2008
@@ -40,7 +40,9 @@
 
 static JiveTile *jive_background = NULL;
 
-static Uint16 screen_w, screen_h;
+static Uint16 screen_w, screen_h, screen_bpp;
+
+static bool screen_isfull = false;
 
 struct jive_keymap {
        SDLKey keysym;
@@ -112,7 +114,6 @@
        SDL_Rect r;
        JiveSurface *srf, *splash, *icon;
        Uint16 splash_w, splash_h;
-       int bpp;
 
        init_path(L);
 
@@ -127,7 +128,7 @@
        lua_pop(L, 1);
 
        lua_getfield(L, -1, "bpp");
-       bpp = luaL_optint(L, -1, 16);
+       screen_bpp = luaL_optint(L, -1, 16);
        lua_pop(L, 1);
 
        screen_w = r.w;
@@ -152,7 +153,7 @@
        /* open window */
        SDL_WM_SetCaption("SqueezePlay Beta", "SqueezePlay Beta");
 
-       srf = jive_surface_set_video_mode(screen_w, screen_h, bpp, false);
+       srf = jive_surface_set_video_mode(screen_w, screen_h, screen_bpp, 
false);
        if (!srf) {
                SDL_Quit();
                exit(-1);
@@ -714,6 +715,8 @@
 
 int jiveL_set_video_mode(lua_State *L) {
        JiveSurface *srf;
+       Uint16 w, h, bpp;
+       bool isfull;
 
        /* stack is:
         * 1: framework
@@ -723,8 +726,21 @@
         * 5: fullscreen
         */
 
+       w = luaL_optinteger(L, 2, 0);
+       h = luaL_optinteger(L, 3, 0);
+       bpp = luaL_optinteger(L, 4, 16);
+       isfull = lua_toboolean(L, 5);
+
+       if (w == screen_w &&
+           h == screen_h &&
+           bpp == screen_bpp &&
+           isfull == screen_isfull) {
+               return 0;
+       }
+
+
        /* update video mode */
-       srf = jive_surface_set_video_mode(luaL_optinteger(L, 2, 0), 
luaL_optinteger(L, 3, 0), luaL_optinteger(L, 4, 16), lua_toboolean(L, 5));
+       srf = jive_surface_set_video_mode(w, h, bpp, isfull);
 
        /* store new screen surface */
        lua_getfield(L, 1, "screen");
@@ -738,8 +754,10 @@
        lua_rawseti(L, -2, 4);
        lua_pop(L, 2);
 
-       screen_w = luaL_optinteger(L, 2, 0);
-       screen_h = luaL_optinteger(L, 3, 0);
+       screen_w = w;
+       screen_h = h;
+       screen_bpp = bpp;
+       screen_isfull = isfull;
 
        next_jive_origin++;
 

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/FullscreenSkin/FullscreenSkinApplet.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/FullscreenSkin/FullscreenSkinApplet.lua?rev=3118&root=Jive&r1=3117&r2=3118&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/FullscreenSkin/FullscreenSkinApplet.lua
 (original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay_desktop/share/applets/FullscreenSkin/FullscreenSkinApplet.lua
 Tue Oct 14 07:12:14 2008
@@ -114,8 +114,6 @@
 -- skin
 -- The meta arranges for this to be called to skin Jive.
 function skin(self, s)
-
-       -- XXXX for testing
        Framework:setVideoMode(800, 600, 32, false)
 
        local screenWidth, screenHeight = Framework:getScreenSize()

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to