summaryrefslogtreecommitdiff
path: root/platform/haiku
diff options
context:
space:
mode:
Diffstat (limited to 'platform/haiku')
-rw-r--r--platform/haiku/audio_driver_media_kit.cpp2
-rw-r--r--platform/haiku/os_haiku.cpp6
-rw-r--r--platform/haiku/os_haiku.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
index 278a994c54..1f901c4919 100644
--- a/platform/haiku/audio_driver_media_kit.cpp
+++ b/platform/haiku/audio_driver_media_kit.cpp
@@ -43,7 +43,7 @@ Error AudioDriverMediaKit::init() {
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
- int latency = GLOBAL_DEF("audio/output_latency", 25);
+ int latency = GLOBAL_DEF_RST("audio/output_latency", 25);
buffer_size = next_power_of_2(latency * mix_rate / 1000);
samples_in = memnew_arr(int32_t, buffer_size * channels);
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index 97fab5ca0d..209cb5cec4 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -80,6 +80,10 @@ const char *OS_Haiku::get_video_driver_name(int p_driver) const {
return "GLES3";
}
+int OS_Haiku::get_current_video_driver() const {
+ return video_driver_index;
+}
+
Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
main_loop = NULL;
current_video_mode = p_desired;
@@ -124,6 +128,8 @@ Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p
}
*/
+ video_driver_index = p_video_driver;
+
input = memnew(InputDefault);
window->SetInput(input);
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index 615ae682ef..13d4420bde 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -51,6 +51,7 @@ private:
Rasterizer *rasterizer;
VisualServer *visual_server;
VideoMode current_video_mode;
+ int video_driver_index;
PowerHaiku *power_manager;
#ifdef MEDIA_KIT_ENABLED
@@ -66,6 +67,7 @@ private:
protected:
virtual int get_video_driver_count() const;
virtual const char *get_video_driver_name(int p_driver) const;
+ virtual int get_current_video_driver() const;
virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
virtual void finalize();