summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2018-03-04 14:18:05 -0300
committerMarcelo Fernandez <marcelofg55@gmail.com>2018-03-04 14:18:05 -0300
commitd780d774aa4630302fddbef0516e3f96beacd7b5 (patch)
tree15f3ee3c64b4882b7d2bf399d8f68755feda2ba3 /platform/osx
parente619727e999ecd8e6883330f2c6950cd0624de99 (diff)
Clean and expose get_audio/video_driver_* funcs on OS class
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/os_osx.h8
-rw-r--r--platform/osx/os_osx.mm20
2 files changed, 2 insertions, 26 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 04463a81f0..486d7af1c1 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -50,11 +50,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-enum VideoDriver {
- VIDEO_DRIVER_GLES3,
- VIDEO_DRIVER_GLES2
-};
-
class OS_OSX : public OS_Unix {
public:
struct KeyEvent {
@@ -139,9 +134,6 @@ public:
void _update_window();
protected:
- virtual int get_video_driver_count() const;
- virtual const char *get_video_driver_name(int p_driver) const;
-
virtual void initialize_core();
virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
virtual void finalize();
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index f530da8b71..a811ff585d 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1026,22 +1026,6 @@ void OS_OSX::set_ime_position(const Point2 &p_pos) {
im_position = p_pos;
}
-int OS_OSX::get_video_driver_count() const {
-
- return 2;
-}
-
-const char *OS_OSX::get_video_driver_name(int p_driver) const {
-
- switch (p_driver) {
- case VIDEO_DRIVER_GLES2:
- return "GLES2";
- case VIDEO_DRIVER_GLES3:
- default:
- return "GLES3";
- }
-}
-
void OS_OSX::initialize_core() {
crash_handler.initialize();
@@ -1215,8 +1199,6 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
/*** END OSX INITIALIZATION ***/
- AudioDriverManager::add_driver(&audio_driver);
-
// only opengl support here...
if (p_video_driver == VIDEO_DRIVER_GLES2) {
RasterizerGLES2::register_config();
@@ -2445,6 +2427,8 @@ OS_OSX::OS_OSX() {
[NSApp sendEvent:event];
}
+
+ AudioDriverManager::add_driver(&audio_driver);
}
bool OS_OSX::_check_internal_feature_support(const String &p_feature) {