mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
vo_direct3d: fix operation
Regression since commit 93db4233
. I think the bit that was forgotten
here was to remove the vo_w32_config() return value completely. The VO
failed to init because that function always returned 0. This commit
removes these bits and fixes the VO.
Fixes #2434.
This commit is contained in:
parent
7984d25ceb
commit
b92fd602ce
@ -1333,13 +1333,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
|
|||||||
|
|
||||||
priv->have_image = false;
|
priv->have_image = false;
|
||||||
|
|
||||||
/* w32_common framework call. Creates window on the screen with
|
vo_w32_config(vo);
|
||||||
* the given coordinates.
|
|
||||||
*/
|
|
||||||
if (!vo_w32_config(vo)) {
|
|
||||||
MP_VERBOSE(priv, "Creating window failed.\n");
|
|
||||||
return VO_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((priv->image_format != params->imgfmt)
|
if ((priv->image_format != params->imgfmt)
|
||||||
|| (priv->src_width != params->w)
|
|| (priv->src_width != params->w)
|
||||||
|
@ -1088,11 +1088,10 @@ static void gui_thread_reconfig(void *ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resize the window. On the first call, it's also made visible.
|
// Resize the window. On the first call, it's also made visible.
|
||||||
int vo_w32_config(struct vo *vo)
|
void vo_w32_config(struct vo *vo)
|
||||||
{
|
{
|
||||||
struct vo_w32_state *w32 = vo->w32;
|
struct vo_w32_state *w32 = vo->w32;
|
||||||
mp_dispatch_run(w32->dispatch, gui_thread_reconfig, w32);
|
mp_dispatch_run(w32->dispatch, gui_thread_reconfig, w32);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void thread_disable_ime(void)
|
static void thread_disable_ime(void)
|
||||||
|
@ -29,7 +29,7 @@ struct vo;
|
|||||||
int vo_w32_init(struct vo *vo);
|
int vo_w32_init(struct vo *vo);
|
||||||
void vo_w32_uninit(struct vo *vo);
|
void vo_w32_uninit(struct vo *vo);
|
||||||
int vo_w32_control(struct vo *vo, int *events, int request, void *arg);
|
int vo_w32_control(struct vo *vo, int *events, int request, void *arg);
|
||||||
int vo_w32_config(struct vo *vo);
|
void vo_w32_config(struct vo *vo);
|
||||||
HWND vo_w32_hwnd(struct vo *vo);
|
HWND vo_w32_hwnd(struct vo *vo);
|
||||||
void vo_w32_run_on_thread(struct vo *vo, void (*cb)(void *ctx), void *ctx);
|
void vo_w32_run_on_thread(struct vo *vo, void (*cb)(void *ctx), void *ctx);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user