mirror of
https://github.com/libretro/RetroArch
synced 2025-03-19 16:21:30 +00:00
Cleanups
This commit is contained in:
parent
49fb0d7909
commit
c1717fc028
18
retroarch.c
18
retroarch.c
@ -4215,9 +4215,7 @@ static void handle_translation_cb(
|
||||
else if (raw_image_file_data[1] == 'P' &&
|
||||
raw_image_file_data[2] == 'N' &&
|
||||
raw_image_file_data[3] == 'G')
|
||||
{
|
||||
image_type = IMAGE_TYPE_PNG;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("Invalid image type returned from server.\n");
|
||||
@ -4264,7 +4262,7 @@ static void handle_translation_cb(
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[24]) << 16) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[23]) << 8) +
|
||||
((uint32_t) ((uint8_t)raw_image_file_data[22]) << 0);
|
||||
raw_image_data = malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
raw_image_data = (void*)malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
memcpy(raw_image_data,
|
||||
raw_image_file_data+54*sizeof(uint8_t),
|
||||
image_width*image_height*3*sizeof(uint8_t));
|
||||
@ -4298,8 +4296,7 @@ static void handle_translation_cb(
|
||||
do
|
||||
{
|
||||
retval = rpng_process_image(rpng, &raw_image_data_alpha, new_image_size, &image_width, &image_height);
|
||||
}
|
||||
while(retval == IMAGE_PROCESS_NEXT);
|
||||
} while(retval == IMAGE_PROCESS_NEXT);
|
||||
|
||||
/* Returned output from the png processor is an upside down RGBA
|
||||
* image, so we have to change that to RGB first. This should
|
||||
@ -4308,7 +4305,7 @@ static void handle_translation_cb(
|
||||
unsigned ui;
|
||||
int d,tw,th,tc;
|
||||
d=0;
|
||||
raw_image_data = malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
raw_image_data = (void*)malloc(image_width*image_height*3*sizeof(uint8_t));
|
||||
for (ui=0;ui<image_width*image_height*4;ui++)
|
||||
{
|
||||
if (ui%4 != 3)
|
||||
@ -4419,9 +4416,7 @@ static void handle_translation_cb(
|
||||
#endif
|
||||
|
||||
if (text_string && is_accessibility_enabled())
|
||||
{
|
||||
accessibility_speak(text_string);
|
||||
}
|
||||
|
||||
finish:
|
||||
if (error)
|
||||
@ -4667,7 +4662,7 @@ static bool run_translation_service(void)
|
||||
const char *rf2 = "\"}\0";
|
||||
char *rf3 = NULL;
|
||||
bool TRANSLATE_USE_BMP = false;
|
||||
bool use_overlay = true;
|
||||
bool use_overlay = false;
|
||||
|
||||
const char *label = NULL;
|
||||
char* system_label = NULL;
|
||||
@ -4690,13 +4685,8 @@ static bool run_translation_service(void)
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
if (video_driver_poke
|
||||
&& video_driver_poke->load_texture && video_driver_poke->unload_texture)
|
||||
{
|
||||
use_overlay = true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
use_overlay = false;
|
||||
|
||||
|
||||
/* get the core info here so we can pass long the game name */
|
||||
core_info_get_current_core(&core_info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user