diff --git a/Makefile b/Makefile index 4022d35..f4ae490 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ CXXFLAGS = $(CFLAGS) `$(WXCONFIG) --cppflags` WXCONFIG = ~/wxwidgets/3.0.2.mac-opengl/bin/wx-config SFLAG = -s CLILIBS = -lglut -lGLU -lGL -lm +VERSION = 0.01 else ifeq ($(OS), MACOSX_CLANG) ALL = gui.app @@ -34,6 +35,7 @@ WXCONFIG = wx-config CXXFLAGS = $(CFLAGS) `$(WXCONFIG) --cppflags` SFLAG = CLILIBS = -lglut -lGLU -lGL -lm +VERSION = 0.01 else ifeq ($(OS), WINDOWS) ALL = gui.exe @@ -45,7 +47,7 @@ LDFLAGS = -static -static-libgcc SFLAG = -s WXCONFIG = ~/wxwidgets/3.0.2.mingw-opengl/bin/wx-config CLILIBS = -lglut32 -lglu32 -lopengl32 -lm -VERSION = 0.01 +MAKEFLAGS = --jobs=12 endif diff --git a/serialdata.c b/serialdata.c index c1a5645..faeb071 100644 --- a/serialdata.c +++ b/serialdata.c @@ -527,6 +527,10 @@ int open_port(const char *name) CloseHandle(port_handle); return 0; } + if (!EscapeCommFunction(port_handle, SETDTR)) { + CloseHandle(port_handle); + return 0; + } return 1; }