mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
load shader presets at startup on wiiu
This commit is contained in:
parent
9889f34180
commit
d953ec2b5f
@ -18,6 +18,7 @@
|
|||||||
#include <wiiu/os.h>
|
#include <wiiu/os.h>
|
||||||
#include <wiiu/gx2.h>
|
#include <wiiu/gx2.h>
|
||||||
#include <formats/image.h>
|
#include <formats/image.h>
|
||||||
|
#include <file/file_path.h>
|
||||||
|
|
||||||
#include "../../driver.h"
|
#include "../../driver.h"
|
||||||
#include "../../configuration.h"
|
#include "../../configuration.h"
|
||||||
@ -53,6 +54,9 @@ static const wiiu_render_mode_t wiiu_render_mode_map[] =
|
|||||||
{1920, 1080, GX2_TV_RENDER_MODE_WIDE_1080P} /* GX2_TV_SCAN_MODE_1080P */
|
{1920, 1080, GX2_TV_RENDER_MODE_WIDE_1080P} /* GX2_TV_SCAN_MODE_1080P */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool wiiu_gfx_set_shader(void *data,
|
||||||
|
enum rarch_shader_type type, const char *path);
|
||||||
|
|
||||||
static void wiiu_set_tex_coords(frame_vertex_t *v, GX2Texture *texture, float u0, float v0,
|
static void wiiu_set_tex_coords(frame_vertex_t *v, GX2Texture *texture, float u0, float v0,
|
||||||
float u1, float v1,
|
float u1, float v1,
|
||||||
unsigned rotation)
|
unsigned rotation)
|
||||||
@ -191,6 +195,7 @@ static void wiiu_gfx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
|||||||
static void *wiiu_gfx_init(const video_info_t *video,
|
static void *wiiu_gfx_init(const video_info_t *video,
|
||||||
const input_driver_t **input, void **input_data)
|
const input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
float refresh_rate = 60.0f / 1.001f;
|
float refresh_rate = 60.0f / 1.001f;
|
||||||
u32 size = 0;
|
u32 size = 0;
|
||||||
u32 tmp = 0;
|
u32 tmp = 0;
|
||||||
@ -205,7 +210,6 @@ static void *wiiu_gfx_init(const video_info_t *video,
|
|||||||
|
|
||||||
if (input && input_data)
|
if (input && input_data)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
wiiuinput = input_wiiu.init(settings->arrays.input_joypad_driver);
|
wiiuinput = input_wiiu.init(settings->arrays.input_joypad_driver);
|
||||||
*input = wiiuinput ? &input_wiiu : NULL;
|
*input = wiiuinput ? &input_wiiu : NULL;
|
||||||
*input_data = wiiuinput;
|
*input_data = wiiuinput;
|
||||||
@ -440,6 +444,14 @@ static void *wiiu_gfx_init(const video_info_t *video,
|
|||||||
video->is_threaded,
|
video->is_threaded,
|
||||||
FONT_DRIVER_RENDER_WIIU);
|
FONT_DRIVER_RENDER_WIIU);
|
||||||
|
|
||||||
|
if(settings->bools.video_shader_enable)
|
||||||
|
{
|
||||||
|
const char* ext = path_get_extension(settings->paths.path_shader);
|
||||||
|
|
||||||
|
if(ext && !strncmp(ext, "slang", 5))
|
||||||
|
wiiu_gfx_set_shader(wiiu, RARCH_SHADER_SLANG, settings->paths.path_shader);
|
||||||
|
}
|
||||||
|
|
||||||
return wiiu;
|
return wiiu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user