Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Mar 7, 2020
1 parent 20366f3 commit 9ae4031
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
6 changes: 3 additions & 3 deletions tasks/task_database_cue.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ static int detect_ps1_game_sub(intfstream_t *fp,
{
uint8_t* tmp;
uint8_t* boot_file;
int skip, frame_size, is_mode1, cd_sector;
int skip, frame_size, cd_sector;
uint8_t buffer[2048 * 2];
int is_mode1 = 0;

buffer[0] = '\0';
is_mode1 = 0;
buffer[0] = '\0';

if (intfstream_seek(fp, 0, SEEK_END) == -1)
return 0;
Expand Down
26 changes: 13 additions & 13 deletions tasks/task_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,25 @@ enum patch_error

struct bps_data
{
const uint8_t *modify_data;
const uint8_t *source_data;
uint8_t *target_data;
size_t modify_length;
size_t source_length;
size_t target_length;
size_t modify_offset;
size_t source_offset;
size_t target_offset;
uint32_t modify_checksum;
uint32_t source_checksum;
uint32_t target_checksum;
size_t source_relative_offset;
size_t target_relative_offset;
size_t output_offset;
uint32_t modify_checksum;
uint32_t source_checksum;
uint32_t target_checksum;
const uint8_t *modify_data;
const uint8_t *source_data;
uint8_t *target_data;
};

struct ups_data
{
const uint8_t *patch_data;
const uint8_t *source_data;
uint8_t *target_data;
unsigned patch_length;
unsigned source_length;
unsigned target_length;
Expand All @@ -91,6 +88,9 @@ struct ups_data
unsigned patch_checksum;
unsigned source_checksum;
unsigned target_checksum;
const uint8_t *patch_data;
const uint8_t *source_data;
uint8_t *target_data;
};

typedef enum patch_error (*patch_func_t)(const uint8_t*, uint64_t,
Expand Down Expand Up @@ -329,10 +329,10 @@ static enum patch_error ups_apply_patch(
struct ups_data data;
unsigned source_read_length;
unsigned target_read_length;
uint32_t patch_result_checksum;
uint32_t patch_read_checksum = 0;
uint32_t source_read_checksum = 0;
uint32_t target_read_checksum = 0;
uint32_t patch_result_checksum = 0;
uint32_t patch_read_checksum = 0;
uint32_t source_read_checksum = 0;
uint32_t target_read_checksum = 0;

data.patch_data = patchdata;
data.source_data = sourcedata;
Expand Down
12 changes: 8 additions & 4 deletions tasks/task_screenshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,21 @@ struct screenshot_task_state
bool history_list_enable;
bool pl_fuzzy_archive_match;
bool pl_use_old_format;
bool widgets_ready;

int pitch;
unsigned width;
unsigned height;
unsigned pixel_format_type;
uint8_t *out_buffer;
const void *frame;

char filename[PATH_MAX_LENGTH];
char shotname[256];
void *userbuf;
bool widgets_ready;

struct scaler_ctx scaler;

uint8_t *out_buffer;
const void *frame;
void *userbuf;
};

static bool screenshot_dump_direct(screenshot_task_state_t *state)
Expand Down

0 comments on commit 9ae4031

Please sign in to comment.