mirror of
https://github.com/libretro/RetroArch
synced 2025-03-15 13:21:29 +00:00
task_image.c - go through file_path_str
This commit is contained in:
parent
0506684e9f
commit
3a10dff94f
@ -56,6 +56,10 @@ enum file_path_enum
|
||||
FILE_PATH_SLANGP_EXTENSION,
|
||||
FILE_PATH_SRM_EXTENSION,
|
||||
FILE_PATH_PNG_EXTENSION,
|
||||
FILE_PATH_BMP_EXTENSION,
|
||||
FILE_PATH_TGA_EXTENSION,
|
||||
FILE_PATH_JPEG_EXTENSION,
|
||||
FILE_PATH_JPG_EXTENSION,
|
||||
FILE_PATH_UPS_EXTENSION,
|
||||
FILE_PATH_OPT_EXTENSION,
|
||||
FILE_PATH_IPS_EXTENSION,
|
||||
|
@ -71,6 +71,14 @@ const char *file_path_str(enum file_path_enum enum_idx)
|
||||
return "lpl";
|
||||
case FILE_PATH_PNG_EXTENSION:
|
||||
return ".png";
|
||||
case FILE_PATH_JPEG_EXTENSION:
|
||||
return ".jpeg";
|
||||
case FILE_PATH_BMP_EXTENSION:
|
||||
return ".bmp";
|
||||
case FILE_PATH_TGA_EXTENSION:
|
||||
return ".tga";
|
||||
case FILE_PATH_JPG_EXTENSION:
|
||||
return ".jpg";
|
||||
case FILE_PATH_UPS_EXTENSION:
|
||||
return ".ups";
|
||||
case FILE_PATH_IPS_EXTENSION:
|
||||
|
@ -29,9 +29,11 @@
|
||||
#include "../menu/menu_driver.h"
|
||||
#endif
|
||||
|
||||
#include "tasks_internal.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#include "tasks_internal.h"
|
||||
|
||||
enum image_status_enum
|
||||
{
|
||||
IMAGE_STATUS_POLL = 0,
|
||||
@ -354,13 +356,14 @@ bool task_push_image_load(const char *fullpath,
|
||||
nbio->cb = &cb_nbio_image_menu_thumbnail;
|
||||
nbio->status = NBIO_STATUS_TRANSFER;
|
||||
|
||||
if (strstr(fullpath, ".png"))
|
||||
if (strstr(fullpath, file_path_str(FILE_PATH_PNG_EXTENSION)))
|
||||
nbio->image_type = IMAGE_TYPE_PNG;
|
||||
else if (strstr(fullpath, ".jpeg") || strstr(fullpath, ".jpg"))
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_JPEG_EXTENSION))
|
||||
|| strstr(fullpath, file_path_str(FILE_PATH_JPG_EXTENSION)))
|
||||
nbio->image_type = IMAGE_TYPE_JPEG;
|
||||
else if (strstr(fullpath, ".bmp"))
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_BMP_EXTENSION)))
|
||||
nbio->image_type = IMAGE_TYPE_BMP;
|
||||
else if (strstr(fullpath, ".tga"))
|
||||
else if (strstr(fullpath, file_path_str(FILE_PATH_TGA_EXTENSION)))
|
||||
nbio->image_type = IMAGE_TYPE_TGA;
|
||||
|
||||
nbio_begin_read(handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user