X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwinboard.c;h=06cf715a6785851fd828bce995b280b7a03c7941;hb=e7419db9b1c542d1ca0b825cdfc0032a4ba39188;hp=509ba76275e367f4294cdb80d8b8ab450b0a8e18;hpb=21b3e61d8cd19bc5c916def127f055da7faf6cc2;p=xboard.git diff --git a/winboard/winboard.c b/winboard/winboard.c index 509ba76..06cf715 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -1222,13 +1222,12 @@ PrintCommPortSettings(FILE *f, char *name) int MySearchPath(char *installDir, char *name, char *fullname) { - char *dummy; - if(name[0] == '~' && name[1] == '\\') { // [HGM] recognize ~ as HOMEPATH environment variable - installDir = getenv("HOMEPATH"); - name += 2; - strcpy(fullname, installDir); - strcat(fullname, "\\"); - strcat(fullname, name); + char *dummy, buf[MSG_SIZ]; + if(name[0] == '%' && strchr(name+1, '%')) { // [HGM] recognize %*% as environment variable + strcpy(buf, name+1); + *strchr(buf, '%') = 0; + installDir = getenv(buf); + sprintf(fullname, "%s\\%s", installDir, strchr(name+1, '%')+1); return strlen(fullname); } return (int) SearchPath(installDir, name, NULL, MSG_SIZ, fullname, &dummy); @@ -3867,12 +3866,12 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Mouse Wheel is being rolled forward * Play moves forward */ - if((short)HIWORD(wParam) > 0 && currentMove < forwardMostMove) + if((short)HIWORD(wParam) < 0 && currentMove < forwardMostMove) { if(lastDir == 1) ForwardEvent(); else lastDir = 1; } // [HGM] suppress first event in direction /* Mouse Wheel is being rolled backward * Play moves backward */ - if((short)HIWORD(wParam) < 0 && currentMove > backwardMostMove) + if((short)HIWORD(wParam) > 0 && currentMove > backwardMostMove) { if(lastDir == -1) BackwardEvent(); else lastDir = -1; } } break; @@ -4549,7 +4548,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) TagsPopUp(tags, CmailMsg()); free(tags); } - SAY("programs start playing each other"); + SAY("computer starts playing both sides"); break; case IDM_AnalysisMode: @@ -4612,7 +4611,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case IDM_EditPosition: EditPositionEvent(); - SAY("to set up a position type a FEN"); + SAY("enter a FEN string or setup a position on the board using the control R pop up menu"); break; case IDM_Training: @@ -8170,6 +8169,7 @@ ResetFrontEnd() ReleaseCapture(); DrawPosition(TRUE, NULL); } + TagsPopDown(); }