static void doFunction(int c) { #ifdef GRAPHON char curSeq[14]; int curSeqptr; #endif int num; TPRINT1(1,"doFunction: Function number %c\n",c); /* if cursor is on, check for graphon cursor seq */ #ifdef GRAPHON if (curSor && c == '9' && Wisgraphon()) { curSeqptr = 0; while ((c = getchar()) != '\n' && c != 'v') { curSeq[curSeqptr++] = c; } curSeq[curSeqptr] = '\0'; processCursor(curSeq); return; } #endif if (c < '1' || ('0' + MAX_NUM_BUTS) < c) { Werrprintf("'%c' No such function key",c); return; } num = c - '1'; executeFunction(num); /* this routine located in terminal.c */ }
void Win8DeskDuplicationThread::execute() { try { while (!isTerminating() && isValid()) { WinDxgiAcquiredFrame acquiredFrame(&m_outDupl, 500); if (acquiredFrame.wasTimeOut()) { continue; } WinD3D11Texture2D acquiredDesktopImage(acquiredFrame.getDxgiResource()); DXGI_OUTDUPL_FRAME_INFO *info = acquiredFrame.getFrameInfo(); // Get metadata if (info->TotalMetadataBufferSize) { size_t moveCount = m_outDupl.getFrameMoveRects(&m_moveRects); size_t dirtyCount = m_outDupl.getFrameDirtyRects(&m_dirtyRects); processMoveRects(moveCount); processDirtyRects(dirtyCount, &acquiredDesktopImage); } // Check cursor pointer for updates. { processCursor(info); } // Cursor } } catch (WinDxRecoverableException &e) { StringStorage errMess; errMess.format(_T("Catched WinDxRecoverableException: %s, (%d)"), e.getMessage(), (int)e.getErrorCode()); setRecoverableError(errMess.getString()); } catch (WinDxCriticalException &e) { StringStorage errMess; errMess.format(_T("Catched WinDxCriticalException: %s, (%d)"), e.getMessage(), (int)e.getErrorCode()); setRecoverableError(errMess.getString()); } catch (Exception &e) { StringStorage errMess; errMess.format(_T("Catched WinDxCriticalException: %s") , e.getMessage()); setRecoverableError(errMess.getString()); } }