mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
(RARCH_CONSOLE) Build fixes
This commit is contained in:
parent
b62a2b602a
commit
db0ff2a212
2
driver.h
2
driver.h
@ -335,7 +335,7 @@ typedef struct video_poke_interface
|
||||
void (*set_aspect_ratio)(void *data, unsigned aspectratio_index);
|
||||
void (*apply_state_changes)(void *data);
|
||||
|
||||
#if defined(HAVE_RGUI)
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
void (*set_texture_frame)(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha); // Update texture.
|
||||
void (*set_texture_enable)(void *data, bool enable); // Enable/disable rendering.
|
||||
#endif
|
||||
|
@ -130,7 +130,7 @@ static inline bool input_key_pressed_func(int key)
|
||||
#define video_set_rotation_func(rotation) MAKENAME_VIDEO(_set_rotation)(driver.video_data, rotation)
|
||||
#define video_stop_func() MAKENAME_VIDEO(_stop)()
|
||||
#define video_start_func() MAKENAME_VIDEO(_start)()
|
||||
#define video_set_shader_func(type, path, mask) MAKENAME_VIDEO(_set_shader)(driver.video_data, type, path, mask)
|
||||
#define video_set_shader_func(type, path) MAKENAME_VIDEO(_set_shader)(driver.video_data, type, path)
|
||||
#define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path)
|
||||
|
||||
/*============================================================
|
||||
|
16
gfx/gl.c
16
gfx/gl.c
@ -793,7 +793,7 @@ void gl_set_viewport(void *data, unsigned width, unsigned height, bool force_ful
|
||||
float desired_aspect = g_extern.system.aspect_ratio;
|
||||
float delta;
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
|
||||
{
|
||||
x = g_extern.console.screen.viewports.custom_vp.x;
|
||||
@ -1304,7 +1304,7 @@ static void gl_pbo_async_readback(void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
static inline void gl_draw_texture(void *data)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
@ -1438,7 +1438,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
|
||||
gl_set_prev_texture(gl, &tex_info);
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
if (gl->rgui_texture_enable)
|
||||
gl_draw_texture(gl);
|
||||
#endif
|
||||
@ -1520,7 +1520,7 @@ static void gl_free(void *data)
|
||||
|
||||
glDeleteTextures(TEXTURES, gl->texture);
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
if (gl->rgui_texture)
|
||||
glDeleteTextures(1, &gl->rgui_texture);
|
||||
#endif
|
||||
@ -1655,7 +1655,7 @@ static inline void gl_reinit_textures(void *data, const video_info_t *video)
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glDeleteTextures(TEXTURES, gl->texture);
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
glDeleteTextures(1, &gl->rgui_texture);
|
||||
#endif
|
||||
|
||||
@ -2340,7 +2340,7 @@ static void gl_set_blend(void *data, bool enable)
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
static void gl_set_texture_frame(void *data,
|
||||
const void *frame, bool rgb32, unsigned width, unsigned height,
|
||||
float alpha)
|
||||
@ -2361,8 +2361,10 @@ static void gl_set_texture_frame(void *data,
|
||||
|
||||
gl->rgui_texture_alpha = alpha;
|
||||
|
||||
#ifndef HAVE_PSGL
|
||||
unsigned base_size = rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * base_size));
|
||||
#endif
|
||||
|
||||
if (rgb32)
|
||||
{
|
||||
@ -2420,7 +2422,7 @@ static const video_poke_interface_t gl_poke_interface = {
|
||||
#endif
|
||||
gl_set_aspect_ratio,
|
||||
gl_apply_state_changes,
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
gl_set_texture_frame,
|
||||
gl_set_texture_enable,
|
||||
#endif
|
||||
|
@ -285,7 +285,7 @@ typedef struct gl
|
||||
struct scaler_ctx pbo_readback_scaler;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
GLuint rgui_texture;
|
||||
bool rgui_texture_enable;
|
||||
GLfloat rgui_texture_alpha;
|
||||
|
@ -617,6 +617,11 @@ static bool add_import_value(struct gfx_shader *shader, xmlNodePtr ptr)
|
||||
unsigned mask_value = 0;
|
||||
unsigned mask_equal = 0;
|
||||
|
||||
/* TODO - variables never used? */
|
||||
(void)addr;
|
||||
(void)mask_value;
|
||||
(void)mask_equal;
|
||||
|
||||
if (!*semantic || !*var->id)
|
||||
{
|
||||
RARCH_ERR("No semantic or ID for import value.\n");
|
||||
|
@ -71,7 +71,7 @@ typedef struct thread_video
|
||||
const input_driver_t **input;
|
||||
void **input_data;
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
struct
|
||||
{
|
||||
void *frame;
|
||||
@ -303,7 +303,7 @@ static void thread_loop(void *data)
|
||||
{
|
||||
slock_lock(thr->frame.lock);
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
if (thr->texture.frame_updated)
|
||||
{
|
||||
thr->poke->set_texture_frame(thr->driver_data,
|
||||
@ -425,7 +425,7 @@ static bool thread_frame(void *data, const void *frame_,
|
||||
// If we are going to render menu,
|
||||
// we'll want to block to avoid stepping menu
|
||||
// at crazy speeds.
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
if (thr->texture.enable)
|
||||
{
|
||||
while (thr->frame.updated)
|
||||
@ -639,7 +639,7 @@ static void thread_set_aspect_ratio(void *data, unsigned aspectratio_index)
|
||||
thread_wait_reply(thr, CMD_POKE_SET_ASPECT_RATIO);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
static void thread_set_texture_frame(void *data, const void *frame,
|
||||
bool rgb32, unsigned width, unsigned height, float alpha)
|
||||
{
|
||||
@ -692,7 +692,7 @@ static const video_poke_interface_t thread_poke = {
|
||||
#endif
|
||||
thread_set_aspect_ratio,
|
||||
thread_apply_state_changes,
|
||||
#ifdef HAVE_RGUI
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
thread_set_texture_frame,
|
||||
thread_set_texture_enable,
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user