2 * sdl.hidd - SDL graphics/sound/keyboard for AROS hosted
3 * Copyright (c) 2007 Robert Norris. All rights reserved.
4 * Copyright (c) 2007-2010 The AROS Development Team
6 * This program is free software; you can redistribute it and/or modify it
7 * under the same terms as AROS itself.
10 #include <exec/types.h>
11 #include <proto/hostlib.h>
12 #include <proto/exec.h>
15 #include <aros/debug.h>
17 #include "sdl_intern.h"
19 int sdl_hidd_init(LIBBASETYPEPTR LIBBASE
) {
20 SDL_version cver
, *rver
;
23 D(bug("[sdl] hidd init\n"));
26 rver
= SP(SDL_Linked_Version
);
28 kprintf("sdl.hidd: using SDL version %d.%d.%d\n", rver
->major
, rver
->minor
, rver
->patch
);
30 if (cver
.major
!= rver
->major
|| cver
.minor
!= rver
->minor
|| cver
.patch
!= rver
->patch
) {
31 kprintf("WARNING: sdl.hidd was compiled against SDL version %d.%d.%d\n", cver
.major
, cver
.minor
, cver
.patch
);
32 kprintf(" You may experience problems\n");
35 /* start sdl. we don't catch any signals with a debug build as it plays
36 * havoc with the debugger */
38 ret
= S(SDL_Init
, SDL_INIT_VIDEO
| SDL_INIT_NOPARACHUTE
);
40 ret
= S(SDL_Init
, SDL_INIT_VIDEO
);
44 D(bug("[sdl] couldn't initialise SDL\n"));
48 S(SDL_ShowCursor
, SDL_DISABLE
);