X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwengineoutput.c;h=b9d13f59a051c6d42497377d9fadce54eae6d0eb;hb=HEAD;hp=301d4f6ed95aae4169bacbedb4561392c39a5f6c;hpb=272e35c7f6874eae7f6f5487ad427a57212b9eca;p=xboard.git diff --git a/winboard/wengineoutput.c b/winboard/wengineoutput.c index 301d4f6..b9d13f5 100644 --- a/winboard/wengineoutput.c +++ b/winboard/wengineoutput.c @@ -5,6 +5,9 @@ * * Copyright 2005 Alessandro Scotti * + * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, + * 2016 Free Software Foundation, Inc. + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -223,7 +226,8 @@ void ResizeWindowControls( int mode ) InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo2), NULL, FALSE ); } -static int currentPV, highTextStart[2], highTextEnd[2]; +static int currentPV; +int highTextStart[2], highTextEnd[2]; extern RECT boardRect; VOID @@ -237,7 +241,7 @@ GetMemoLine(HWND hDlg, int x, int y) memo = currentPV ? IDC_EngineMemo2 : IDC_EngineMemo1; index = SendDlgItemMessage( hDlg, memo, EM_CHARFROMPOS, 0, (LPARAM) &pt ); GetDlgItemText(hDlg, memo, buf, sizeof(buf)); - if(LoadMultiPV(x, y, buf, index, &start, &end)) { + if(LoadMultiPV(x, y, buf, index, &start, &end, currentPV)) { SetCapture(hDlg); SendMessage( outputField[currentPV][nMemo], EM_SETSEL, (WPARAM)start, (LPARAM)end ); highTextStart[currentPV] = start; highTextEnd[currentPV] = end; @@ -274,6 +278,11 @@ void DoSetWindowText(int which, int field, char *s_label) SetWindowText( outputField[which][field], s_label ); } +void SetEngineOutputTitle(char *title) +{ + SetWindowText( engineOutputDialog, title ); +} + // This seems pure front end LRESULT CALLBACK EngineOutputProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) {