mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Revert "(gfx_display) Make gfx_display_set_fb_size - get rid of the small"
This reverts commit 618cfacd59
.
This commit is contained in:
parent
ea6139b234
commit
7f08729a5e
@ -534,7 +534,9 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
||||
|
||||
new_fb_pitch = new_fb_width * 2;
|
||||
|
||||
gfx_display_set_framebuf(new_fb_width, new_fb_height, new_fb_pitch);
|
||||
gfx_display_set_width(new_fb_width);
|
||||
gfx_display_set_height(new_fb_height);
|
||||
gfx_display_set_framebuffer_pitch(new_fb_pitch);
|
||||
|
||||
GX_SetViewportJitter(0, 0, gx_mode.fbWidth, gx_mode.efbHeight, 0, 1, 1);
|
||||
GX_SetDispCopySrc(0, 0, gx_mode.fbWidth, gx_mode.efbHeight);
|
||||
|
@ -531,12 +531,8 @@ void gfx_display_draw_quad(
|
||||
void *data,
|
||||
unsigned video_width,
|
||||
unsigned video_height,
|
||||
int x,
|
||||
int y,
|
||||
unsigned w,
|
||||
unsigned h,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
int x, int y, unsigned w, unsigned h,
|
||||
unsigned width, unsigned height,
|
||||
float *color,
|
||||
uintptr_t *texture)
|
||||
{
|
||||
@ -1096,17 +1092,24 @@ void gfx_display_get_fb_size(unsigned *fb_width,
|
||||
*fb_pitch = p_disp->framebuf_pitch;
|
||||
}
|
||||
|
||||
/* Set the display framebuffer's dimensions. */
|
||||
void gfx_display_set_fb_size(
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
size_t pitch
|
||||
)
|
||||
/* Set the display framebuffer's width. */
|
||||
void gfx_display_set_width(unsigned width)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
p_disp->framebuf_width = width;
|
||||
}
|
||||
|
||||
/* Set the display framebuffer's height. */
|
||||
void gfx_display_set_height(unsigned height)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
p_disp->framebuf_width = width;
|
||||
p_disp->framebuf_height = height;
|
||||
p_disp->framebuf_pitch = pitch;
|
||||
}
|
||||
|
||||
void gfx_display_set_framebuffer_pitch(size_t pitch)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
p_disp->framebuf_pitch = pitch;
|
||||
}
|
||||
|
||||
void gfx_display_set_msg_force(bool state)
|
||||
@ -1271,8 +1274,9 @@ void gfx_display_init_white_texture(uintptr_t white_texture)
|
||||
TEXTURE_FILTER_NEAREST, &gfx_display_white_texture);
|
||||
}
|
||||
|
||||
void gfx_display_free(gfx_display_t *p_disp)
|
||||
void gfx_display_free(void)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
video_coord_array_free(&p_disp->dispca);
|
||||
|
||||
p_disp->msg_force = false;
|
||||
@ -1284,8 +1288,9 @@ void gfx_display_free(gfx_display_t *p_disp)
|
||||
p_disp->dispctx = NULL;
|
||||
}
|
||||
|
||||
void gfx_display_init(gfx_display_t *p_disp)
|
||||
void gfx_display_init(void)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
video_coord_array_t *p_dispca = &p_disp->dispca;
|
||||
|
||||
p_disp->has_windowed = video_driver_has_windowed();
|
||||
|
@ -223,9 +223,9 @@ struct gfx_display
|
||||
bool framebuf_dirty;
|
||||
};
|
||||
|
||||
void gfx_display_free(gfx_display_t *p_disp);
|
||||
void gfx_display_free(void);
|
||||
|
||||
void gfx_display_init(gfx_display_t *p_disp);
|
||||
void gfx_display_init(void);
|
||||
|
||||
void gfx_display_draw_cursor(
|
||||
gfx_display_t *p_disp,
|
||||
@ -258,10 +258,11 @@ void gfx_display_scissor_begin(
|
||||
|
||||
void gfx_display_font_free(font_data_t *font);
|
||||
|
||||
void gfx_display_set_width(unsigned width);
|
||||
void gfx_display_get_fb_size(unsigned *fb_width, unsigned *fb_height,
|
||||
size_t *fb_pitch);
|
||||
|
||||
void gfx_display_set_fb_size(unsigned width, unsigned height, size_t pitch);
|
||||
void gfx_display_set_height(unsigned height);
|
||||
void gfx_display_set_framebuffer_pitch(size_t pitch);
|
||||
|
||||
void gfx_display_set_msg_force(bool state);
|
||||
bool gfx_display_init_first_driver(gfx_display_t *p_disp,
|
||||
|
@ -791,6 +791,9 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
|
||||
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
gfx_display_init_white_texture(gfx_display_white_texture);
|
||||
|
||||
file_list_initialize(&ozone->horizontal_list);
|
||||
|
@ -5695,10 +5695,9 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui,
|
||||
return false;
|
||||
|
||||
/* Configure 'menu display' settings */
|
||||
gfx_display_set_fb_size(
|
||||
rgui->frame_buf.width,
|
||||
rgui->frame_buf.height,
|
||||
rgui->frame_buf.width * sizeof(uint16_t));
|
||||
gfx_display_set_width(rgui->frame_buf.width);
|
||||
gfx_display_set_height(rgui->frame_buf.height);
|
||||
gfx_display_set_framebuffer_pitch(rgui->frame_buf.width * sizeof(uint16_t));
|
||||
|
||||
/* Determine terminal layout */
|
||||
rgui->term_layout.start_x = (3 * 5) + 1;
|
||||
|
@ -3366,6 +3366,13 @@ static void *stripes_init(void **userdata, bool video_is_threaded)
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
|
||||
|
||||
/* TODO/FIXME - we don't use framebuffer at all
|
||||
* for XMB, we should refactor this dependency
|
||||
* away. */
|
||||
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
gfx_display_init_white_texture(gfx_display_white_texture);
|
||||
|
||||
file_list_initialize(&stripes->horizontal_list);
|
||||
|
@ -5833,6 +5833,13 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
|
||||
|
||||
/* TODO/FIXME - we don't use framebuffer at all
|
||||
* for XMB, we should refactor this dependency
|
||||
* away. */
|
||||
|
||||
gfx_display_set_width(width);
|
||||
gfx_display_set_height(height);
|
||||
|
||||
gfx_display_init_white_texture(gfx_display_white_texture);
|
||||
|
||||
file_list_initialize(&xmb->horizontal_list);
|
||||
|
@ -4787,7 +4787,7 @@ static bool menu_driver_init_internal(
|
||||
settings))
|
||||
return false;
|
||||
|
||||
gfx_display_init(&p_rarch->dispgfx);
|
||||
gfx_display_init();
|
||||
|
||||
/* TODO/FIXME - can we get rid of this? Is this needed? */
|
||||
configuration_set_string(settings,
|
||||
@ -5395,7 +5395,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
}
|
||||
|
||||
gfx_animation_deinit(&p_rarch->anim);
|
||||
gfx_display_free(&p_rarch->dispgfx);
|
||||
gfx_display_free();
|
||||
|
||||
menu_entries_settings_deinit(menu_st);
|
||||
menu_entries_list_deinit(p_rarch->menu_driver_ctx, menu_st);
|
||||
|
Loading…
Reference in New Issue
Block a user