summaryrefslogtreecommitdiff
path: root/platform/haiku
diff options
context:
space:
mode:
Diffstat (limited to 'platform/haiku')
-rw-r--r--platform/haiku/context_gl_haiku.cpp2
-rw-r--r--platform/haiku/context_gl_haiku.h2
-rw-r--r--platform/haiku/detect.py16
-rw-r--r--platform/haiku/haiku_direct_window.cpp8
-rw-r--r--platform/haiku/os_haiku.cpp4
-rw-r--r--platform/haiku/os_haiku.h2
6 files changed, 20 insertions, 14 deletions
diff --git a/platform/haiku/context_gl_haiku.cpp b/platform/haiku/context_gl_haiku.cpp
index 2b943df5ba..80d0bd78d5 100644
--- a/platform/haiku/context_gl_haiku.cpp
+++ b/platform/haiku/context_gl_haiku.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "context_gl_haiku.h"
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
+#if defined(OPENGL_ENABLED)
ContextGL_Haiku::ContextGL_Haiku(HaikuDirectWindow *p_window) {
window = p_window;
diff --git a/platform/haiku/context_gl_haiku.h b/platform/haiku/context_gl_haiku.h
index 40daf43ab9..a9a13a2b7f 100644
--- a/platform/haiku/context_gl_haiku.h
+++ b/platform/haiku/context_gl_haiku.h
@@ -30,7 +30,7 @@
#ifndef CONTEXT_GL_HAIKU_H
#define CONTEXT_GL_HAIKU_H
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
+#if defined(OPENGL_ENABLED)
#include "drivers/gl_context/context_gl.h"
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index c0e003a3d2..50f9783dd2 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -19,9 +19,10 @@ def can_build():
def get_opts():
+ from SCons.Variables import EnumVariable
return [
- ('debug_release', 'Add debug symbols to release version', 'no')
+ EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
]
@@ -36,16 +37,21 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- if (env["debug_release"] == "yes"):
+ env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
+ if (env["debug_symbols"] == "yes"):
+ env.Prepend(CCFLAGS=['-g1'])
+ if (env["debug_symbols"] == "full"):
env.Prepend(CCFLAGS=['-g2'])
- else:
- env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
elif (env["target"] == "release_debug"):
env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
+ if (env["debug_symbols"] == "yes"):
+ env.Prepend(CCFLAGS=['-g1'])
+ if (env["debug_symbols"] == "full"):
+ env.Prepend(CCFLAGS=['-g2'])
elif (env["target"] == "debug"):
- env.Prepend(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Prepend(CCFLAGS=['-g3', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
## Architecture
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index 572df493ff..24a8a4b17b 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -157,8 +157,8 @@ void HaikuDirectWindow::HandleMouseButton(BMessage *message) {
mouse_event.mouse_button.mod = GetKeyModifierState(modifiers);
mouse_event->get_button_mask() = GetMouseButtonState(buttons);
- mouse_event->get_pos().x = where.x;
- mouse_event->get_pos().y = where.y;
+ mouse_event->get_position().x = where.x;
+ mouse_event->get_position().y = where.y;
mouse_event.mouse_button.global_x = where.x;
mouse_event.mouse_button.global_y = where.y;
@@ -242,8 +242,8 @@ void HaikuDirectWindow::HandleMouseWheelChanged(BMessage *message) {
mouse_event->get_button_index() = wheel_delta_y < 0 ? 4 : 5;
mouse_event.mouse_button.mod = GetKeyModifierState(last_key_modifier_state);
mouse_event->get_button_mask() = last_button_mask;
- mouse_event->get_pos().x = last_mouse_position.x;
- mouse_event->get_pos().y = last_mouse_position.y;
+ mouse_event->get_position().x = last_mouse_position.x;
+ mouse_event->get_position().y = last_mouse_position.y;
mouse_event.mouse_button.global_x = last_mouse_position.x;
mouse_event.mouse_button.global_y = last_mouse_position.y;
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index 9f2f88bb4e..1d52752f21 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -105,7 +105,7 @@ void OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_
window->SetFlags(flags);
}
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
+#if defined(OPENGL_ENABLED)
context_gl = memnew(ContextGL_Haiku(window));
context_gl->initialize();
context_gl->make_current();
@@ -161,7 +161,7 @@ void OS_Haiku::finalize() {
memdelete(input);
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
+#if defined(OPENGL_ENABLED)
memdelete(context_gl);
#endif
}
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index d2fafb9129..d929f7e43b 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -60,7 +60,7 @@ private:
AudioDriverMediaKit driver_media_kit;
#endif
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
+#if defined(OPENGL_ENABLED)
ContextGL_Haiku *context_gl;
#endif