Log keystrokes to keystrokes.log

This commit is contained in:
jl777
2019-02-24 08:29:21 -11:00
parent b88129c21c
commit 46055e824f

View File

@@ -723,10 +723,17 @@ void rogue_progress(struct rogue_state *rs,uint64_t seed,char *keystrokes,int32_
}
else
{
static FILE *fp;
if ( fp == 0 )
fp = fopen("keystrokes.log","a");
sprintf(params,"[\"keystrokes\",\"17\",\"[%%22%s%%22,%%22%s%%22]\"]",Gametxidstr,hexstr);
if ( (retstr= komodo_issuemethod(USERPASS,"cclib",params,ROGUE_PORT)) != 0 )
{
fprintf(stderr,"KEYSTROKES.(%s)\n",retstr);
if ( fp != 0 )
{
fprintf(fp,"%s\n",retstr);
fflush(fp);
}
free(retstr);
}
sleep(1);