summaryrefslogtreecommitdiff
path: root/modules/sdl
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-20 10:30:54 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-20 10:30:54 +0200
commitd2609092150272f3e3a6a4d9859d3c851e1fa270 (patch)
treeda65ce08d7997e9e67b78d96cb5ceccf8b839b44 /modules/sdl
parentf369fc474a4f629fb08ad8ae4c188e43f68806fc (diff)
vidisp: use const pointer to base-class
Diffstat (limited to 'modules/sdl')
-rw-r--r--modules/sdl/sdl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/sdl/sdl.c b/modules/sdl/sdl.c
index eb902b3..ea60a38 100644
--- a/modules/sdl/sdl.c
+++ b/modules/sdl/sdl.c
@@ -17,7 +17,7 @@ enum {
};
struct vidisp_st {
- struct vidisp *vd; /* inheritance */
+ const struct vidisp *vd; /* inheritance */
};
/** Global SDL data */
@@ -174,12 +174,11 @@ static void destructor(void *arg)
{
struct vidisp_st *st = arg;
- mem_deref(st->vd);
sdl_close();
}
-static int alloc(struct vidisp_st **stp, struct vidisp *vd,
+static int alloc(struct vidisp_st **stp, const struct vidisp *vd,
struct vidisp_prm *prm, const char *dev,
vidisp_resize_h *resizeh, void *arg)
{
@@ -197,7 +196,7 @@ static int alloc(struct vidisp_st **stp, struct vidisp *vd,
if (!st)
return ENOMEM;
- st->vd = mem_ref(vd);
+ st->vd = vd;
sdl.resizeh = resizeh;
sdl.arg = arg;