Skip to content

Commit

Permalink
Fix ps2classic progress (#137)
Browse files Browse the repository at this point in the history
* Update ps2classic.c
  • Loading branch information
bucanero authored Dec 3, 2023
1 parent dc6f711 commit c1e7adc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/ps2classic.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ void ps2_decrypt_image(u8 dex_mode, const char* image_name, const char* data_fil
int percent;

decr_size = c = percent = 0;
LOG("PS2Classic decrypt '%s' -> '%s'", image_name, data_file);

if (!get_image_klicensee(image_name, klicensee))
return;
Expand All @@ -557,7 +558,7 @@ void ps2_decrypt_image(u8 dex_mode, const char* image_name, const char* data_fil
total_size = data_size;
flush_size = total_size / 100;

for (i = 0; i < 0x20; c++)
for (i = 0; i < 0x20; i++)
update_progress_bar(0, total_size, image_name);

LOG("segment size: %x\ndata_size: %lx\n", segment_size, data_size);
Expand Down Expand Up @@ -647,6 +648,7 @@ void ps2_encrypt_image(u8 cfg_mode, const char* image_name, const char* data_fil
int percent;

encr_size = c = percent = 0;
LOG("PS2Classic encrypt '%s' -> '%s'", image_name, data_file);

//open files
data_out = fopen(data_file, "wb");
Expand All @@ -662,7 +664,7 @@ void ps2_encrypt_image(u8 cfg_mode, const char* image_name, const char* data_fil
total_size = data_size;
flush_size = total_size / 100;

for (i = 0; i < 0x20; c++)
for (i = 0; i < 0x20; i++)
update_progress_bar(0, total_size, image_name);

/* limg section */
Expand Down

0 comments on commit c1e7adc

Please sign in to comment.