mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Fix ./configure --disable-rgui
This commit is contained in:
parent
cf3a010ead
commit
bd16fd49ab
@ -2,6 +2,10 @@
|
|||||||
#include <string/stdstring.h>
|
#include <string/stdstring.h>
|
||||||
#include <streams/file_stream.h>
|
#include <streams/file_stream.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
#include "../menu/menu_display.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../file_path_special.h"
|
#include "../file_path_special.h"
|
||||||
#include "../configuration.h"
|
#include "../configuration.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
@ -30,8 +34,10 @@ void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
|||||||
PATH_MAX_LENGTH * sizeof(char),
|
PATH_MAX_LENGTH * sizeof(char),
|
||||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
menu_display_reset_textures_list(badge_file, fullpath,
|
menu_display_reset_textures_list(badge_file, fullpath,
|
||||||
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
&badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_badge_info (badges_ctx_t *badge_struct, int id,
|
void set_badge_info (badges_ctx_t *badge_struct, int id,
|
||||||
|
@ -341,7 +341,8 @@ static void d3d_viewport_info(void *data, struct video_viewport *vp)
|
|||||||
d3d->renderchain_driver->viewport_info(d3d, vp);
|
d3d->renderchain_driver->viewport_info(d3d, vp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void d3d_overlay_render(d3d_video_t *d3d, video_frame_info_t *video_info,
|
static void d3d_overlay_render(d3d_video_t *d3d,
|
||||||
|
video_frame_info_t *video_info,
|
||||||
overlay_t *overlay)
|
overlay_t *overlay)
|
||||||
{
|
{
|
||||||
struct video_viewport vp;
|
struct video_viewport vp;
|
||||||
@ -991,7 +992,6 @@ static bool d3d_init_internal(d3d_video_t *d3d,
|
|||||||
|
|
||||||
d3d->should_resize = false;
|
d3d->should_resize = false;
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
d3d->menu = (overlay_t*)calloc(1, sizeof(*d3d->menu));
|
d3d->menu = (overlay_t*)calloc(1, sizeof(*d3d->menu));
|
||||||
|
|
||||||
if (!d3d->menu)
|
if (!d3d->menu)
|
||||||
@ -1005,7 +1005,6 @@ static bool d3d_init_internal(d3d_video_t *d3d,
|
|||||||
d3d->menu->vert_coords[1] = 1;
|
d3d->menu->vert_coords[1] = 1;
|
||||||
d3d->menu->vert_coords[2] = 1;
|
d3d->menu->vert_coords[2] = 1;
|
||||||
d3d->menu->vert_coords[3] = -1;
|
d3d->menu->vert_coords[3] = -1;
|
||||||
#endif
|
|
||||||
|
|
||||||
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
|
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
|
||||||
|
|
||||||
@ -1174,11 +1173,8 @@ static void *d3d_init(const video_info_t *info,
|
|||||||
#endif
|
#endif
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
d3d->should_resize = false;
|
d3d->should_resize = false;
|
||||||
#else
|
#endif
|
||||||
#ifdef HAVE_MENU
|
|
||||||
d3d->menu = NULL;
|
d3d->menu = NULL;
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
||||||
|
|
||||||
@ -1233,12 +1229,10 @@ static void d3d_free(void *data)
|
|||||||
d3d->overlays_size = 0;
|
d3d->overlays_size = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
d3d_free_overlay(d3d, d3d->menu);
|
d3d_free_overlay(d3d, d3d->menu);
|
||||||
if (d3d->menu)
|
if (d3d->menu)
|
||||||
free(d3d->menu);
|
free(d3d->menu);
|
||||||
d3d->menu = NULL;
|
d3d->menu = NULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
d3d_deinitialize(d3d);
|
d3d_deinitialize(d3d);
|
||||||
|
|
||||||
@ -1558,7 +1552,6 @@ static bool d3d_set_shader(void *data,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static void d3d_set_menu_texture_frame(void *data,
|
static void d3d_set_menu_texture_frame(void *data,
|
||||||
const void *frame, bool rgb32, unsigned width, unsigned height,
|
const void *frame, bool rgb32, unsigned width, unsigned height,
|
||||||
float alpha)
|
float alpha)
|
||||||
@ -1573,8 +1566,9 @@ static void d3d_set_menu_texture_frame(void *data,
|
|||||||
(void)height;
|
(void)height;
|
||||||
(void)alpha;
|
(void)alpha;
|
||||||
|
|
||||||
if (!d3d->menu->tex || d3d->menu->tex_w != width
|
if ( !d3d->menu->tex ||
|
||||||
|| d3d->menu->tex_h != height)
|
d3d->menu->tex_w != width ||
|
||||||
|
d3d->menu->tex_h != height)
|
||||||
{
|
{
|
||||||
if (d3d->menu)
|
if (d3d->menu)
|
||||||
d3d_texture_free(d3d->menu->tex);
|
d3d_texture_free(d3d->menu->tex);
|
||||||
@ -1652,7 +1646,6 @@ static void d3d_set_menu_texture_enable(void *data,
|
|||||||
d3d->menu->enabled = state;
|
d3d->menu->enabled = state;
|
||||||
d3d->menu->fullscreen = full_screen;
|
d3d->menu->fullscreen = full_screen;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void video_texture_load_d3d(d3d_video_t *d3d,
|
static void video_texture_load_d3d(d3d_video_t *d3d,
|
||||||
struct texture_image *ti,
|
struct texture_image *ti,
|
||||||
|
@ -77,9 +77,7 @@ typedef struct d3d_video
|
|||||||
unsigned cur_mon_id;
|
unsigned cur_mon_id;
|
||||||
unsigned dev_rotation;
|
unsigned dev_rotation;
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
overlay_t *menu;
|
overlay_t *menu;
|
||||||
#endif
|
|
||||||
const d3d_renderchain_driver_t *renderchain_driver;
|
const d3d_renderchain_driver_t *renderchain_driver;
|
||||||
void *renderchain_data;
|
void *renderchain_data;
|
||||||
|
|
||||||
|
@ -730,7 +730,6 @@ static void gl_set_texture_enable(void *data, bool state, bool full_screen)
|
|||||||
gl->menu_texture_full_screen = full_screen;
|
gl->menu_texture_full_screen = full_screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
static void gl_render_osd_background(
|
static void gl_render_osd_background(
|
||||||
gl_t *gl, video_frame_info_t *video_info,
|
gl_t *gl, video_frame_info_t *video_info,
|
||||||
const char *msg)
|
const char *msg)
|
||||||
@ -846,6 +845,7 @@ static void gl_render_osd_background(
|
|||||||
video_info->height, false, true);
|
video_info->height, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_MENU)
|
||||||
static void gl_set_osd_msg(void *data,
|
static void gl_set_osd_msg(void *data,
|
||||||
video_frame_info_t *video_info,
|
video_frame_info_t *video_info,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
@ -868,32 +868,6 @@ static struct video_shader *gl_get_current_shader(void *data)
|
|||||||
return shader_info.data;
|
return shader_info.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl_pbo_async_readback(gl_t *gl)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_OPENGLES
|
|
||||||
GLenum fmt = GL_RGBA;
|
|
||||||
GLenum type = GL_UNSIGNED_BYTE;
|
|
||||||
#else
|
|
||||||
GLenum fmt = GL_BGRA;
|
|
||||||
GLenum type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (gl->renderchain_driver->bind_pbo)
|
|
||||||
gl->renderchain_driver->bind_pbo(
|
|
||||||
gl->pbo_readback[gl->pbo_readback_index++]);
|
|
||||||
gl->pbo_readback_index &= 3;
|
|
||||||
|
|
||||||
/* 4 frames back, we can readback. */
|
|
||||||
gl->pbo_readback_valid[gl->pbo_readback_index] = true;
|
|
||||||
|
|
||||||
if (gl->renderchain_driver->readback)
|
|
||||||
gl->renderchain_driver->readback(gl, gl->renderchain_data,
|
|
||||||
video_pixel_get_alignment(gl->vp.width * sizeof(uint32_t)),
|
|
||||||
fmt, type, NULL);
|
|
||||||
if (gl->renderchain_driver->unbind_pbo)
|
|
||||||
gl->renderchain_driver->unbind_pbo(gl, gl->renderchain_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
|
static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
video_shader_ctx_coords_t coords;
|
video_shader_ctx_coords_t coords;
|
||||||
@ -956,6 +930,32 @@ static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void gl_pbo_async_readback(gl_t *gl)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_OPENGLES
|
||||||
|
GLenum fmt = GL_RGBA;
|
||||||
|
GLenum type = GL_UNSIGNED_BYTE;
|
||||||
|
#else
|
||||||
|
GLenum fmt = GL_BGRA;
|
||||||
|
GLenum type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (gl->renderchain_driver->bind_pbo)
|
||||||
|
gl->renderchain_driver->bind_pbo(
|
||||||
|
gl->pbo_readback[gl->pbo_readback_index++]);
|
||||||
|
gl->pbo_readback_index &= 3;
|
||||||
|
|
||||||
|
/* 4 frames back, we can readback. */
|
||||||
|
gl->pbo_readback_valid[gl->pbo_readback_index] = true;
|
||||||
|
|
||||||
|
if (gl->renderchain_driver->readback)
|
||||||
|
gl->renderchain_driver->readback(gl, gl->renderchain_data,
|
||||||
|
video_pixel_get_alignment(gl->vp.width * sizeof(uint32_t)),
|
||||||
|
fmt, type, NULL);
|
||||||
|
if (gl->renderchain_driver->unbind_pbo)
|
||||||
|
gl->renderchain_driver->unbind_pbo(gl, gl->renderchain_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool gl_frame(void *data, const void *frame,
|
static bool gl_frame(void *data, const void *frame,
|
||||||
unsigned frame_width, unsigned frame_height,
|
unsigned frame_width, unsigned frame_height,
|
||||||
|
@ -2189,7 +2189,6 @@ static void vulkan_set_texture_enable(void *data, bool state, bool full_screen)
|
|||||||
vk->menu.full_screen = full_screen;
|
vk->menu.full_screen = full_screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
static void vulkan_set_osd_msg(void *data,
|
static void vulkan_set_osd_msg(void *data,
|
||||||
video_frame_info_t *video_info,
|
video_frame_info_t *video_info,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
@ -2197,7 +2196,6 @@ static void vulkan_set_osd_msg(void *data,
|
|||||||
{
|
{
|
||||||
font_driver_render_msg(video_info, font, msg, params);
|
font_driver_render_msg(video_info, font, msg, params);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static uintptr_t vulkan_load_texture(void *video_data, void *data,
|
static uintptr_t vulkan_load_texture(void *video_data, void *data,
|
||||||
bool threaded, enum texture_filter_type filter_type)
|
bool threaded, enum texture_filter_type filter_type)
|
||||||
@ -2276,11 +2274,9 @@ static const video_poke_interface_t vulkan_poke_interface = {
|
|||||||
vulkan_apply_state_changes,
|
vulkan_apply_state_changes,
|
||||||
vulkan_set_texture_frame,
|
vulkan_set_texture_frame,
|
||||||
vulkan_set_texture_enable,
|
vulkan_set_texture_enable,
|
||||||
#ifdef HAVE_MENU
|
|
||||||
vulkan_set_osd_msg,
|
vulkan_set_osd_msg,
|
||||||
#endif
|
|
||||||
vulkan_show_mouse,
|
vulkan_show_mouse,
|
||||||
NULL,
|
NULL, /* grab_mouse_toggle */
|
||||||
vulkan_get_current_shader,
|
vulkan_get_current_shader,
|
||||||
vulkan_get_current_sw_framebuffer,
|
vulkan_get_current_sw_framebuffer,
|
||||||
vulkan_get_hw_render_interface,
|
vulkan_get_hw_render_interface,
|
||||||
|
@ -166,7 +166,6 @@ struct thread_video
|
|||||||
const input_driver_t **input;
|
const input_driver_t **input;
|
||||||
void **input_data;
|
void **input_data;
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void *frame;
|
void *frame;
|
||||||
@ -179,7 +178,6 @@ struct thread_video
|
|||||||
bool enable;
|
bool enable;
|
||||||
bool full_screen;
|
bool full_screen;
|
||||||
} texture;
|
} texture;
|
||||||
#endif
|
|
||||||
bool apply_state_changes;
|
bool apply_state_changes;
|
||||||
|
|
||||||
bool alive;
|
bool alive;
|
||||||
@ -1154,7 +1152,6 @@ static void thread_set_aspect_ratio(void *data, unsigned aspectratio_idx)
|
|||||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
static void thread_set_texture_frame(void *data, const void *frame,
|
static void thread_set_texture_frame(void *data, const void *frame,
|
||||||
bool rgb32, unsigned width, unsigned height, float alpha)
|
bool rgb32, unsigned width, unsigned height, float alpha)
|
||||||
{
|
{
|
||||||
@ -1195,6 +1192,7 @@ static void thread_set_texture_enable(void *data, bool state, bool full_screen)
|
|||||||
slock_unlock(thr->frame.lock);
|
slock_unlock(thr->frame.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_MENU)
|
||||||
static void thread_set_osd_msg(void *data,
|
static void thread_set_osd_msg(void *data,
|
||||||
video_frame_info_t *video_info,
|
video_frame_info_t *video_info,
|
||||||
const char *msg,
|
const char *msg,
|
||||||
|
@ -31,7 +31,9 @@
|
|||||||
#include <retro_miscellaneous.h>
|
#include <retro_miscellaneous.h>
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
#include "../menu/menu_driver.h"
|
#include "../menu/menu_driver.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
@ -83,13 +85,19 @@ void input_mapper_poll(input_mapper_t *handle)
|
|||||||
int i;
|
int i;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
unsigned device = settings->uints.input_libretro_device[handle->port];
|
unsigned device = settings->uints.input_libretro_device[handle->port];
|
||||||
|
#ifdef HAVE_MENU
|
||||||
bool menu_is_alive = menu_driver_is_alive();
|
bool menu_is_alive = menu_driver_is_alive();
|
||||||
|
#endif
|
||||||
|
|
||||||
device &= RETRO_DEVICE_MASK;
|
device &= RETRO_DEVICE_MASK;
|
||||||
|
|
||||||
/* for now we only handle keyboard inputs */
|
/* for now we only handle keyboard inputs */
|
||||||
if (device != RETRO_DEVICE_KEYBOARD || menu_is_alive)
|
if (device != RETRO_DEVICE_KEYBOARD)
|
||||||
return;
|
return;
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
if (menu_is_alive)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
memset(handle->keys, 0, sizeof(handle->keys));
|
memset(handle->keys, 0, sizeof(handle->keys));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user