Browse Source

Disable system::setThreadRealTime on Mac. Fix GLFW init hints on Mac.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
46f9577dc1
2 changed files with 8 additions and 4 deletions
  1. +3
    -2
      src/system.cpp
  2. +5
    -2
      src/window.cpp

+ 3
- 2
src/system.cpp View File

@@ -106,7 +106,7 @@ void setThreadName(const std::string &name) {
}

void setThreadRealTime(bool realTime) {
#if defined ARCH_LIN || defined ARCH_MAC
#if defined ARCH_LIN
int err;
int policy;
struct sched_param param;
@@ -125,7 +125,8 @@ void setThreadRealTime(bool realTime) {

// pthread_getschedparam(pthread_self(), &policy, &param);
// DEBUG("policy %d priority %d", policy, param.sched_priority);

#elif defined ARCH_MAC
// Not yet implemented
#elif defined ARCH_WIN
// Set process class first
if (realTime) {


+ 5
- 2
src/window.cpp View File

@@ -201,8 +201,6 @@ Window::Window() {

#if defined ARCH_MAC
glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_TRUE);
glfwWindowHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_TRUE);
glfwWindowHint(GLFW_COCOA_MENUBAR, GLFW_TRUE);
#endif

// Create window
@@ -491,6 +489,11 @@ void windowInit() {
int err;

// Set up GLFW
#if defined ARCH_MAC
glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_TRUE);
glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_TRUE);
#endif

glfwSetErrorCallback(errorCallback);
err = glfwInit();
if (err != GLFW_TRUE) {


Loading…
Cancel
Save