diff --git a/include/pkgi_db.h b/include/pkgi_db.h index dc8fed9..75f42bc 100644 --- a/include/pkgi_db.h +++ b/include/pkgi_db.h @@ -40,7 +40,7 @@ typedef struct { const char* content; uint32_t flags; const char* name; - const char* name_org; + const char* description; const uint8_t* rap; const char* url; const uint8_t* digest; diff --git a/include/pkgi_style.h b/include/pkgi_style.h index 5837212..75a2cf7 100644 --- a/include/pkgi_style.h +++ b/include/pkgi_style.h @@ -45,7 +45,7 @@ #define PKGI_COLOR_SCROLL_BAR PKGI_COLOR(255, 255, 255) #define PKGI_COLOR_BATTERY_LOW PKGI_COLOR(255, 50, 50) #define PKGI_COLOR_BATTERY_CHARGING PKGI_COLOR(50, 255, 50) -#define PKGI_COLOR_SELECTED_BACKGROUND PKGI_COLOR(100, 100, 100) +#define PKGI_COLOR_SELECTED_BACKGROUND PKGI_COLOR(60, 60, 60) #define PKGI_COLOR_PROGRESS_BACKGROUND PKGI_COLOR(128, 128, 128) #define PKGI_COLOR_PROGRESS_BAR PKGI_COLOR(128, 255, 0) diff --git a/source/pkgi.c b/source/pkgi.c index 916a21f..51e4d4a 100644 --- a/source/pkgi.c +++ b/source/pkgi.c @@ -8,9 +8,8 @@ #include "pkgi_style.h" #include - -#define PKGI_UPDATE_URL "http://192.168.1.1/html/home.html" -#define PKGI_VERSION "0.1.0" +#define PKGI_UPDATE_URL "http://pkgi.bucanero.com.ar/version.txt" //api.github.com/repos/bucanero/pkgi-ps3/releases/latest +#define PKGI_VERSION "1.0.0" typedef enum { StateError, @@ -107,7 +106,6 @@ static void pkgi_download_thread(void) char message[256]; // short delay to allow download dialog to animate smoothly - // item->content, item->url, item->rap, item->digest pkgi_sleep(300); pkgi_lock_process(); @@ -302,8 +300,7 @@ static void pkgi_do_main(pkgi_input* input) if (i == selected_item) { -// pkgi_draw_rect(0, y, VITA_WIDTH, font_height + PKGI_MAIN_ROW_PADDING - 1, PKGI_COLOR_SELECTED_BACKGROUND); - pkgi_draw_fill_rect(0, y, VITA_WIDTH, font_height + PKGI_MAIN_ROW_PADDING - 1, PKGI_COLOR(60, 60, 60)); + pkgi_draw_fill_rect(0, y, VITA_WIDTH, font_height + PKGI_MAIN_ROW_PADDING - 1, PKGI_COLOR_SELECTED_BACKGROUND); } uint32_t color = PKGI_COLOR_TEXT; @@ -591,7 +588,7 @@ static void pkgi_check_for_update(void) } buffer[size] = 0; - static const char find[] = "\"name\":\"pkgi v"; + static const char find[] = "\"name\":\"PKGi PS3 v"; const char* start = pkgi_strstr(buffer, find); if (start != NULL) { diff --git a/source/pkgi_db.c b/source/pkgi_db.c index c4dbb69..1e1eea0 100644 --- a/source/pkgi_db.c +++ b/source/pkgi_db.c @@ -204,7 +204,7 @@ int pkgi_db_update(const char* update_url, char* error, uint32_t error_size) } *ptr++ = 0; - const char* name_org = ptr; + const char* description = ptr; while (ptr < end && *ptr != ',') { ptr++; @@ -267,7 +267,7 @@ int pkgi_db_update(const char* update_url, char* error, uint32_t error_size) db[db_count].content = content; db[db_count].flags = (uint32_t)pkgi_strtoll(flags); db[db_count].name = name; - db[db_count].name_org = (name_org[0] == 0 ? name : name_org); + db[db_count].description = description; db[db_count].rap = (rap[0] == 0 ? NULL : pkgi_hexbytes(rap, PKGI_RAP_SIZE)); db[db_count].url = url; db[db_count].size = pkgi_strtoll(size); diff --git a/source/pkgi_download.c b/source/pkgi_download.c index f50e56b..5c4975d 100644 --- a/source/pkgi_download.c +++ b/source/pkgi_download.c @@ -229,8 +229,6 @@ static void update_progress(void) } - -// ------ static int create_dummy_pkg(void) { void *filew; @@ -264,9 +262,7 @@ static int create_dummy_pkg(void) break; } download_offset += numr; - update_progress(); -// LOG("w %d / %d", download_offset, download_size); } if(filew) pkgi_close(filew); @@ -352,7 +348,6 @@ static int queue_pkg_task() return 1; } -// ------ static void download_start(void) { @@ -578,7 +573,6 @@ static int create_rap(const char* contentid, const uint8_t* rap) } int pkgi_download(const DbItem* item, const int background_dl) -// const char* content, const char* url, const uint8_t* rif, const uint8_t* digest { int result = 0; diff --git a/source/pkgi_ps3.c b/source/pkgi_ps3.c index 5763561..3d80568 100644 --- a/source/pkgi_ps3.c +++ b/source/pkgi_ps3.c @@ -1019,13 +1019,11 @@ void pkgi_clip_remove(void) void pkgi_draw_fill_rect(int x, int y, int w, int h, uint32_t color) { ya2d_drawFillRect(x, y, w, h, RGBA_COLOR(color, 255)); -// ya2d_drawRect(x, y, w, h, RGBA_COLOR(PKGI_COLOR_MENU_BORDER, 255)); } void pkgi_draw_fill_rect_z(int x, int y, int z, int w, int h, uint32_t color) { ya2d_drawFillRectZ(x, y, z, w, h, RGBA_COLOR(color, 255)); -// ya2d_drawRectZ(x, y, z, w, h, RGBA_COLOR(border, 255)); } void pkgi_draw_rect_z(int x, int y, int z, int w, int h, uint32_t color) @@ -1503,7 +1501,6 @@ int pkgi_write(void* f, const void* buffer, uint32_t size) if (write < 0) { LOG("fwrite error 0x%08x", write); -// return -1; } else {