fix for crash when no ALSA or Pulse installed on linux
This commit is contained in:
parent
c3886e89cb
commit
2495e8a941
|
@ -1990,6 +1990,11 @@ OS_X11::OS_X11() {
|
||||||
AudioDriverManagerSW::add_driver(&driver_alsa);
|
AudioDriverManagerSW::add_driver(&driver_alsa);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(AudioDriverManagerSW::get_driver_count() == 0){
|
||||||
|
WARN_PRINT("No sound driver found... Defaulting to dummy driver");
|
||||||
|
AudioDriverManagerSW::add_driver(&driver_dummy);
|
||||||
|
}
|
||||||
|
|
||||||
minimized = false;
|
minimized = false;
|
||||||
xim_style=0L;
|
xim_style=0L;
|
||||||
mouse_mode=MOUSE_MODE_VISIBLE;
|
mouse_mode=MOUSE_MODE_VISIBLE;
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "drivers/rtaudio/audio_driver_rtaudio.h"
|
#include "drivers/rtaudio/audio_driver_rtaudio.h"
|
||||||
#include "drivers/alsa/audio_driver_alsa.h"
|
#include "drivers/alsa/audio_driver_alsa.h"
|
||||||
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
|
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
|
||||||
|
#include "servers/audio/audio_driver_dummy.h"
|
||||||
#include "servers/physics_2d/physics_2d_server_sw.h"
|
#include "servers/physics_2d/physics_2d_server_sw.h"
|
||||||
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
|
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
|
||||||
#include "main/input_default.h"
|
#include "main/input_default.h"
|
||||||
|
@ -168,6 +169,7 @@ class OS_X11 : public OS_Unix {
|
||||||
#ifdef PULSEAUDIO_ENABLED
|
#ifdef PULSEAUDIO_ENABLED
|
||||||
AudioDriverPulseAudio driver_pulseaudio;
|
AudioDriverPulseAudio driver_pulseaudio;
|
||||||
#endif
|
#endif
|
||||||
|
AudioDriverDummy driver_dummy;
|
||||||
|
|
||||||
Atom net_wm_icon;
|
Atom net_wm_icon;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue