diff --git a/source/settings/cfg.c b/source/settings/cfg.c index 53ca29a0..7f1a2865 100644 --- a/source/settings/cfg.c +++ b/source/settings/cfg.c @@ -660,33 +660,34 @@ void theme_set(char *name, char *val) { else if (strcmp(cfg_name, "favorite_coords") == 0) { short x,y; if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x-=24; + // the old Icons are aligned at center and the new at the left top corner. + // we must add 320 and sub the half image width to get the correct position. + x += 300; + // the old stuff is optimized for widescreen. + // if no widescreen, we must reposition the pos + if(!CFG.widescreen) x-=20; // old themes have no search_coords // set the searchIcon to the Position of the favIcon - //THEME.gamelist_search_x = x; - //THEME.gamegrid_search_x = THEME.gamecarousel_search_x = x-WorkAroundBarOffset; - //THEME.gamelist_search_y = THEME.gamegrid_search_y = THEME.gamecarousel_search_y = y; + THEME.gamelist_search_x = x; + THEME.gamegrid_search_x = THEME.gamecarousel_search_x = x-WorkAroundBarOffset; + THEME.gamelist_search_y = THEME.gamegrid_search_y = THEME.gamecarousel_search_y = y; // place the favIcon to the left side of the searchIcon - //if(!CFG.widescreen) x-= CFG.widescreen ? 32 : 40; + if(!CFG.widescreen) x-= CFG.widescreen ? 32 : 40; THEME.gamelist_favorite_x = x; THEME.gamegrid_favorite_x = THEME.gamecarousel_favorite_x = x-WorkAroundBarOffset; THEME.gamelist_favorite_y = THEME.gamegrid_favorite_y = THEME.gamecarousel_favorite_y = y; WorkAroundIconSet |= OLD_FAV_ICON; } } - else if (strcmp(cfg_name, "search_coords") == 0) { + else if (strcmp(cfg_name, "abc_coords") == 0) { short x,y; if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x-=16; - THEME.gamelist_search_x = x; - THEME.gamegrid_search_x = THEME.gamecarousel_search_x = x-WorkAroundBarOffset; - THEME.gamelist_search_y = THEME.gamegrid_search_y = THEME.gamecarousel_search_y = y; - } - } - else if (strcmp(cfg_name, "abc_coords") == 0) { - short x,y; - if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x-=8; + // the old Icons are aligned at center and the new at the left top corner. + // we must add 320 and sub the half image width to get the correct position. + x += 300; + // the old stuff is optimized for widescreen. + // if no widescreen, we must reposition the pos + if(!CFG.widescreen) x-=12; THEME.gamelist_abc_x = x; THEME.gamegrid_abc_x = THEME.gamecarousel_abc_x = x-WorkAroundBarOffset; THEME.gamelist_abc_y = THEME.gamegrid_abc_y = THEME.gamecarousel_abc_y = y; @@ -696,7 +697,12 @@ void theme_set(char *name, char *val) { else if (strcmp(cfg_name, "count_coords") == 0) { short x,y; if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x=0; + // the old Icons are aligned at center and the new at the left top corner. + // we must add 320 and sub the half image width to get the correct position. + x += 300; + // the old stuff is optimized for widescreen. + // if no widescreen, we must reposition the pos + if(!CFG.widescreen) x-=4; THEME.gamelist_count_x = x; THEME.gamegrid_count_x = THEME.gamecarousel_count_x = x-WorkAroundBarOffset; THEME.gamelist_count_y = THEME.gamegrid_count_y = THEME.gamecarousel_count_y = y; @@ -706,7 +712,12 @@ void theme_set(char *name, char *val) { else if (strcmp(cfg_name, "list_coords") == 0) { short x,y; if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x+=8; + // the old Icons are aligned at center and the new at the left top corner. + // we must add 320 and sub the half image width to get the correct position. + x += 300; + // the old stuff is optimized for widescreen. + // if no widescreen, we must reposition the pos + if(!CFG.widescreen) x+=4; THEME.gamelist_list_x = x; THEME.gamegrid_list_x = THEME.gamecarousel_list_x = x-WorkAroundBarOffset; THEME.gamelist_list_y = THEME.gamegrid_list_y = THEME.gamecarousel_list_y = y; @@ -716,7 +727,12 @@ void theme_set(char *name, char *val) { else if (strcmp(cfg_name, "grid_coords") == 0) { short x,y; if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x+=16; + // the old Icons are aligned at center and the new at the left top corner. + // we must add 320 and sub the half image width to get the correct position. + x += 300; + // the old stuff is optimized for widescreen. + // if no widescreen, we must reposition the pos + if(!CFG.widescreen) x+=12; THEME.gamelist_grid_x = x; THEME.gamegrid_grid_x = THEME.gamecarousel_grid_x = x-WorkAroundBarOffset; THEME.gamelist_grid_y = THEME.gamegrid_grid_y = THEME.gamecarousel_grid_y = y; @@ -726,7 +742,12 @@ void theme_set(char *name, char *val) { else if (strcmp(cfg_name, "carousel_coords") == 0) { short x,y; if (sscanf(val, "%hd,%hd", &x, &y) == 2) { - if(!CFG.widescreen) x+=24; + // the old Icons are aligned at center and the new at the left top corner. + // we must add 320 and sub the half image width to get the correct position. + x += 300; + // the old stuff is optimized for widescreen. + // if no widescreen, we must reposition the pos + if(!CFG.widescreen) x+=20; THEME.gamelist_carousel_x = x; THEME.gamegrid_carousel_x = THEME.gamecarousel_carousel_x = x-WorkAroundBarOffset; THEME.gamelist_carousel_y = THEME.gamegrid_carousel_y = THEME.gamecarousel_carousel_y = y;