Skip to content

Commit

Permalink
Disable intermediary texture rendering on Linux by default (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
kometbomb committed Jul 16, 2019
1 parent 16e37e3 commit bb53759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ REV := cp -f

PREFIX ?= /usr
BINDIR = $(PREFIX)/bin
CFLAGS := $(MACHINE) -ftree-vectorize -std=gnu99 -Wno-strict-aliasing

ifdef COMSPEC
# Compiling for Windows
RES_PATH := .
CFLAGS += -DRESOURCES_IN_BINARY_DIR
CONFIG_PATH := ~/.klystrack
else
# Not compiling for Windows
RES_PATH = $(PREFIX)/lib/klystrack
CONFIG_PATH := ~/.klystrack
CFLAGS += -DCONFIG_DEFAULT_DISABLE_RENDER_TO_TEXTURE
endif


include klystron/common.mk

CFLAGS := $(MACHINE) -ftree-vectorize -std=gnu99 -Wno-strict-aliasing

ifdef COMSPEC
TARGET := $(TARGET).exe
ARCHIVE := $(ARCHIVE).zip
Expand Down
7 changes: 7 additions & 0 deletions src/mused.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ void init(MusInstrument *instrument, MusPattern *pattern, MusSeqPattern sequence

mused.flags = MULTICHANNEL_PREVIEW|ANIMATE_CURSOR|EDIT_MODE|SHOW_LOGO|FOLLOW_PLAY_POSITION|
MULTIKEY_JAMMING|START_WITH_TEMPLATE|EDIT_SEQUENCE_DIGITS;

// Rendering to the intermediary texture is disabled by default on Linux systems
// as it causes flashing of screen
#ifdef CONFIG_DEFAULT_DISABLE_RENDER_TO_TEXTURE
mused.flags |= DISABLE_RENDER_TO_TEXTURE;
#endif

mused.visible_columns = VC_INSTRUMENT | VC_COMMAND;
mused.done = 0;
mused.octave = 4;
Expand Down

0 comments on commit bb53759

Please sign in to comment.