| 831 | |
| 832 | |
| 833 | void init() { |
| 834 | int err; |
| 835 | |
| 836 | // Set up GLFW |
| 837 | #if defined ARCH_MAC |
| 838 | glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_TRUE); |
| 839 | glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE); |
| 840 | #endif |
| 841 | |
| 842 | glfwSetErrorCallback(errorCallback); |
| 843 | err = glfwInit(); |
| 844 | if (err != GLFW_TRUE) { |
| 845 | osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Could not initialize GLFW."); |
| 846 | throw Exception("Could not initialize GLFW"); |
| 847 | } |
| 848 | } |
| 849 | |
| 850 | |
| 851 | void destroy() { |