Files
Sasha Levin 2d0c904c88 kvm tools: don't die if sdl wasn't compiled in and we don't try using it
If SDL isn't compiled in we shouldn't die unless we actually try using it.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:53 +01:00

29 lines
513 B
C

#ifndef KVM__SDL_H
#define KVM__SDL_H
#include "kvm/util.h"
struct framebuffer;
#ifdef CONFIG_HAS_SDL
int sdl__init(struct kvm *kvm);
int sdl__exit(struct kvm *kvm);
#else
static inline int sdl__init(struct kvm *kvm)
{
if (kvm->cfg.sdl)
die("SDL support not compiled in. (install the SDL-dev[el] package)");
return 0;
}
static inline int sdl__exit(struct kvm *kvm)
{
if (kvm->cfg.sdl)
die("SDL support not compiled in. (install the SDL-dev[el] package)");
return 0;
}
#endif
#endif /* KVM__SDL_H */