diff options
Diffstat (limited to 'platform/iphone/os_iphone.cpp')
-rw-r--r-- | platform/iphone/os_iphone.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index 0e3eeed114..5009f7d8ae 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -35,13 +35,13 @@ #include "servers/visual/visual_server_raster.h" //#include "servers/visual/visual_server_wrap_mt.h" -#include "audio_driver_iphone.h" #include "main/main.h" #include "core/io/file_access_pack.h" #include "core/os/dir_access.h" #include "core/os/file_access.h" #include "core/project_settings.h" +#include "drivers/unix/syslog_logger.h" #include "sem_iphone.h" @@ -99,6 +99,13 @@ void OSIPhone::initialize_core() { SemaphoreIphone::make_default(); }; +void OSIPhone::initialize_logger() { + Vector<Logger *> loggers; + loggers.push_back(memnew(SyslogLogger)); + loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt"))); + _set_logger(memnew(CompositeLogger(loggers))); +} + void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) { supported_orientations = 0; @@ -124,9 +131,8 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_ // reset this to what it should be, it will have been set to 0 after visual_server->init() is called RasterizerStorageGLES3::system_fbo = gl_view_base_fb; - audio_driver = memnew(AudioDriverIphone); - audio_driver->set_singleton(); - audio_driver->init(); + AudioDriverManager::add_driver(&audio_driver); + AudioDriverManager::initialize(p_audio_driver); // init physics servers physics_server = memnew(PhysicsServerSW); @@ -570,6 +576,8 @@ OSIPhone::OSIPhone(int width, int height) { vm.resizable = false; set_video_mode(vm); event_count = 0; + + _set_logger(memnew(SyslogLogger)); }; OSIPhone::~OSIPhone() { |