Skip to content

Commit

Permalink
Minor changes for release
Browse files Browse the repository at this point in the history
cosmetic changes
  • Loading branch information
bucanero committed Dec 11, 2019
1 parent 531d215 commit 89f505f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion include/pkgi_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/pkgi_style.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 4 additions & 7 deletions source/pkgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
#include "pkgi_style.h"

#include <stddef.h>

#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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions source/pkgi_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions source/pkgi_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ static void update_progress(void)
}



// ------
static int create_dummy_pkg(void)
{
void *filew;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -352,7 +348,6 @@ static int queue_pkg_task()
return 1;
}

// ------

static void download_start(void)
{
Expand Down Expand Up @@ -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;

Expand Down
3 changes: 0 additions & 3 deletions source/pkgi_ps3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 89f505f

Please sign in to comment.