From 1ea3b544118fa924739eae1195dd38da76a81569 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 8 Dec 2015 11:09:09 +0100 Subject: [PATCH] Move definition of thread_packet to video_thread_wrapper.c --- gfx/video_thread_wrapper.c | 85 ++++++++++++++++++++++++++++++++++++ gfx/video_thread_wrapper.h | 88 ++------------------------------------ 2 files changed, 89 insertions(+), 84 deletions(-) diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index a5a861a8ea..820f150e34 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -21,10 +21,95 @@ #include #include "video_thread_wrapper.h" +#include "font_driver.h" +#include "video_shader_driver.h" #include "../performance.h" #include "../runloop.h" #include "../verbosity.h" +struct thread_packet +{ + enum thread_cmd type; + union + { + bool b; + int i; + float f; + const char *str; + void *v; + + struct + { + enum rarch_shader_type type; + const char *path; + } set_shader; + + struct + { + unsigned width; + unsigned height; + bool force_full; + bool allow_rotate; + } set_viewport; + + struct + { + unsigned index; + float x, y, w, h; + } rect; + + struct + { + const struct texture_image *data; + unsigned num; + } image; + + struct + { + unsigned width; + unsigned height; + } output; + + struct + { + unsigned width; + unsigned height; + bool fullscreen; + } new_mode; + + struct + { + unsigned index; + bool smooth; + } filtering; + + struct + { + char msg[PATH_MAX_LENGTH]; + struct font_params params; + } osd_message; + + struct + { + custom_command_method_t method; + void* data; + int return_value; + } custom_command; + + struct + { + custom_font_command_method_t method; + const void **font_driver; + void **font_handle; + void *video_data; + const char *font_path; + float font_size; + bool return_value; + enum font_driver_render_api api; + } font_init; + } data; +}; + struct thread_video { slock_t *lock; diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 625198a0d0..72e5965785 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -17,10 +17,11 @@ #ifndef RARCH_VIDEO_THREAD_H__ #define RARCH_VIDEO_THREAD_H__ +#include + #include -#include "font_driver.h" -#include "video_shader_driver.h" +#include "video_driver.h" #ifdef __cplusplus extern "C" { @@ -68,88 +69,7 @@ typedef bool (*custom_font_command_method_t)(const void **font_driver, void **font_handle, void *video_data, const char *font_path, float font_size, enum font_driver_render_api api); -typedef struct -{ - enum thread_cmd type; - union - { - bool b; - int i; - float f; - const char *str; - void *v; - - struct - { - enum rarch_shader_type type; - const char *path; - } set_shader; - - struct - { - unsigned width; - unsigned height; - bool force_full; - bool allow_rotate; - } set_viewport; - - struct - { - unsigned index; - float x, y, w, h; - } rect; - - struct - { - const struct texture_image *data; - unsigned num; - } image; - - struct - { - unsigned width; - unsigned height; - } output; - - struct - { - unsigned width; - unsigned height; - bool fullscreen; - } new_mode; - - struct - { - unsigned index; - bool smooth; - } filtering; - - struct - { - char msg[PATH_MAX_LENGTH]; - struct font_params params; - } osd_message; - - struct - { - custom_command_method_t method; - void* data; - int return_value; - } custom_command; - - struct - { - custom_font_command_method_t method; - const void **font_driver; - void **font_handle; - void *video_data; - const char *font_path; - float font_size; - bool return_value; - enum font_driver_render_api api; - } font_init; - } data; -} thread_packet_t; +typedef struct thread_packet thread_packet_t; typedef struct thread_video thread_video_t;