(Menu) Replace more rgui_ references to menu_

This commit is contained in:
twinaphex 2014-06-10 02:15:29 +02:00
parent b70d6292ff
commit 4a4822e187
9 changed files with 86 additions and 86 deletions

View File

@ -1153,7 +1153,7 @@ static void d3d_show_mouse(void *data, bool state)
} }
#ifdef HAVE_MENU #ifdef HAVE_MENU
static void d3d_set_rgui_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)
{ {
@ -1218,7 +1218,7 @@ static void d3d_set_rgui_texture_frame(void *data,
} }
} }
static void d3d_set_rgui_texture_enable(void *data, bool state, bool full_screen) static void d3d_set_menu_texture_enable(void *data, bool state, bool full_screen)
{ {
d3d_video_t *d3d = (d3d_video_t*)data; d3d_video_t *d3d = (d3d_video_t*)data;
@ -1239,8 +1239,8 @@ static const video_poke_interface_t d3d_poke_interface = {
d3d_set_aspect_ratio, d3d_set_aspect_ratio,
d3d_apply_state_changes, d3d_apply_state_changes,
#ifdef HAVE_MENU #ifdef HAVE_MENU
d3d_set_rgui_texture_frame, d3d_set_menu_texture_frame,
d3d_set_rgui_texture_enable, d3d_set_menu_texture_enable,
#endif #endif
d3d_set_osd_msg, d3d_set_osd_msg,

View File

@ -1459,20 +1459,20 @@ static inline void gl_draw_texture(void *data)
{ {
gl_t *gl = (gl_t*)data; gl_t *gl = (gl_t*)data;
if (!gl->rgui_texture) if (!gl->menu_texture)
return; return;
const GLfloat color[] = { const GLfloat color[] = {
1.0f, 1.0f, 1.0f, gl->rgui_texture_alpha, 1.0f, 1.0f, 1.0f, gl->menu_texture_alpha,
1.0f, 1.0f, 1.0f, gl->rgui_texture_alpha, 1.0f, 1.0f, 1.0f, gl->menu_texture_alpha,
1.0f, 1.0f, 1.0f, gl->rgui_texture_alpha, 1.0f, 1.0f, 1.0f, gl->menu_texture_alpha,
1.0f, 1.0f, 1.0f, gl->rgui_texture_alpha, 1.0f, 1.0f, 1.0f, gl->menu_texture_alpha,
}; };
gl->coords.vertex = vertexes_flipped; gl->coords.vertex = vertexes_flipped;
gl->coords.tex_coord = tex_coords; gl->coords.tex_coord = tex_coords;
gl->coords.color = color; gl->coords.color = color;
glBindTexture(GL_TEXTURE_2D, gl->rgui_texture); glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
if (gl->shader) if (gl->shader)
gl->shader->use(gl, GL_SHADER_STOCK_BLEND); gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
@ -1481,7 +1481,7 @@ static inline void gl_draw_texture(void *data)
glEnable(GL_BLEND); glEnable(GL_BLEND);
if (gl->rgui_texture_full_screen) if (gl->menu_texture_full_screen)
{ {
glViewport(0, 0, gl->win_width, gl->win_height); glViewport(0, 0, gl->win_width, gl->win_height);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
@ -1630,7 +1630,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
if (g_extern.lifecycle_state & (1ULL << MODE_MENU) && driver.menu_ctx && driver.menu_ctx->frame) if (g_extern.lifecycle_state & (1ULL << MODE_MENU) && driver.menu_ctx && driver.menu_ctx->frame)
driver.menu_ctx->frame(); driver.menu_ctx->frame();
if (gl->rgui_texture_enable) if (gl->menu_texture_enable)
gl_draw_texture(gl); gl_draw_texture(gl);
#endif #endif
@ -1675,7 +1675,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
#ifdef HAVE_GL_ASYNC_READBACK #ifdef HAVE_GL_ASYNC_READBACK
#ifdef HAVE_MENU #ifdef HAVE_MENU
// Don't readback if we're in RGUI. // Don't readback if we're in RGUI.
else if (gl->pbo_readback_enable && !gl->rgui_texture_enable) else if (gl->pbo_readback_enable && !gl->menu_texture_enable)
gl_pbo_async_readback(gl); gl_pbo_async_readback(gl);
#endif #endif
#endif #endif
@ -1765,8 +1765,8 @@ static void gl_free(void *data)
glDeleteTextures(gl->textures, gl->texture); glDeleteTextures(gl->textures, gl->texture);
#if defined(HAVE_MENU) #if defined(HAVE_MENU)
if (gl->rgui_texture) if (gl->menu_texture)
glDeleteTextures(1, &gl->rgui_texture); glDeleteTextures(1, &gl->menu_texture);
#endif #endif
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
@ -2885,19 +2885,19 @@ static void gl_set_texture_frame(void *data,
context_bind_hw_render(gl, false); context_bind_hw_render(gl, false);
if (!gl->rgui_texture) if (!gl->menu_texture)
{ {
glGenTextures(1, &gl->rgui_texture); glGenTextures(1, &gl->menu_texture);
glBindTexture(GL_TEXTURE_2D, gl->rgui_texture); glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
} }
else else
glBindTexture(GL_TEXTURE_2D, gl->rgui_texture); glBindTexture(GL_TEXTURE_2D, gl->menu_texture);
gl->rgui_texture_alpha = alpha; gl->menu_texture_alpha = alpha;
unsigned base_size = rgb32 ? sizeof(uint32_t) : sizeof(uint16_t); unsigned base_size = rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * base_size)); glPixelStorei(GL_UNPACK_ALIGNMENT, get_alignment(width * base_size));
@ -2927,8 +2927,8 @@ static void gl_set_texture_enable(void *data, bool state, bool full_screen)
if (gl) if (gl)
{ {
gl->rgui_texture_enable = state; gl->menu_texture_enable = state;
gl->rgui_texture_full_screen = full_screen; gl->menu_texture_full_screen = full_screen;
} }
} }
#endif #endif

View File

@ -307,10 +307,10 @@ typedef struct gl
void *readback_buffer_screenshot; void *readback_buffer_screenshot;
#if defined(HAVE_MENU) #if defined(HAVE_MENU)
GLuint rgui_texture; GLuint menu_texture;
bool rgui_texture_enable; bool menu_texture_enable;
bool rgui_texture_full_screen; bool menu_texture_full_screen;
GLfloat rgui_texture_alpha; GLfloat menu_texture_alpha;
#endif #endif
#ifdef HAVE_GL_SYNC #ifdef HAVE_GL_SYNC

View File

@ -71,8 +71,8 @@ typedef struct limare_data {
int program; int program;
int program_rgui_rgba16; int program_menu_rgba16;
int program_rgui_rgba32; int program_menu_rgba32;
float screen_aspect; float screen_aspect;
float frame_aspect; float frame_aspect;
@ -131,7 +131,7 @@ static const char *fshader_main_src =
/* Header for RGUI fragment shader. */ /* Header for RGUI fragment shader. */
/* Use mediump, which makes uColor into a (single-precision) float[4]. */ /* Use mediump, which makes uColor into a (single-precision) float[4]. */
static const char *fshader_rgui_header_src = static const char *fshader_menu_header_src =
"precision mediump float;\n" "precision mediump float;\n"
"\n" "\n"
"varying vec2 coord;\n" "varying vec2 coord;\n"
@ -141,7 +141,7 @@ static const char *fshader_rgui_header_src =
"\n"; "\n";
/* Main (template) for RGUI fragment shader. */ /* Main (template) for RGUI fragment shader. */
static const char *fshader_rgui_main_src = static const char *fshader_menu_main_src =
"void main()\n" "void main()\n"
"{\n" "{\n"
" vec4 pixel = texture2D(in_texture, coord)%s;\n" " vec4 pixel = texture2D(in_texture, coord)%s;\n"
@ -393,27 +393,27 @@ static int create_programs(limare_data_t *pdata) {
if (limare_link(pdata->state)) goto fail; if (limare_link(pdata->state)) goto fail;
/* Create shader program for RGUI with RGBA4444 pixel data. */ /* Create shader program for RGUI with RGBA4444 pixel data. */
pdata->program_rgui_rgba16 = limare_program_new(pdata->state); pdata->program_menu_rgba16 = limare_program_new(pdata->state);
if (pdata->program_rgui_rgba16 < 0) goto fail; if (pdata->program_menu_rgba16 < 0) goto fail;
snprintf(tmpbufm, 1024, fshader_rgui_main_src, ".abgr"); snprintf(tmpbufm, 1024, fshader_menu_main_src, ".abgr");
strncpy(tmpbuf, fshader_rgui_header_src, 1024); strncpy(tmpbuf, fshader_menu_header_src, 1024);
strcat(tmpbuf, tmpbufm); strcat(tmpbuf, tmpbufm);
if (vertex_shader_attach(pdata->state, pdata->program_rgui_rgba16, vshader_src)) goto fail; if (vertex_shader_attach(pdata->state, pdata->program_menu_rgba16, vshader_src)) goto fail;
if (fragment_shader_attach(pdata->state, pdata->program_rgui_rgba16, tmpbuf)) goto fail; if (fragment_shader_attach(pdata->state, pdata->program_menu_rgba16, tmpbuf)) goto fail;
if (limare_link(pdata->state)) goto fail; if (limare_link(pdata->state)) goto fail;
/* Create shader program for RGUI with RGBA8888 pixel data. */ /* Create shader program for RGUI with RGBA8888 pixel data. */
pdata->program_rgui_rgba32 = limare_program_new(pdata->state); pdata->program_menu_rgba32 = limare_program_new(pdata->state);
if (pdata->program_rgui_rgba32 < 0) goto fail; if (pdata->program_menu_rgba32 < 0) goto fail;
snprintf(tmpbufm, 1024, fshader_rgui_main_src, ".abgr"); snprintf(tmpbufm, 1024, fshader_menu_main_src, ".abgr");
strncpy(tmpbuf, fshader_rgui_header_src, 1024); strncpy(tmpbuf, fshader_menu_header_src, 1024);
strcat(tmpbuf, tmpbufm); strcat(tmpbuf, tmpbufm);
if (vertex_shader_attach(pdata->state, pdata->program_rgui_rgba32, vshader_src)) goto fail; if (vertex_shader_attach(pdata->state, pdata->program_menu_rgba32, vshader_src)) goto fail;
if (fragment_shader_attach(pdata->state, pdata->program_rgui_rgba32, tmpbuf)) goto fail; if (fragment_shader_attach(pdata->state, pdata->program_menu_rgba32, tmpbuf)) goto fail;
if (limare_link(pdata->state)) goto fail; if (limare_link(pdata->state)) goto fail;
return 0; return 0;
@ -450,11 +450,11 @@ typedef struct lima_video {
unsigned width; unsigned width;
unsigned height; unsigned height;
/* RGUI data */ /* MENU data */
int rgui_rotation; int menu_rotation;
float rgui_alpha; float menu_alpha;
bool rgui_active; bool menu_active;
bool rgui_rgb32; bool menu_rgb32;
bool aspect_changed; bool aspect_changed;
@ -578,7 +578,7 @@ static void *lima_gfx_init(const video_info_t *video, const input_driver_t **inp
vid = calloc(1, sizeof(lima_video_t)); vid = calloc(1, sizeof(lima_video_t));
if (!vid) return NULL; if (!vid) return NULL;
vid->rgui_alpha = 1.0f; vid->menu_alpha = 1.0f;
lima = calloc(1, sizeof(limare_data_t)); lima = calloc(1, sizeof(limare_data_t));
if (!lima) goto fail; if (!lima) goto fail;
@ -662,7 +662,7 @@ static bool lima_gfx_frame(void *data, const void *frame,
vid = data; vid = data;
/* Check if neither RGUI nor emulator framebuffer is to be displayed. */ /* Check if neither RGUI nor emulator framebuffer is to be displayed. */
if (!vid->rgui_active && frame == NULL) return true; if (!vid->menu_active && frame == NULL) return true;
lima = vid->lima; lima = vid->lima;
@ -726,7 +726,7 @@ static bool lima_gfx_frame(void *data, const void *frame,
limare_attribute_pointer(lima->state, "in_vertex", LIMARE_ATTRIB_FLOAT, limare_attribute_pointer(lima->state, "in_vertex", LIMARE_ATTRIB_FLOAT,
3, 0, 4, lima->vertices); 3, 0, 4, lima->vertices);
limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT, limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT,
2, 0, 4, lima->coords + vid->rgui_rotation * 4); 2, 0, 4, lima->coords + vid->menu_rotation * 4);
limare_texture_attach(lima->state, "in_texture", lima->cur_texture->handle); limare_texture_attach(lima->state, "in_texture", lima->cur_texture->handle);
@ -759,12 +759,12 @@ static bool lima_gfx_frame(void *data, const void *frame,
limare_texture_mipmap_upload(lima->state, lima->font_texture->handle, 0, lima->buffer); limare_texture_mipmap_upload(lima->state, lima->font_texture->handle, 0, lima->buffer);
/* We re-use the RGBA16 RGUI program here. */ /* We re-use the RGBA16 RGUI program here. */
limare_program_current(lima->state, lima->program_rgui_rgba16); limare_program_current(lima->state, lima->program_menu_rgba16);
limare_attribute_pointer(lima->state, "in_vertex", LIMARE_ATTRIB_FLOAT, limare_attribute_pointer(lima->state, "in_vertex", LIMARE_ATTRIB_FLOAT,
3, 0, 4, font_vertices); 3, 0, 4, font_vertices);
limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT, limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT,
2, 0, 4, lima->coords + vid->rgui_rotation * 4); 2, 0, 4, lima->coords + vid->menu_rotation * 4);
limare_texture_attach(lima->state, "in_texture", lima->font_texture->handle); limare_texture_attach(lima->state, "in_texture", lima->font_texture->handle);
limare_uniform_attach(lima->state, "uColor", 4, font_color); limare_uniform_attach(lima->state, "uColor", 4, font_color);
@ -774,18 +774,18 @@ static bool lima_gfx_frame(void *data, const void *frame,
limare_disable(lima->state, GL_BLEND); limare_disable(lima->state, GL_BLEND);
} }
if (vid->rgui_active && lima->cur_texture_rgui != NULL) { if (vid->menu_active && lima->cur_texture_rgui != NULL) {
float color[4] = {1.0f, 1.0f, 1.0f, vid->rgui_alpha}; float color[4] = {1.0f, 1.0f, 1.0f, vid->menu_alpha};
if (vid->rgui_rgb32) if (vid->menu_rgb32)
limare_program_current(lima->state, lima->program_rgui_rgba32); limare_program_current(lima->state, lima->program_menu_rgba32);
else else
limare_program_current(lima->state, lima->program_rgui_rgba16); limare_program_current(lima->state, lima->program_menu_rgba16);
limare_attribute_pointer(lima->state, "in_vertex", LIMARE_ATTRIB_FLOAT, limare_attribute_pointer(lima->state, "in_vertex", LIMARE_ATTRIB_FLOAT,
3, 0, 4, lima->vertices); 3, 0, 4, lima->vertices);
limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT, limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT,
2, 0, 4, lima->coords + vid->rgui_rotation * 4); 2, 0, 4, lima->coords + vid->menu_rotation * 4);
limare_texture_attach(lima->state, "in_texture", lima->cur_texture_rgui->handle); limare_texture_attach(lima->state, "in_texture", lima->cur_texture_rgui->handle);
limare_uniform_attach(lima->state, "uColor", 4, color); limare_uniform_attach(lima->state, "uColor", 4, color);
@ -826,7 +826,7 @@ static bool lima_gfx_focus(void *data) {
static void lima_gfx_set_rotation(void *data, unsigned rotation) { static void lima_gfx_set_rotation(void *data, unsigned rotation) {
lima_video_t *vid = data; lima_video_t *vid = data;
vid->rgui_rotation = rotation; vid->menu_rotation = rotation;
} }
static void lima_gfx_viewport_info(void *data, struct rarch_viewport *vp) { static void lima_gfx_viewport_info(void *data, struct rarch_viewport *vp) {
@ -872,8 +872,8 @@ static void lima_set_texture_frame(void *data, const void *frame, bool rgb32,
const unsigned format = rgb32 ? LIMA_TEXEL_FORMAT_RGBA_8888 : const unsigned format = rgb32 ? LIMA_TEXEL_FORMAT_RGBA_8888 :
LIMA_TEXEL_FORMAT_RGBA_4444; LIMA_TEXEL_FORMAT_RGBA_4444;
vid->rgui_rgb32 = rgb32; vid->menu_rgb32 = rgb32;
vid->rgui_alpha = alpha; vid->menu_alpha = alpha;
tex = vid->lima->cur_texture_rgui; tex = vid->lima->cur_texture_rgui;
@ -904,7 +904,7 @@ upload:
static void lima_set_texture_enable(void *data, bool state, bool full_screen) { static void lima_set_texture_enable(void *data, bool state, bool full_screen) {
lima_video_t *vid = data; lima_video_t *vid = data;
vid->rgui_active = state; vid->menu_active = state;
} }
static void lima_set_osd_msg(void *data, const char *msg, void *userdata) { static void lima_set_osd_msg(void *data, const char *msg, void *userdata) {

View File

@ -350,7 +350,7 @@ static void setup_video_mode(void *data)
static void init_texture(void *data, unsigned width, unsigned height) static void init_texture(void *data, unsigned width, unsigned height)
{ {
unsigned g_filter, rgui_w, rgui_h; unsigned g_filter, menu_w, menu_h;
struct __gx_regdef *__gx = (struct __gx_regdef*)__gxregs; struct __gx_regdef *__gx = (struct __gx_regdef*)__gxregs;
gx_video_t *gx = (gx_video_t*)data; gx_video_t *gx = (gx_video_t*)data;
struct __gx_texobj *fb_ptr = (struct __gx_texobj*)&g_tex.obj; struct __gx_texobj *fb_ptr = (struct __gx_texobj*)&g_tex.obj;
@ -359,18 +359,18 @@ static void init_texture(void *data, unsigned width, unsigned height)
width &= ~3; width &= ~3;
height &= ~3; height &= ~3;
g_filter = g_settings.video.smooth ? GX_LINEAR : GX_NEAR; g_filter = g_settings.video.smooth ? GX_LINEAR : GX_NEAR;
rgui_w = 320; menu_w = 320;
rgui_h = 240; menu_h = 240;
if (driver.menu) if (driver.menu)
{ {
rgui_w = driver.menu->width; menu_w = driver.menu->width;
rgui_h = driver.menu->height; menu_h = driver.menu->height;
} }
__GX_InitTexObj(fb_ptr, g_tex.data, width, height, (gx->rgb32) ? GX_TF_RGBA8 : gx->rgui_texture_enable ? GX_TF_RGB5A3 : GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE); __GX_InitTexObj(fb_ptr, g_tex.data, width, height, (gx->rgb32) ? GX_TF_RGBA8 : gx->menu_texture_enable ? GX_TF_RGB5A3 : GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE);
__GX_InitTexObjFilterMode(fb_ptr, g_filter, g_filter); __GX_InitTexObjFilterMode(fb_ptr, g_filter, g_filter);
__GX_InitTexObj(menu_ptr, menu_tex.data, rgui_w, rgui_h, GX_TF_RGB5A3, GX_CLAMP, GX_CLAMP, GX_FALSE); __GX_InitTexObj(menu_ptr, menu_tex.data, menu_w, menu_h, GX_TF_RGB5A3, GX_CLAMP, GX_CLAMP, GX_FALSE);
__GX_InitTexObjFilterMode(menu_ptr, g_filter, g_filter); __GX_InitTexObjFilterMode(menu_ptr, g_filter, g_filter);
__GX_InvalidateTexAll(__gx); __GX_InvalidateTexAll(__gx);
} }
@ -892,7 +892,7 @@ static bool gx_frame(void *data, const void *frame,
RARCH_PERFORMANCE_INIT(gx_frame); RARCH_PERFORMANCE_INIT(gx_frame);
RARCH_PERFORMANCE_START(gx_frame); RARCH_PERFORMANCE_START(gx_frame);
if(!gx || (!frame && !gx->rgui_texture_enable)) if(!gx || (!frame && !gx->menu_texture_enable))
return true; return true;
if (!frame) if (!frame)
@ -904,7 +904,7 @@ static bool gx_frame(void *data, const void *frame,
clear_efb = GX_TRUE; clear_efb = GX_TRUE;
} }
while (((g_vsync || gx->rgui_texture_enable)) && !g_draw_done) while (((g_vsync || gx->menu_texture_enable)) && !g_draw_done)
OSSleepThread(g_video_cond); OSSleepThread(g_video_cond);
width = min(g_tex.width, width); width = min(g_tex.width, width);
@ -928,7 +928,7 @@ static bool gx_frame(void *data, const void *frame,
if (gx->rgb32) if (gx->rgb32)
convert_texture32(frame, g_tex.data, width, height, pitch); convert_texture32(frame, g_tex.data, width, height, pitch);
else if (gx->rgui_texture_enable) else if (gx->menu_texture_enable)
convert_texture16_conv(frame, g_tex.data, width, height, pitch); convert_texture16_conv(frame, g_tex.data, width, height, pitch);
else else
convert_texture16(frame, g_tex.data, width, height, pitch); convert_texture16(frame, g_tex.data, width, height, pitch);
@ -937,7 +937,7 @@ static bool gx_frame(void *data, const void *frame,
RARCH_PERFORMANCE_STOP(gx_frame_convert); RARCH_PERFORMANCE_STOP(gx_frame_convert);
} }
if (gx->rgui_texture_enable && gx->menu_data) if (gx->menu_texture_enable && gx->menu_data)
{ {
convert_texture16(gx->menu_data, menu_tex.data, driver.menu->width, driver.menu->height, driver.menu->width * 2); convert_texture16(gx->menu_data, menu_tex.data, driver.menu->width, driver.menu->height, driver.menu->width * 2);
DCFlushRange(menu_tex.data, driver.menu->width * driver.menu->height * 2); DCFlushRange(menu_tex.data, driver.menu->width * driver.menu->height * 2);
@ -949,7 +949,7 @@ static bool gx_frame(void *data, const void *frame,
__GX_LoadTexObj(&g_tex.obj, GX_TEXMAP0); __GX_LoadTexObj(&g_tex.obj, GX_TEXMAP0);
__GX_CallDispList(__gx, display_list, display_list_size); __GX_CallDispList(__gx, display_list, display_list_size);
if (gx->rgui_texture_enable) if (gx->menu_texture_enable)
{ {
__GX_SetCurrentMtx(__gx, GX_PNMTX1); __GX_SetCurrentMtx(__gx, GX_PNMTX1);
GX_LoadTexObj(&menu_tex.obj, GX_TEXMAP0); GX_LoadTexObj(&menu_tex.obj, GX_TEXMAP0);
@ -985,7 +985,7 @@ static bool gx_frame(void *data, const void *frame,
#endif #endif
} }
if (msg && !gx->rgui_texture_enable) if (msg && !gx->menu_texture_enable)
{ {
unsigned x = 7 * (gx->double_strike ? 1 : 2); unsigned x = 7 * (gx->double_strike ? 1 : 2);
unsigned y = gx->vp.full_height - (35 * (gx->double_strike ? 1 : 2)); unsigned y = gx->vp.full_height - (35 * (gx->double_strike ? 1 : 2));
@ -1072,7 +1072,7 @@ static void gx_set_texture_enable(void *data, bool enable, bool full_screen)
if (gx) if (gx)
{ {
gx->rgui_texture_enable = enable; gx->menu_texture_enable = enable;
// need to make sure the game texture is the right pixel format for menu overlay // need to make sure the game texture is the right pixel format for menu overlay
gx->should_resize = true; gx->should_resize = true;
} }

View File

@ -33,7 +33,7 @@ typedef struct gx_video
bool double_strike; bool double_strike;
bool rgb32; bool rgb32;
uint32_t *menu_data; // FIXME: Should be const uint16_t*. uint32_t *menu_data; // FIXME: Should be const uint16_t*.
bool rgui_texture_enable; bool menu_texture_enable;
rarch_viewport_t vp; rarch_viewport_t vp;
unsigned scale; unsigned scale;
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY

View File

@ -74,7 +74,7 @@ typedef struct __attribute__((packed)) psp1_sprite
} psp1_sprite_t; } psp1_sprite_t;
typedef struct psp1_rgui_frame typedef struct psp1_menu_frame
{ {
void* dList; void* dList;
void* frame; void* frame;
@ -84,7 +84,7 @@ typedef struct psp1_rgui_frame
PspGeContext context_storage; PspGeContext context_storage;
} psp1_rgui_frame_t; } psp1_menu_frame_t;
typedef struct psp1_video typedef struct psp1_video
{ {
@ -98,7 +98,7 @@ typedef struct psp1_video
bool rgb32; bool rgb32;
int bpp_log2; int bpp_log2;
psp1_rgui_frame_t rgui; psp1_menu_frame_t rgui;
//not implemented //not implemented
unsigned rotation; unsigned rotation;

View File

@ -499,7 +499,7 @@ static void d3d_draw_texture(void *data)
menu_texture->x = 0; menu_texture->x = 0;
menu_texture->y = 0; menu_texture->y = 0;
if (d3d->rgui_texture_enable) if (d3d->menu_texture_enable)
{ {
d3d->dev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); d3d->dev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
d3d->dev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); d3d->dev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
@ -919,7 +919,7 @@ static bool d3d_frame(void *data, const void *frame,
if (g_extern.lifecycle_state & (1ULL << MODE_MENU) && driver.menu_ctx && driver.menu_ctx->frame) if (g_extern.lifecycle_state & (1ULL << MODE_MENU) && driver.menu_ctx && driver.menu_ctx->frame)
driver.menu_ctx->frame(); driver.menu_ctx->frame();
if (d3d && d3d->rgui_texture_enable) if (d3d && d3d->menu_texture_enable)
d3d_draw_texture(d3d); d3d_draw_texture(d3d);
#endif #endif
@ -1019,8 +1019,8 @@ static void d3d_set_texture_frame(void *data,
static void d3d_set_texture_enable(void *data, bool state, bool full_screen) static void d3d_set_texture_enable(void *data, bool state, bool full_screen)
{ {
d3d_video_t *d3d = (d3d_video_t*)data; d3d_video_t *d3d = (d3d_video_t*)data;
d3d->rgui_texture_enable = state; d3d->menu_texture_enable = state;
d3d->rgui_texture_full_screen = full_screen; d3d->menu_texture_full_screen = full_screen;
} }
#endif #endif

View File

@ -89,8 +89,8 @@ typedef struct d3d_video
LPDIRECT3DTEXTURE lpTexture_ot; LPDIRECT3DTEXTURE lpTexture_ot;
#endif #endif
#ifdef HAVE_MENU #ifdef HAVE_MENU
bool rgui_texture_enable; bool menu_texture_enable;
bool rgui_texture_full_screen; bool menu_texture_full_screen;
#endif #endif
D3DVIEWPORT final_viewport; D3DVIEWPORT final_viewport;
video_info_t video_info; video_info_t video_info;