diff --git a/gfx/d3d9/d3d.cpp b/gfx/d3d9/d3d.cpp index 85026447bd..12907d187d 100644 --- a/gfx/d3d9/d3d.cpp +++ b/gfx/d3d9/d3d.cpp @@ -762,8 +762,8 @@ static bool d3d_frame(void *data, const void *frame, } #ifdef HAVE_MENU - if (d3d->rgui && d3d->rgui->enabled) - d3d_overlay_render(d3d, d3d->rgui); + if (d3d->menu && d3d->menu->enabled) + d3d_overlay_render(d3d, d3d->menu); #endif #ifdef HAVE_OVERLAY @@ -860,7 +860,7 @@ static void d3d_free(void *data) d3d_free_overlays(d3d); #endif #ifdef HAVE_MENU - d3d_free_overlay(d3d, d3d->rgui); + d3d_free_overlay(d3d, d3d->menu); #endif if (d3d->dev) d3d->dev->Release(); @@ -1159,27 +1159,27 @@ static void d3d_set_menu_texture_frame(void *data, { d3d_video_t *d3d = (d3d_video_t*)data; - if (!d3d->rgui->tex || d3d->rgui->tex_w != width || d3d->rgui->tex_h != height) + if (!d3d->menu->tex || d3d->menu->tex_w != width || d3d->menu->tex_h != height) { - if (d3d->rgui && d3d->rgui->tex) - d3d->rgui->tex->Release(); + if (d3d->menu && d3d->menu->tex) + d3d->menu->tex->Release(); if (FAILED(d3d->dev->CreateTexture(width, height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, - &d3d->rgui->tex, NULL))) + &d3d->menu->tex, NULL))) { - RARCH_ERR("[D3D]: Failed to create rgui texture\n"); + RARCH_ERR("[D3D]: Failed to create menu texture.\n"); return; } - d3d->rgui->tex_w = width; - d3d->rgui->tex_h = height; + d3d->menu->tex_w = width; + d3d->menu->tex_h = height; } - d3d->rgui->alpha_mod = alpha; + d3d->menu->alpha_mod = alpha; D3DLOCKED_RECT d3dlr; - if (SUCCEEDED(d3d->rgui->tex->LockRect(0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK))) + if (SUCCEEDED(d3d->menu->tex->LockRect(0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK))) { if (rgb32) { @@ -1213,8 +1213,8 @@ static void d3d_set_menu_texture_frame(void *data, } } - if (d3d->rgui) - d3d->rgui->tex->UnlockRect(0); + if (d3d->menu) + d3d->menu->tex->UnlockRect(0); } } @@ -1222,11 +1222,11 @@ static void d3d_set_menu_texture_enable(void *data, bool state, bool full_screen { d3d_video_t *d3d = (d3d_video_t*)data; - if (!d3d || !d3d->rgui) + if (!d3d || !d3d->menu) return; - d3d->rgui->enabled = state; - d3d->rgui->fullscreen = full_screen; + d3d->menu->enabled = state; + d3d->menu->fullscreen = full_screen; } #endif @@ -1264,18 +1264,18 @@ static bool d3d_construct(void *data, const video_info_t *info, const input_driv #endif #ifdef HAVE_MENU - if (d3d->rgui) - free(d3d->rgui); + if (d3d->menu) + free(d3d->menu); - d3d->rgui = (overlay_t*)calloc(1, sizeof(overlay_t)); - d3d->rgui->tex_coords.x = 0; - d3d->rgui->tex_coords.y = 0; - d3d->rgui->tex_coords.w = 1; - d3d->rgui->tex_coords.h = 1; - d3d->rgui->vert_coords.x = 0; - d3d->rgui->vert_coords.y = 1; - d3d->rgui->vert_coords.w = 1; - d3d->rgui->vert_coords.h = -1; + d3d->menu = (overlay_t*)calloc(1, sizeof(overlay_t)); + d3d->menu->tex_coords.x = 0; + d3d->menu->tex_coords.y = 0; + d3d->menu->tex_coords.w = 1; + d3d->menu->tex_coords.h = 1; + d3d->menu->vert_coords.x = 0; + d3d->menu->vert_coords.y = 1; + d3d->menu->vert_coords.w = 1; + d3d->menu->vert_coords.h = -1; #endif #ifdef HAVE_WINDOW @@ -1425,7 +1425,7 @@ static void *d3d_init(const video_info_t *info, const input_driver_t **input, vid->overlays_enabled = false; #endif vid->chain = NULL; - vid->rgui = NULL; + vid->menu = NULL; if (!d3d_construct(vid, info, input, input_data)) { diff --git a/gfx/d3d9/d3d9.hpp b/gfx/d3d9/d3d9.hpp index 55168d283c..6d29622e48 100644 --- a/gfx/d3d9/d3d9.hpp +++ b/gfx/d3d9/d3d9.hpp @@ -172,7 +172,7 @@ typedef struct d3d_video #endif #ifdef HAVE_MENU - overlay_t *rgui; + overlay_t *menu; #endif void *chain; } d3d_video_t; diff --git a/gfx/lima_gfx.c b/gfx/lima_gfx.c index 1eaabae2df..a7a141bf0c 100644 --- a/gfx/lima_gfx.c +++ b/gfx/lima_gfx.c @@ -50,7 +50,7 @@ typedef struct limare_texture { int handle; unsigned format; - bool rgui; + bool menu; } limare_texture_t; typedef struct vec2f { @@ -92,7 +92,7 @@ typedef struct limare_data { unsigned texture_slots; limare_texture_t *cur_texture; - limare_texture_t *cur_texture_rgui; + limare_texture_t *cur_texture_menu; unsigned font_width; unsigned font_height; @@ -199,7 +199,7 @@ static int destroy_textures(limare_data_t *pdata) { int ret; pdata->cur_texture = NULL; - pdata->cur_texture_rgui = NULL; + pdata->cur_texture_menu = NULL; for (i = 0; i < pdata->texture_slots; ++i) { free(pdata->textures[i]); @@ -774,7 +774,7 @@ static bool lima_gfx_frame(void *data, const void *frame, limare_disable(lima->state, GL_BLEND); } - if (vid->menu_active && lima->cur_texture_rgui != NULL) { + if (vid->menu_active && lima->cur_texture_menu != NULL) { float color[4] = {1.0f, 1.0f, 1.0f, vid->menu_alpha}; if (vid->menu_rgb32) @@ -787,7 +787,7 @@ static bool lima_gfx_frame(void *data, const void *frame, limare_attribute_pointer(lima->state, "in_coord", LIMARE_ATTRIB_FLOAT, 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_menu->handle); limare_uniform_attach(lima->state, "uColor", 4, color); limare_enable(lima->state, GL_BLEND); @@ -875,7 +875,7 @@ static void lima_set_texture_frame(void *data, const void *frame, bool rgb32, vid->menu_rgb32 = rgb32; vid->menu_alpha = alpha; - tex = vid->lima->cur_texture_rgui; + tex = vid->lima->cur_texture_menu; /* Current RGUI doesn't change dimensions, so we should hit this most of the time. */ if (tex != NULL && tex->width == width && @@ -887,7 +887,7 @@ static void lima_set_texture_frame(void *data, const void *frame, bool rgb32, tex = add_texture(vid->lima, width, height, frame, format); if (tex != NULL) { - vid->lima->cur_texture_rgui = tex; + vid->lima->cur_texture_menu = tex; goto upload; } diff --git a/psp1/psp1_video.c b/psp1/psp1_video.c index 089aabb968..bd65d360cf 100644 --- a/psp1/psp1_video.c +++ b/psp1/psp1_video.c @@ -98,7 +98,7 @@ typedef struct psp1_video bool rgb32; int bpp_log2; - psp1_menu_frame_t rgui; + psp1_menu_frame_t menu; //not implemented unsigned rotation; @@ -123,16 +123,16 @@ static void *psp_init(const video_info_t *video, psp->main_dList = memalign(16, 256); // make sure to allocate more space if bigger display lists are needed. psp->frame_dList = memalign(16, 256); - psp->rgui.dList = memalign(16, 256); - psp->rgui.frame = memalign(16, 2 * 480 * 272); + psp->menu.dList = memalign(16, 256); + psp->menu.frame = memalign(16, 2 * 480 * 272); psp->frame_coords = memalign(64, 1 * sizeof(psp1_sprite_t)); - psp->rgui.frame_coords = memalign(64, 16 * sizeof(psp1_sprite_t)); + psp->menu.frame_coords = memalign(64, 16 * sizeof(psp1_sprite_t)); memset(psp->frame_coords , 0, 1 * sizeof(psp1_sprite_t)); - memset(psp->rgui.frame_coords , 0, 16 * sizeof(psp1_sprite_t)); + memset(psp->menu.frame_coords , 0, 16 * sizeof(psp1_sprite_t)); sceKernelDcacheWritebackInvalidateAll(); psp->frame_coords = TO_UNCACHED_PTR(psp->frame_coords); - psp->rgui.frame_coords = TO_UNCACHED_PTR(psp->rgui.frame_coords);; + psp->menu.frame_coords = TO_UNCACHED_PTR(psp->menu.frame_coords);; psp->frame_coords->v0.x = 60; psp->frame_coords->v0.y = 0; @@ -356,9 +356,9 @@ static bool psp_frame(void *data, const void *frame, sceGuFinish(); - if(psp->rgui.active) + if(psp->menu.active) { - sceGuSendList(GU_TAIL, psp->rgui.dList, &(psp->rgui.context_storage)); + sceGuSendList(GU_TAIL, psp->menu.dList, &(psp->menu.context_storage)); sceGuSync(0, 0); } @@ -400,12 +400,12 @@ static void psp_free(void *data) free(psp->frame_dList); if (psp->frame_coords) free(TO_CACHED_PTR(psp->frame_coords)); - if (psp->rgui.frame_coords) - free(TO_CACHED_PTR(psp->rgui.frame_coords)); - if (psp->rgui.dList) - free(psp->rgui.dList); - if (psp->rgui.frame) - free(psp->rgui.frame); + if (psp->menu.frame_coords) + free(TO_CACHED_PTR(psp->menu.frame_coords)); + if (psp->menu.dList) + free(psp->menu.dList); + if (psp->menu.frame) + free(psp->menu.frame); free(data); } @@ -426,46 +426,46 @@ static void psp_set_texture_frame(void *data, const void *frame, bool rgb32, psp1_video_t *psp = (psp1_video_t*)data; #ifdef DEBUG - rarch_assert((width*height) < (480 * 272)); // psp->rgui.frame buffer size is (480 * 272)*2 Bytes + rarch_assert((width*height) < (480 * 272)); // psp->menu.frame buffer size is (480 * 272)*2 Bytes #endif - // rendering the rgui frame as a single sprite is slow + // rendering the menu frame as a single sprite is slow // so we render it as 16 vertical stripes instead for (i=0;i<16;i++) { - psp->rgui.frame_coords[i].v0.x = (i) * SCEGU_SCR_WIDTH / 16 ; - psp->rgui.frame_coords[i].v1.x = (i+1) * SCEGU_SCR_WIDTH / 16 ; + psp->menu.frame_coords[i].v0.x = (i) * SCEGU_SCR_WIDTH / 16 ; + psp->menu.frame_coords[i].v1.x = (i+1) * SCEGU_SCR_WIDTH / 16 ; -// psp->rgui.frame_coords[i].v0.y = 0; - psp->rgui.frame_coords[i].v1.y = SCEGU_SCR_HEIGHT ; + //psp->menu.frame_coords[i].v0.y = 0; + psp->menu.frame_coords[i].v1.y = SCEGU_SCR_HEIGHT ; - psp->rgui.frame_coords[i].v0.u = (i) * width / 16 ; - psp->rgui.frame_coords[i].v1.u = (i+1) * width / 16 ; + psp->menu.frame_coords[i].v0.u = (i) * width / 16 ; + psp->menu.frame_coords[i].v1.u = (i+1) * width / 16 ; -// psp->rgui.frame_coords[i].v0.v = 0; - psp->rgui.frame_coords[i].v1.v = height; + //psp->menu.frame_coords[i].v0.v = 0; + psp->menu.frame_coords[i].v1.v = height; } sceKernelDcacheWritebackRange(frame,width * height * 2); sceGuStart(GU_DIRECT, psp->main_dList); - sceGuCopyImage(GU_PSM_4444, 0, 0, width, height, width, (void*)frame, 0, 0, width, psp->rgui.frame); + sceGuCopyImage(GU_PSM_4444, 0, 0, width, height, width, (void*)frame, 0, 0, width, psp->menu.frame); sceGuFinish(); - sceGuStart(GU_SEND, psp->rgui.dList); + sceGuStart(GU_SEND, psp->menu.dList); sceGuTexSync(); sceGuTexMode(GU_PSM_4444, 0, 0, GU_FALSE); sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB); - sceGuTexImage(0, next_pow2(width), next_pow2(height), width, psp->rgui.frame); + sceGuTexImage(0, next_pow2(width), next_pow2(height), width, psp->menu.frame); sceGuEnable(GU_BLEND); // sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0); // default blending sceGuBlendFunc(GU_ADD, GU_FIX, GU_FIX, 0xF0F0F0F0, 0x0F0F0F0F); ; - sceGuDrawArray(GU_SPRITES, GU_TEXTURE_16BIT | GU_COLOR_4444 | GU_VERTEX_16BIT | GU_TRANSFORM_2D, 32, NULL, psp->rgui.frame_coords); + sceGuDrawArray(GU_SPRITES, GU_TEXTURE_16BIT | GU_COLOR_4444 | GU_VERTEX_16BIT | GU_TRANSFORM_2D, 32, NULL, psp->menu.frame_coords); sceGuFinish(); } @@ -475,7 +475,7 @@ static void psp_set_texture_enable(void *data, bool state, bool full_screen) (void) full_screen; psp1_video_t *psp = (psp1_video_t*)data; - psp->rgui.active = state; + psp->menu.active = state; } diff --git a/retroarch.c b/retroarch.c index 5f677071e2..ca24386129 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2508,7 +2508,7 @@ void rarch_disk_control_set_eject(bool new_state, bool log) else RARCH_LOG("%s\n", msg); - // Only noise in RGUI. + // Only noise in menu. if (log) { msg_queue_clear(g_extern.msg_queue); @@ -3009,7 +3009,7 @@ error: return 1; } -static inline bool check_enter_rgui(void) +static inline bool check_enter_menu(void) { static bool old_rmenu_toggle = true; @@ -3085,7 +3085,7 @@ bool rarch_main_iterate(void) if (input_key_pressed_func(RARCH_QUIT_KEY) || !video_alive_func()) return false; - if (check_enter_rgui()) + if (check_enter_menu()) return false; // Enter menu, don't exit. if (g_extern.exec) diff --git a/xdk/xdk_d3d.cpp b/xdk/xdk_d3d.cpp index a25fc7d482..e892e0cabb 100644 --- a/xdk/xdk_d3d.cpp +++ b/xdk/xdk_d3d.cpp @@ -1064,18 +1064,18 @@ static bool d3d_construct(void *data, const video_info_t *info, const input_driv #endif #ifdef HAVE_MENU - if (d3d->rgui) - free(d3d->rgui); + if (d3d->menu) + free(d3d->menu); - d3d->rgui = (overlay_t*)calloc(1, sizeof(overlay_t)); - d3d->rgui->tex_coords.x = 0; - d3d->rgui->tex_coords.y = 0; - d3d->rgui->tex_coords.w = 1; - d3d->rgui->tex_coords.h = 1; - d3d->rgui->vert_coords.x = 0; - d3d->rgui->vert_coords.y = 1; - d3d->rgui->vert_coords.w = 1; - d3d->rgui->vert_coords.h = -1; + d3d->menu = (overlay_t*)calloc(1, sizeof(overlay_t)); + d3d->menu->tex_coords.x = 0; + d3d->menu->tex_coords.y = 0; + d3d->menu->tex_coords.w = 1; + d3d->menu->tex_coords.h = 1; + d3d->menu->vert_coords.x = 0; + d3d->menu->vert_coords.y = 1; + d3d->menu->vert_coords.w = 1; + d3d->menu->vert_coords.h = -1; #endif #ifdef HAVE_WINDOW @@ -1237,7 +1237,7 @@ static void *d3d_init(const video_info_t *info, const input_driver_t **input, vo #endif vid->should_resize = false; vid->vsync = info->vsync; - vid->rgui = NULL; + vid->menu = NULL; if (!d3d_construct(vid, info, input, input_data)) { diff --git a/xdk/xdk_d3d.h b/xdk/xdk_d3d.h index 69cd31303e..d6b428c592 100644 --- a/xdk/xdk_d3d.h +++ b/xdk/xdk_d3d.h @@ -111,7 +111,7 @@ typedef struct d3d_video unsigned tex_h; #ifdef HAVE_MENU - overlay_t *rgui; + overlay_t *menu; #endif } d3d_video_t;