Browse Source

Fixed build on Linux, hopefully fixed framebuffer size on high-DPI

screens
tags/v0.3.0
Andrew Belt 7 years ago
parent
commit
991ec67f75
4 changed files with 5 additions and 7 deletions
  1. +2
    -2
      Makefile
  2. +0
    -1
      include/widgets.hpp
  3. +2
    -3
      src/gui.cpp
  4. +1
    -1
      src/main.cpp

+ 2
- 2
Makefile View File

@@ -1,6 +1,6 @@
ARCH ?= linux
CFLAGS = -MMD -g -Wall -O2
CXXFLAGS = -MMD -g -Wall -std=c++11 -O2 -ffast-math -fno-exceptions \
CXXFLAGS = -MMD -g -Wall -std=c++11 -O3 -ffast-math -fno-exceptions \
-I./lib -I./include
LDFLAGS =

@@ -15,7 +15,7 @@ CXX = g++
SOURCES += lib/noc/noc_file_dialog.c
CFLAGS += -DNOC_FILE_DIALOG_GTK $(shell pkg-config --cflags gtk+-2.0)
CXXFLAGS += -DLINUX
LDFLAGS += -lpthread -lGL -lGLEW -lglfw -ldl -ljansson -lportaudio -lportmidi \
LDFLAGS += -rdynamic -lpthread -lGL -lGLEW -lglfw -ldl -ljansson -lportaudio -lportmidi \
$(shell pkg-config --libs gtk+-2.0)
TARGET = Rack
endif


+ 0
- 1
include/widgets.hpp View File

@@ -3,7 +3,6 @@
#include <assert.h>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <list>
#include <map>



+ 2
- 3
src/gui.cpp View File

@@ -152,9 +152,8 @@ void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods

void renderGui() {
int width, height;
// The docs say to use the framebuffer size to get pixel-perfect matching for high-DPI displays, but I actually don't want this. On 2x displays, one gui pixel should be 2x2 monitor pixels.
// glfwGetFramebufferSize(window, &width, &height);
glfwGetWindowSize(window, &width, &height);
glfwGetFramebufferSize(window, &width, &height);
// glfwGetWindowSize(window, &width, &height);

// Update and render
glViewport(0, 0, width, height);


+ 1
- 1
src/main.cpp View File

@@ -33,9 +33,9 @@ int main() {
#endif


pluginInit();
rackInit();
guiInit();
pluginInit();
gRackWidget->loadPatch("autosave.json");

rackStart();


Loading…
Cancel
Save