Don't pass video_info_t as pointer

This commit is contained in:
twinaphex 2017-01-16 18:02:28 +01:00
parent af39ac76a4
commit 9feb430b58
3 changed files with 8 additions and 7 deletions

View File

@ -753,7 +753,7 @@ static bool init_video(void)
if (!video_init_thread((const video_driver_t**)&current_video,
&video_driver_data,
input_get_double_ptr(), input_driver_get_data_ptr(),
current_video, &video))
current_video, video))
{
RARCH_ERR("Cannot open threaded video driver ... Exiting ...\n");
goto error;

View File

@ -809,7 +809,8 @@ static void video_thread_set_nonblock_state(void *data, bool state)
thr->nonblock = state;
}
static bool video_thread_init(thread_video_t *thr, const video_info_t *info,
static bool video_thread_init(thread_video_t *thr,
const video_info_t info,
const input_driver_t **input, void **input_data)
{
size_t max_size;
@ -822,15 +823,15 @@ static bool video_thread_init(thread_video_t *thr, const video_info_t *info,
thr->cond_thread = scond_new();
thr->input = input;
thr->input_data = input_data;
thr->info = *info;
thr->info = info;
thr->alive = true;
thr->focus = true;
thr->has_windowed = true;
thr->suppress_screensaver = true;
max_size = info->input_scale * RARCH_SCALE_BASE;
max_size = info.input_scale * RARCH_SCALE_BASE;
max_size *= max_size;
max_size *= info->rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
max_size *= info.rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
thr->frame.buffer = (uint8_t*)malloc(max_size);
if (!thr->frame.buffer)
@ -1355,7 +1356,7 @@ static void video_thread_set_callbacks(
**/
bool video_init_thread(const video_driver_t **out_driver,
void **out_data, const input_driver_t **input, void **input_data,
const video_driver_t *drv, const video_info_t *info)
const video_driver_t *drv, const video_info_t info)
{
thread_video_t *thr = (thread_video_t*)calloc(1, sizeof(*thr));
if (!thr)

View File

@ -53,7 +53,7 @@ typedef struct thread_video thread_video_t;
bool video_init_thread(
const video_driver_t **out_driver, void **out_data,
const input_driver_t **input, void **input_data,
const video_driver_t *driver, const video_info_t *info);
const video_driver_t *driver, const video_info_t info);
/**
* video_thread_get_ptr: