[SOLITAIRE]

solitaire: no action upon doubleclick
Patch by Carlo Bramini.
CORE-6514 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=70470
This commit is contained in:
Eric Kohl 2015-12-31 12:58:18 +00:00
parent c91100685b
commit 7655453180
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ extern TCHAR MsgDeal[128];
CardStack activepile;
int LastId;
bool fGameStarted = false;
bool bAutoroute = false;
void NewGame(void)
{
@ -233,7 +234,7 @@ bool CARDLIBPROC SuitStackDropProc(CardRegion &stackobj, CardStack &dragcards)
SetPlayTimer();
//only drop 1 card at a time
if(dragcards.NumCards() != 1)
if (!bAutoroute && dragcards.NumCards() != 1)
{
TRACE("EXIT SuitStackDropProc()\n");
return false;
@ -415,7 +416,9 @@ void CARDLIBPROC RowStackDblClickProc(CardRegion &stackobj, int iNumClicked)
//stackobj.MoveCards(pDest, 1, true);
//use the SimulateDrag funcion, because we get the
//AddProc callbacks called for us on the destination stacks...
bAutoroute = true;
stackobj.SimulateDrag(pDest, 1, true);
bAutoroute = false;
}
TRACE("EXIT RowStackDblClickProc()\n");
}

View File

@ -243,6 +243,8 @@ int WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int iCm
NULL, // use window class menu
hInst, // program instance handle
NULL); // creation parameters
if (hwnd == NULL)
return 1;
hwndMain = hwnd;