mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-10 21:10:15 +00:00
(gfx/video_texture_image.c) remove dependencies
This commit is contained in:
parent
bc53d6fdc3
commit
265c931c46
@ -1489,6 +1489,7 @@ void video_driver_set_rgba(void)
|
||||
{
|
||||
video_driver_lock();
|
||||
video_driver_use_rgba = true;
|
||||
video_texture_image_set_rgba();
|
||||
video_driver_unlock();
|
||||
}
|
||||
|
||||
@ -1496,6 +1497,7 @@ void video_driver_unset_rgba(void)
|
||||
{
|
||||
video_driver_lock();
|
||||
video_driver_use_rgba = false;
|
||||
video_texture_image_unset_rgba();
|
||||
video_driver_unlock();
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <formats/image.h>
|
||||
#include <file/nbio.h>
|
||||
|
||||
#include "video_driver.h"
|
||||
|
||||
enum video_image_format
|
||||
{
|
||||
IMAGE_FORMAT_NONE = 0,
|
||||
@ -38,6 +36,18 @@ enum video_image_format
|
||||
IMAGE_FORMAT_BMP
|
||||
};
|
||||
|
||||
static bool video_texture_image_supports_rgba = false;
|
||||
|
||||
void video_texture_image_set_rgba(void)
|
||||
{
|
||||
video_texture_image_supports_rgba = true;
|
||||
}
|
||||
|
||||
void video_texture_image_unset_rgba(void)
|
||||
{
|
||||
video_texture_image_supports_rgba = false;
|
||||
}
|
||||
|
||||
bool video_texture_image_set_color_shifts(
|
||||
unsigned *r_shift, unsigned *g_shift, unsigned *b_shift,
|
||||
unsigned *a_shift)
|
||||
@ -47,7 +57,7 @@ bool video_texture_image_set_color_shifts(
|
||||
*g_shift = 8;
|
||||
*b_shift = 0;
|
||||
|
||||
if (video_driver_supports_rgba())
|
||||
if (video_texture_image_supports_rgba)
|
||||
{
|
||||
*r_shift = 0;
|
||||
*b_shift = 16;
|
||||
@ -120,10 +130,7 @@ static bool video_texture_image_internal_gx_convert_texture32(
|
||||
* image->height * sizeof(uint32_t));
|
||||
|
||||
if (!tmp)
|
||||
{
|
||||
RARCH_ERR("Failed to create temp buffer for conversion.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(tmp, image->pixels, image->width
|
||||
* image->height * sizeof(uint32_t));
|
||||
|
@ -58,6 +58,8 @@ bool video_texture_image_color_convert(unsigned r_shift,
|
||||
|
||||
bool video_texture_image_load(struct texture_image *img, const char *path);
|
||||
void video_texture_image_free(struct texture_image *img);
|
||||
void video_texture_image_set_rgba(void);
|
||||
void video_texture_image_unset_rgba(void);
|
||||
|
||||
/* Image transfer */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user