diff --git a/source/cfg.c b/source/cfg.c index 325774cb..f563e0ee 100644 --- a/source/cfg.c +++ b/source/cfg.c @@ -188,23 +188,15 @@ void CFG_Default() { snprintf(CFG.theme_path, sizeof(CFG.theme_path), "SD:/theme/"); } -// CFG.simple = 0; -// CFG.video = CFG_VIDEO_DEFAULT; -// CFG.home = CFG_HOME_REBOOT; -// CFG.download = 0; -// CFG.language = CFG_LANG_CONSOLE; -// CFG.ocarina = 0; -// CFG.vipatch = 0; -// CFG.savesettings = 0; - CFG.parentalcontrol = 0; - CFG.maxcharacters = 38; - CFG.godmode = 0; -// CFG.installdownload = 0; -// CFG.hidesettingmenu = 0; + snprintf(CFG.covers_path, sizeof(CFG.covers_path), "SD:/images/"); //default image path snprintf(CFG.disc_path, sizeof(CFG.disc_path), "SD:/images/disc/");//default path for disc images snprintf(CFG.unlockCode, sizeof(CFG.unlockCode), "ab121b"); // default passwore + CFG.parentalcontrol = 0; + CFG.maxcharacters = 38; + CFG.godmode = 0; + //all alignments are left top here THEME.selection_x = 200; THEME.selection_y = 40; @@ -252,7 +244,6 @@ void CFG_Default() THEME.clockAlign = CFG_ALIGN_CENTRE; THEME.sdcard_x = 160; THEME.sdcard_y = 390; - } @@ -456,104 +447,104 @@ void theme_set(char *name, char *val) } else if (strcmp(cfg_name, "covers_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.cover_x = x - (x % 4); THEME.cover_y = y; } } else if (strcmp(cfg_name, "id_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.id_x = x - (x % 4); THEME.id_y = y; } } else if (strcmp(cfg_name, "hddinfo_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.hddInfo_x = x - (x % 4); THEME.hddInfo_y = y; } } else if (strcmp(cfg_name, "gamecount_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.gameCnt_x = x - (x % 4); THEME.gameCnt_y = y; } } else if (strcmp(cfg_name, "region_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.region_x = x - (x % 4); THEME.region_y = y; } } else if (strcmp(cfg_name, "power_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.power_x = x - (x % 4); THEME.power_y = y; } } else if (strcmp(cfg_name, "home_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.home_x = x - (x % 4); THEME.home_y = y; } } else if (strcmp(cfg_name, "setting_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.setting_x = x - (x % 4); THEME.setting_y = y; } } else if (strcmp(cfg_name, "install_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.install_x = x - (x % 4); THEME.install_y = y; } } else if (strcmp(cfg_name, "battery1_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.battery1_x = x - (x % 4); THEME.battery1_y = y; } } else if (strcmp(cfg_name, "battery2_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.battery2_x = x - (x % 4); THEME.battery2_y = y; } } else if (strcmp(cfg_name, "battery3_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.battery3_x = x - (x % 4); THEME.battery3_y = y; } } else if (strcmp(cfg_name, "battery4_coords") == 0) { - int x,y; - if (sscanf(val, "%d,%d", &x, &y) == 2) { + short x,y; + if (sscanf(val, "%hd,%hd", &x, &y) == 2) { THEME.battery4_x = x - (x % 4); THEME.battery4_y = y; } diff --git a/source/cfg.h b/source/cfg.h index afe484c2..53fc46fb 100644 --- a/source/cfg.h +++ b/source/cfg.h @@ -74,39 +74,39 @@ struct THEME int selection_y; int selection_w; int selection_h; - int cover_x; - int cover_y; + short cover_x; + short cover_y; short showID; - int id_x; - int id_y; - int region_x; - int region_y; - int power_x; - int power_y; - int home_x; - int home_y; - int battery1_x; - int battery2_x; - int battery3_x; - int battery4_x; - int battery1_y; - int battery2_y; - int battery3_y; - int battery4_y; + short id_x; + short id_y; + short region_x; + short region_y; + short power_x; + short power_y; + short home_x; + short home_y; + short battery1_x; + short battery2_x; + short battery3_x; + short battery4_x; + short battery1_y; + short battery2_y; + short battery3_y; + short battery4_y; // short showPower; // short showHome; - int setting_x; - int setting_y; - int install_x; - int install_y; + short setting_x; + short setting_y; + short install_x; + short install_y; short showHDD; short hddInfoAlign; - int hddInfo_x; - int hddInfo_y; + short hddInfo_x; + short hddInfo_y; short showGameCnt; short gameCntAlign; - int gameCnt_x; - int gameCnt_y; + short gameCnt_x; + short gameCnt_y; short showRegion; short showBattery; short showToolTip; @@ -117,8 +117,8 @@ struct THEME short clock_x; short clock_y; short clockAlign; - int sdcard_x; - int sdcard_y; + short sdcard_x; + short sdcard_y; }; extern struct CFG CFG;