mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(menu_display.h) Remove some header dependencies
This commit is contained in:
parent
45a74e589f
commit
3fb751ebd2
@ -109,8 +109,9 @@ static void menu_display_fb_free(menu_framebuf_t *frame_buf)
|
||||
frame_buf->data = NULL;
|
||||
}
|
||||
|
||||
void menu_display_free(menu_handle_t *menu)
|
||||
void menu_display_free(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
@ -120,8 +121,9 @@ void menu_display_free(menu_handle_t *menu)
|
||||
menu_display_fb_free(&menu->frame_buf);
|
||||
}
|
||||
|
||||
bool menu_display_init(menu_handle_t *menu)
|
||||
bool menu_display_init(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!menu)
|
||||
return false;
|
||||
|
||||
@ -186,9 +188,10 @@ bool menu_display_font_init_first(const void **font_driver,
|
||||
font_path, font_size, FONT_DRIVER_RENDER_OPENGL_API);
|
||||
}
|
||||
|
||||
bool menu_display_font_bind_block(menu_handle_t *menu,
|
||||
bool menu_display_font_bind_block(void *data,
|
||||
const struct font_renderer *font_driver, void *userdata)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!font_driver || !font_driver->bind_block)
|
||||
return false;
|
||||
|
||||
@ -197,9 +200,10 @@ bool menu_display_font_bind_block(menu_handle_t *menu,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool menu_display_font_flush_block(menu_handle_t *menu,
|
||||
bool menu_display_font_flush_block(void *data,
|
||||
const struct font_renderer *font_driver)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
if (!font_driver || !font_driver->flush)
|
||||
return false;
|
||||
|
||||
@ -209,8 +213,9 @@ bool menu_display_font_flush_block(menu_handle_t *menu,
|
||||
font_driver, NULL);
|
||||
}
|
||||
|
||||
void menu_display_free_main_font(menu_handle_t *menu)
|
||||
void menu_display_free_main_font(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (menu->font.buf)
|
||||
@ -220,12 +225,13 @@ void menu_display_free_main_font(menu_handle_t *menu)
|
||||
}
|
||||
}
|
||||
|
||||
bool menu_display_init_main_font(menu_handle_t *menu,
|
||||
bool menu_display_init_main_font(void *data,
|
||||
const char *font_path, float font_size)
|
||||
{
|
||||
bool ret;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
void *video = video_driver_get_ptr(NULL);
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
driver_t *driver = driver_get_ptr();
|
||||
void *video = video_driver_get_ptr(NULL);
|
||||
|
||||
if (menu->font.buf)
|
||||
menu_display_free_main_font(menu);
|
||||
|
@ -16,12 +16,25 @@
|
||||
#ifndef __MENU_DISPLAY_H__
|
||||
#define __MENU_DISPLAY_H__
|
||||
|
||||
#include "menu_driver.h"
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../gfx/font_renderer_driver.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct menu_framebuf
|
||||
{
|
||||
uint16_t *data;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
size_t pitch;
|
||||
bool dirty;
|
||||
} menu_framebuf_t;
|
||||
|
||||
menu_framebuf_t *menu_display_fb_get_ptr(void);
|
||||
|
||||
void menu_display_fb(void);
|
||||
@ -30,9 +43,9 @@ void menu_display_fb_set_dirty(void);
|
||||
|
||||
void menu_display_fb_unset_dirty(void);
|
||||
|
||||
void menu_display_free(menu_handle_t *menu);
|
||||
void menu_display_free(void *data);
|
||||
|
||||
bool menu_display_init(menu_handle_t *menu);
|
||||
bool menu_display_init(void *data);
|
||||
|
||||
bool menu_display_update_pending(void);
|
||||
|
||||
@ -42,16 +55,16 @@ bool menu_display_font_init_first(const void **font_driver,
|
||||
void **font_handle, void *video_data, const char *font_path,
|
||||
float font_size);
|
||||
|
||||
bool menu_display_font_bind_block(menu_handle_t *menu,
|
||||
bool menu_display_font_bind_block(void *data,
|
||||
const struct font_renderer *font_driver, void *userdata);
|
||||
|
||||
bool menu_display_font_flush_block(menu_handle_t *menu,
|
||||
bool menu_display_font_flush_block(void *data,
|
||||
const struct font_renderer *font_driver);
|
||||
|
||||
bool menu_display_init_main_font(menu_handle_t *menu,
|
||||
bool menu_display_init_main_font(void *data,
|
||||
const char *font_path, float font_size);
|
||||
|
||||
void menu_display_free_main_font(menu_handle_t *menu);
|
||||
void menu_display_free_main_font(void *data);
|
||||
|
||||
void menu_display_set_viewport(void);
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <queues/message_queue.h>
|
||||
#include "menu_animation.h"
|
||||
#include "menu_display.h"
|
||||
#include "menu_displaylist.h"
|
||||
#include "menu_list.h"
|
||||
#include "menu_input.h"
|
||||
@ -42,15 +43,6 @@ typedef enum
|
||||
MENU_IMAGE_BOXART,
|
||||
} menu_image_type_t;
|
||||
|
||||
typedef struct menu_framebuf
|
||||
{
|
||||
uint16_t *data;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
size_t pitch;
|
||||
bool dirty;
|
||||
} menu_framebuf_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *userdata;
|
||||
|
Loading…
x
Reference in New Issue
Block a user