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>
#else
static inline int sdl__init(struct kvm *kvm)
{
- die("SDL support not compiled in. (install the SDL-dev[el] package)");
+ 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)
{
- die("SDL support not compiled in. (install the SDL-dev[el] package)");
+ if (kvm->cfg.sdl)
+ die("SDL support not compiled in. (install the SDL-dev[el] package)");
+
+ return 0;
}
#endif