diff options
author | Kostadin Damyanov <maxmight@gmail.com> | 2015-05-30 00:57:07 +0300 |
---|---|---|
committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-05-30 00:57:07 +0300 |
commit | 8130707e018757d9270d8b3d94241eaecc82b896 (patch) | |
tree | cce68d2dab88a84a86475b3d5450a6c5db468494 /platform | |
parent | db459fba1db908b21d6ea3e99c6e75d65c6cc6b0 (diff) |
Haiku: start implementing the os-dependant stuff
Diffstat (limited to 'platform')
-rw-r--r-- | platform/haiku/os_haiku.cpp | 29 | ||||
-rw-r--r-- | platform/haiku/os_haiku.h | 1 |
2 files changed, 17 insertions, 13 deletions
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index dc3419b09e..fb06413478 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -8,7 +8,7 @@ OS_Haiku::OS_Haiku() { }; void OS_Haiku::run() { - + ERR_PRINT("run() NOT IMPLEMENTED"); } String OS_Haiku::get_name() { @@ -16,19 +16,20 @@ String OS_Haiku::get_name() { } int OS_Haiku::get_video_driver_count() const { - + return 1; } const char* OS_Haiku::get_video_driver_name(int p_driver) const { - + return "GLES2"; } OS::VideoMode OS_Haiku::get_default_video_mode() const { - + return OS::VideoMode(800, 600, false); } void OS_Haiku::initialize(const VideoMode& p_desired, int p_video_driver, int p_audio_driver) { main_loop = NULL; + current_video_mode = p_desired; #if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED) //context_gl = memnew( ContextGL_X11( x11_display, x11_window,current_videomode, false ) ); @@ -42,6 +43,8 @@ void OS_Haiku::initialize(const VideoMode& p_desired, int p_video_driver, int p_ if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) { visual_server = memnew(VisualServerWrapMT(visual_server, get_render_thread_mode() == RENDER_SEPARATE_THREAD)); } + + visual_server->init(); } void OS_Haiku::finalize() { @@ -76,39 +79,39 @@ void OS_Haiku::delete_main_loop() { } bool OS_Haiku::can_draw() const { - + ERR_PRINT("can_draw() NOT IMPLEMENTED"); } Point2 OS_Haiku::get_mouse_pos() const { - + ERR_PRINT("get_mouse_pos() NOT IMPLEMENTED"); } int OS_Haiku::get_mouse_button_state() const { - + ERR_PRINT("get_mouse_button_state() NOT IMPLEMENTED"); } void OS_Haiku::set_cursor_shape(CursorShape p_shape) { - + ERR_PRINT("set_cursor_shape() NOT IMPLEMENTED"); } void OS_Haiku::set_window_title(const String& p_title) { - + ERR_PRINT("set_window_title() NOT IMPLEMENTED"); } Size2 OS_Haiku::get_window_size() const { - + ERR_PRINT("get_window_size() NOT IMPLEMENTED"); } void OS_Haiku::set_video_mode(const VideoMode& p_video_mode, int p_screen) { - + ERR_PRINT("set_video_mode() NOT IMPLEMENTED"); } OS::VideoMode OS_Haiku::get_video_mode(int p_screen) const { - + return current_video_mode; } void OS_Haiku::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const { - + ERR_PRINT("get_fullscreen_mode_list() NOT IMPLEMENTED"); } String OS_Haiku::get_executable_path() const { diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index 67faff5e96..dfe559c969 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -10,6 +10,7 @@ private: MainLoop* main_loop; Rasterizer* rasterizer; VisualServer* visual_server; + VideoMode current_video_mode; virtual void delete_main_loop(); |