mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 01:21:47 +00:00
More fixes for menu_display_ctl.
Grep shows nothing now.
This commit is contained in:
parent
66c4f608e6
commit
8870e85395
@ -413,9 +413,9 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
|||||||
|
|
||||||
new_fb_pitch = new_fb_width * 2;
|
new_fb_pitch = new_fb_width * 2;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_WIDTH, &new_fb_width);
|
menu_display_set_width(new_fb_width);
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_HEIGHT, &new_fb_height);
|
menu_display_set_height(new_fb_height);
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_FB_PITCH, &new_fb_pitch);
|
menu_display_set_framebuffer_pitch(new_fb_pitch);
|
||||||
|
|
||||||
GX_SetViewportJitter(0, 0, gx_mode.fbWidth, gx_mode.efbHeight, 0, 1, 1);
|
GX_SetViewportJitter(0, 0, gx_mode.fbWidth, gx_mode.efbHeight, 0, 1, 1);
|
||||||
GX_SetDispCopySrc(0, 0, gx_mode.fbWidth, gx_mode.efbHeight);
|
GX_SetDispCopySrc(0, 0, gx_mode.fbWidth, gx_mode.efbHeight);
|
||||||
@ -551,8 +551,8 @@ static void init_texture(void *data, unsigned width, unsigned height)
|
|||||||
menu_w = 320;
|
menu_w = 320;
|
||||||
menu_h = 240;
|
menu_h = 240;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &menu_w);
|
menu_w = menu_display_get_width();
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_HEIGHT, &menu_h);
|
menu_h = menu_display_get_height();
|
||||||
|
|
||||||
GX_InitTexObj(fb_ptr, g_tex.data, width, height,
|
GX_InitTexObj(fb_ptr, g_tex.data, width, height,
|
||||||
(gx->rgb32) ? GX_TF_RGBA8 : gx->menu_texture_enable ?
|
(gx->rgb32) ? GX_TF_RGBA8 : gx->menu_texture_enable ?
|
||||||
@ -1492,9 +1492,9 @@ static bool gx_frame(void *data, const void *frame,
|
|||||||
size_t fb_pitch;
|
size_t fb_pitch;
|
||||||
unsigned fb_width, fb_height;
|
unsigned fb_width, fb_height;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &fb_width);
|
fb_width = menu_display_get_width();
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_HEIGHT, &fb_height);
|
fb_height = menu_display_get_height();
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_FB_PITCH, &fb_pitch);
|
fb_pitch = menu_display_get_framebuffer_pitch();
|
||||||
|
|
||||||
convert_texture16(
|
convert_texture16(
|
||||||
gx->menu_data,
|
gx->menu_data,
|
||||||
|
@ -340,7 +340,6 @@ static void android_input_poll_main_cmd(void)
|
|||||||
runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean);
|
runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean);
|
||||||
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_UNSET_STUB_DRAW_FRAME, NULL);
|
|
||||||
video_driver_unset_stub_frame();
|
video_driver_unset_stub_frame();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -363,7 +362,6 @@ static void android_input_poll_main_cmd(void)
|
|||||||
runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean);
|
runloop_ctl(RUNLOOP_CTL_SET_PAUSED, &boolean);
|
||||||
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_STUB_DRAW_FRAME, NULL);
|
|
||||||
video_driver_set_stub_frame();
|
video_driver_set_stub_frame();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ void nk_common_device_draw(struct nk_device *dev,
|
|||||||
glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vbo);
|
glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vbo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
menu_display_blend_begin();
|
||||||
|
|
||||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
@ -262,7 +262,7 @@ void nk_common_device_draw(struct nk_device *dev,
|
|||||||
glBindVertexArray((GLuint)last_vao);
|
glBindVertexArray((GLuint)last_vao);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
//void nk_mem_alloc(nk_handle a, void *old, nk_size b);
|
//void nk_mem_alloc(nk_handle a, void *old, nk_size b);
|
||||||
|
@ -174,15 +174,14 @@ static void nk_menu_frame(void *data)
|
|||||||
nk_menu_handle_t *nk = (nk_menu_handle_t*)data;
|
nk_menu_handle_t *nk = (nk_menu_handle_t*)data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
bool libretro_running = menu_display_ctl(
|
bool libretro_running = menu_display_libretro_running();
|
||||||
MENU_DISPLAY_CTL_LIBRETRO_RUNNING, NULL);
|
|
||||||
|
|
||||||
if (!nk)
|
if (!nk)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
video_driver_get_size(&width, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
menu_display_set_viewport();
|
||||||
|
|
||||||
nk_input_begin(&nk->ctx);
|
nk_input_begin(&nk->ctx);
|
||||||
nk_menu_input_gamepad(nk);
|
nk_menu_input_gamepad(nk);
|
||||||
@ -212,22 +211,19 @@ static void nk_menu_frame(void *data)
|
|||||||
width,
|
width,
|
||||||
height);
|
height);
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_RESTORE_CLEAR_COLOR, NULL);
|
menu_display_restore_clear_color();
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_UNSET_VIEWPORT, NULL);
|
menu_display_unset_viewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nk_menu_layout(nk_menu_handle_t *nk)
|
static void nk_menu_layout(nk_menu_handle_t *nk)
|
||||||
{
|
{
|
||||||
void *fb_buf;
|
|
||||||
float scale_factor;
|
float scale_factor;
|
||||||
unsigned width, height, new_header_height;
|
unsigned width, height, new_header_height;
|
||||||
|
|
||||||
video_driver_get_size(&width, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_GET_DPI, &scale_factor);
|
scale_factor = menu_display_get_dpi();
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_HEADER_HEIGHT,
|
menu_display_set_header_height(new_header_height);
|
||||||
&new_header_height);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nk_menu_init_device(nk_menu_handle_t *nk)
|
static void nk_menu_init_device(nk_menu_handle_t *nk)
|
||||||
@ -285,7 +281,7 @@ static void *nk_menu_init(void **userdata)
|
|||||||
if (!menu)
|
if (!menu)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!menu_display_ctl(MENU_DISPLAY_CTL_INIT_FIRST_DRIVER, NULL))
|
if (!menu_display_init_first_driver())
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
nk = (nk_menu_handle_t*)calloc(1, sizeof(nk_menu_handle_t));
|
nk = (nk_menu_handle_t*)calloc(1, sizeof(nk_menu_handle_t));
|
||||||
@ -339,8 +335,7 @@ static void nk_menu_context_destroy(void *data)
|
|||||||
for (i = 0; i < NK_TEXTURE_LAST; i++)
|
for (i = 0; i < NK_TEXTURE_LAST; i++)
|
||||||
video_driver_texture_unload((uintptr_t*)&nk->textures.list[i]);
|
video_driver_texture_unload((uintptr_t*)&nk->textures.list[i]);
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_FONT_MAIN_DEINIT, NULL);
|
menu_display_font_main_deinit();
|
||||||
|
|
||||||
wimp_context_bg_destroy(nk);
|
wimp_context_bg_destroy(nk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ static void xui_frame(void *data)
|
|||||||
if (!d3dr)
|
if (!d3dr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
menu_display_set_viewport();
|
||||||
|
|
||||||
app.RunFrame();
|
app.RunFrame();
|
||||||
XuiTimersRun();
|
XuiTimersRun();
|
||||||
@ -445,7 +445,7 @@ static void xui_frame(void *data)
|
|||||||
|
|
||||||
XuiRenderEnd( app.GetDC() );
|
XuiRenderEnd( app.GetDC() );
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_UNSET_VIEWPORT, NULL);
|
menu_display_unset_viewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blit_line(int x, int y, const char *message, bool green)
|
static void blit_line(int x, int y, const char *message, bool green)
|
||||||
@ -454,7 +454,7 @@ static void blit_line(int x, int y, const char *message, bool green)
|
|||||||
|
|
||||||
static void xui_render_background(void)
|
static void xui_render_background(void)
|
||||||
{
|
{
|
||||||
if (menu_display_ctl(MENU_DISPLAY_CTL_LIBRETRO_RUNNING, NULL))
|
if (menu_display_libretro_running())
|
||||||
XuiElementSetShow(m_background, FALSE);
|
XuiElementSetShow(m_background, FALSE);
|
||||||
else
|
else
|
||||||
XuiElementSetShow(m_background, TRUE);
|
XuiElementSetShow(m_background, TRUE);
|
||||||
@ -536,8 +536,8 @@ static void xui_render(void *data)
|
|||||||
|
|
||||||
frame_count = video_driver_get_frame_count_ptr();
|
frame_count = video_driver_get_frame_count_ptr();
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &fb_width);
|
fb_width = menu_display_get_width();
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_MSG_FORCE, &msg_force);
|
msg_force = menu_display_get_msg_force();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL)
|
menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL)
|
||||||
@ -546,7 +546,7 @@ static void xui_render(void *data)
|
|||||||
)
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_UNSET_FRAMEBUFFER_DIRTY_FLAG, NULL);
|
menu_display_unset_framebuffer_dirty_flag();
|
||||||
menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
||||||
|
|
||||||
xui_render_background();
|
xui_render_background();
|
||||||
|
@ -186,7 +186,7 @@ static void menu_display_d3d_draw_pipeline(void *data)
|
|||||||
static float t = 0;
|
static float t = 0;
|
||||||
gfx_coord_array_t *ca = NULL;
|
gfx_coord_array_t *ca = NULL;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_COORDS_ARRAY_GET, &ca);
|
ca = menu_display_get_coords_array();
|
||||||
|
|
||||||
draw->x = 0;
|
draw->x = 0;
|
||||||
draw->y = 0;
|
draw->y = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user