File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ using std::numeric_limits;
3737using std::shared_ptr;
3838using std::vector;
3939
40+ namespace of {
41+ namespace priv {
42+ bool InitGLFW (){
43+ return glfwInit ();
44+ }
45+ }
46+ }
47+
4048// -------------------------------------------------------
4149ofAppGLFWWindow::ofAppGLFWWindow ()
4250 : coreEvents(new ofCoreEvents) {
@@ -155,8 +163,8 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {
155163 return ;
156164 }
157165 settings = _settings;
158-
159- if (!glfwInit ()) {
166+
167+ if (!of::priv::InitGLFW ()) {
160168 ofLogError (" ofAppGLFWWindow" ) << " couldn't init GLFW" ;
161169 return ;
162170 }
@@ -1685,7 +1693,7 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {
16851693
16861694 // ------------------------------------------------------------
16871695 void ofAppGLFWWindow::listVideoModes () {
1688- glfwInit ();
1696+ of::priv::InitGLFW ();
16891697 int numModes;
16901698 const GLFWvidmode * vidModes = glfwGetVideoModes (nullptr , &numModes);
16911699 for (int i = 0 ; i < numModes; i++) {
@@ -1696,7 +1704,7 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {
16961704
16971705 // ------------------------------------------------------------
16981706 void ofAppGLFWWindow::listMonitors () {
1699- glfwInit ();
1707+ of::priv::InitGLFW ();
17001708 int count;
17011709 const auto monitors = glfwGetMonitors (&count);
17021710 for (int i = 0 ; i < count; i++) {
You can’t perform that action at this time.
0 commit comments