diff options
Diffstat (limited to 'platform/haiku')
-rw-r--r-- | platform/haiku/audio_driver_media_kit.cpp | 4 | ||||
-rw-r--r-- | platform/haiku/context_gl_haiku.h | 22 | ||||
-rw-r--r-- | platform/haiku/detect.py | 6 | ||||
-rw-r--r-- | platform/haiku/os_haiku.cpp | 4 | ||||
-rw-r--r-- | platform/haiku/os_haiku.h | 1 |
5 files changed, 20 insertions, 17 deletions
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp index 8b7dd08bb7..3c4e31da36 100644 --- a/platform/haiku/audio_driver_media_kit.cpp +++ b/platform/haiku/audio_driver_media_kit.cpp @@ -39,11 +39,11 @@ int32_t *AudioDriverMediaKit::samples_in = NULL; Error AudioDriverMediaKit::init() { active = false; - mix_rate = 44100; + mix_rate = GLOBAL_DEF_RST("audio/mix_rate", DEFAULT_MIX_RATE); speaker_mode = SPEAKER_MODE_STEREO; channels = 2; - int latency = GLOBAL_DEF_RST("audio/output_latency", 25); + int latency = GLOBAL_DEF_RST("audio/output_latency", DEFAULT_OUTPUT_LATENCY); buffer_size = next_power_of_2(latency * mix_rate / 1000); samples_in = memnew_arr(int32_t, buffer_size * channels); diff --git a/platform/haiku/context_gl_haiku.h b/platform/haiku/context_gl_haiku.h index 6eb67fea70..8452f5fbfb 100644 --- a/platform/haiku/context_gl_haiku.h +++ b/platform/haiku/context_gl_haiku.h @@ -33,12 +33,10 @@ #if defined(OPENGL_ENABLED) -#include "drivers/gl_context/context_gl.h" - #include "haiku_direct_window.h" #include "haiku_gl_view.h" -class ContextGL_Haiku : public ContextGL { +class ContextGL_Haiku { private: HaikuGLView *view; HaikuDirectWindow *window; @@ -46,18 +44,18 @@ private: bool use_vsync; public: - virtual Error initialize(); - virtual void release_current(); - virtual void make_current(); - virtual void swap_buffers(); - virtual int get_window_width(); - virtual int get_window_height(); + Error initialize(); + void release_current(); + void make_current(); + void swap_buffers(); + int get_window_width(); + int get_window_height(); - virtual void set_use_vsync(bool p_use); - virtual bool is_using_vsync() const; + void set_use_vsync(bool p_use); + bool is_using_vsync() const; ContextGL_Haiku(HaikuDirectWindow *p_window); - virtual ~ContextGL_Haiku(); + ~ContextGL_Haiku(); }; #endif diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index ae8cc58a4a..f33c77a407 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -137,7 +137,7 @@ def configure(env): if not env['builtin_miniupnpc']: # No pkgconfig file so far, hardcode default paths. - env.Append(CPPPATH=["/system/develop/headers/x86/miniupnpc"]) + env.Prepend(CPPPATH=["/system/develop/headers/x86/miniupnpc"]) env.Append(LIBS=["miniupnpc"]) # On Linux wchar_t should be 32-bits @@ -147,9 +147,9 @@ def configure(env): ## Flags - env.Append(CPPPATH=['#platform/haiku']) + env.Prepend(CPPPATH=['#platform/haiku']) env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DOPENGL_ENABLED', '-DGLES_ENABLED']) env.Append(CPPFLAGS=['-DMEDIA_KIT_ENABLED']) - # env.Append(CCFLAGS=['-DFREETYPE_ENABLED']) + # env.Append(CPPFLAGS=['-DFREETYPE_ENABLED']) env.Append(CPPFLAGS=['-DPTHREAD_NO_RENAME']) # TODO: enable when we have pthread_setname_np env.Append(LIBS=['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL']) diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index a6d5a00852..f3fed6669b 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -203,6 +203,10 @@ void OS_Haiku::set_cursor_shape(CursorShape p_shape) { //ERR_PRINT("set_cursor_shape() NOT IMPLEMENTED"); } +OS::CursorShape OS_Haiku::get_cursor_shape() const { + // TODO: implement get_cursor_shape +} + void OS_Haiku::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { // TODO } diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index d7eac10635..6ab006843a 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -86,6 +86,7 @@ public: virtual Point2 get_mouse_position() const; virtual int get_mouse_button_state() const; virtual void set_cursor_shape(CursorShape p_shape); + virtual CursorShape get_cursor_shape() const; virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot); virtual int get_screen_count() const; |