2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
7 #include <proto/hostlib.h>
13 int (*SDL_Init
) (ULONG flags
);
14 void * (*SDL_SetVideoMode
) (int width
, int height
, int bpp
, ULONG flags
);
15 void (*SDL_Quit
) (void);
17 int main(int argc
, char **argv
) {
21 if ((HostLibBase
= OpenResource("hostlib.resource")) == NULL
) {
22 fprintf(stderr
, "can't open hostlib.resource\n");
26 if ((handle
= HostLib_Open("libSDL.so", &err
)) == NULL
) {
27 fprintf(stderr
, "can't open sdl: %s\n", err
);
31 SDL_Init
= HostLib_GetPointer(handle
, "SDL_Init", NULL
);
32 SDL_SetVideoMode
= HostLib_GetPointer(handle
, "SDL_SetVideoMode", NULL
);
33 SDL_Quit
= HostLib_GetPointer(handle
, "SDL_Quit", NULL
);
36 SDL_SetVideoMode(640, 480, 16, 0);
42 HostLib_Close(handle
, NULL
);