summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-02 18:13:24 +0200
committerwm4 <wm4@nowhere>2015-10-02 18:14:00 +0200
commit93db4233af840767a74acc95649538a7ef8c9c1e (patch)
treec22b6dfe170976192baf61f6aeb898677d822103 /video
parentfe993a67123f3e7bf8c92d7b38545ffc2aba79ed (diff)
downloadmpv-93db4233af840767a74acc95649538a7ef8c9c1e.tar.bz2
mpv-93db4233af840767a74acc95649538a7ef8c9c1e.tar.xz
win32: cleanup: remove some unneeded things
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/w32.c2
-rw-r--r--video/out/vo_direct3d.c2
-rw-r--r--video/out/w32_common.c21
-rw-r--r--video/out/w32_common.h2
4 files changed, 10 insertions, 17 deletions
diff --git a/video/out/opengl/w32.c b/video/out/opengl/w32.c
index 29a7c75d32..c7b09fe87d 100644
--- a/video/out/opengl/w32.c
+++ b/video/out/opengl/w32.c
@@ -259,7 +259,7 @@ fail:
static int w32_reconfig(struct MPGLContext *ctx, int flags)
{
- vo_w32_config(ctx->vo, flags);
+ vo_w32_config(ctx->vo);
return 0;
}
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c
index 61e9ce386b..d3f6ac506e 100644
--- a/video/out/vo_direct3d.c
+++ b/video/out/vo_direct3d.c
@@ -1336,7 +1336,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
/* w32_common framework call. Creates window on the screen with
* the given coordinates.
*/
- if (!vo_w32_config(vo, flags)) {
+ if (!vo_w32_config(vo)) {
MP_VERBOSE(priv, "Creating window failed.\n");
return VO_ERROR;
}
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 4c7df7d6c2..361717a2de 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -946,13 +946,13 @@ static DWORD update_style(struct vo_w32_state *w32, DWORD style)
}
// Update the window title, position, size, and border style.
-static int reinit_window_state(struct vo_w32_state *w32)
+static void reinit_window_state(struct vo_w32_state *w32)
{
HWND layer = HWND_NOTOPMOST;
RECT r;
if (w32->parent)
- return 1;
+ return;
bool new_fs = w32->opts->fullscreen;
bool toggle_fs = w32->current_fs != new_fs;
@@ -1046,16 +1046,11 @@ static int reinit_window_state(struct vo_w32_state *w32)
r.bottom - r.top, SWP_FRAMECHANGED | SWP_SHOWWINDOW);
signal_events(w32, VO_EVENT_RESIZE);
-
- return 1;
}
static void gui_thread_reconfig(void *ptr)
{
- void **p = ptr;
- struct vo_w32_state *w32 = p[0];
- uint32_t flags = *(uint32_t *)p[1];
- int *res = p[2];
+ struct vo_w32_state *w32 = ptr;
struct vo *vo = w32->vo;
@@ -1098,17 +1093,15 @@ static void gui_thread_reconfig(void *ptr)
w32->dw = vo->dwidth;
w32->dh = vo->dheight;
- *res = reinit_window_state(w32);
+ reinit_window_state(w32);
}
// Resize the window. On the first call, it's also made visible.
-int vo_w32_config(struct vo *vo, uint32_t flags)
+int vo_w32_config(struct vo *vo)
{
struct vo_w32_state *w32 = vo->w32;
- int r;
- void *p[] = {w32, &flags, &r};
- mp_dispatch_run(w32->dispatch, gui_thread_reconfig, p);
- return r;
+ mp_dispatch_run(w32->dispatch, gui_thread_reconfig, w32);
+ return 0;
}
static void *gui_thread(void *ptr)
diff --git a/video/out/w32_common.h b/video/out/w32_common.h
index a49198340f..094660a34f 100644
--- a/video/out/w32_common.h
+++ b/video/out/w32_common.h
@@ -29,7 +29,7 @@ struct vo;
int vo_w32_init(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_config(struct vo *vo, uint32_t);
+int vo_w32_config(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);