Fix compile errors for Windows
This commit is contained in:
parent
38d5d30656
commit
dbf89a1a33
2 changed files with 4 additions and 2 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue