From 7ebf0d709f70835460615cccaa8bd02936b7800c Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 4 Mar 2018 13:05:13 -0500 Subject: [PATCH] Define RACK_DIR in Makefile, use windowWidth and windowHeight for Scene dimensions --- Makefile | 1 + compile.mk | 3 +++ src/window.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1d429d3a..66c720eb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION = 0.6.0dev +RACK_DIR = . FLAGS += \ -Iinclude \ diff --git a/compile.mk b/compile.mk index 307c6fe7..358a60f5 100644 --- a/compile.mk +++ b/compile.mk @@ -1,6 +1,7 @@ ifdef VERSION FLAGS += -DVERSION=$(VERSION) endif +RACK_DIR ?= . # Generate dependency files alongside the object files FLAGS += -MMD @@ -14,6 +15,8 @@ endif CXXFLAGS += -std=c++11 +include $(RACK_DIR)/arch.mk + ifeq ($(ARCH), lin) FLAGS += -DARCH_LIN endif diff --git a/src/window.cpp b/src/window.cpp index cc0d69ea..1978ef89 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -461,7 +461,7 @@ void windowRun() { glfwGetWindowSize(gWindow, &windowWidth, &windowHeight); gWindowRatio = (float)width / windowWidth; - gScene->box.size = Vec(width, height).div(gPixelRatio / gWindowRatio); + gScene->box.size = Vec(windowWidth, windowHeight); // Step scene gScene->step();