Fix compile errors for Windows

This commit is contained in:
PaulStoffregen 2016-03-15 16:22:15 -07:00
commit dbf89a1a33
2 changed files with 4 additions and 2 deletions

View file

@ -21,6 +21,7 @@
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#define random() rand()
#elif defined(MACOSX)
#include <termios.h>
#include <unistd.h>

View file

@ -261,7 +261,8 @@ wxArrayString serial_port_list()
}
} else {
char buf[1024];
win32_err(buf);
buf[0] = 0;
//win32_err(buf);
printf("QueryDosDeviceA failed, error \"%s\"\n", buf);
printf("Detect Serial using brute force GetDefaultCommConfig probing: ");
for (int i=1; i<=32; i++) {
@ -269,7 +270,7 @@ wxArrayString serial_port_list()
COMMCONFIG cfg;
DWORD len;
snprintf(buf, sizeof(buf), "COM%d", i);
if (GetDefaultCommConfig(buf, &cfg, &len)) {
if (GetDefaultCommConfigA(buf, &cfg, &len)) {
wxString name;
name.Printf("COM%d:", i);
list.Add(name);