report.AppendFormat("Rewind       : %d\r\n", rewindTimer);
void helpBugReport(){  OpenClipboard(hWindow);  EmptyClipboard();  CStdString report = "";  report.AppendFormat("Emu version  : %s\r\n", VERSION);  if(emulating) {    report.AppendFormat("File         : %s\r\n", szFile);    char buffer[20];    if(cartridgeType == 0) {      u32 check = 0;      for(int i = 0; i < 0x4000; i += 4) {        check += *((u32 *)&bios[i]);      }      report.AppendFormat("BIOS Checksum: %08X\r\n", check);      strncpy(buffer, (const char *)&rom[0xa0], 12);      buffer[12] = 0;      report.AppendFormat("Internal name: %s\r\n", buffer);            strncpy(buffer, (const char *)&rom[0xac], 4);      buffer[4] = 0;      report.AppendFormat("Game code    : %s\r\n", buffer);    } else if(cartridgeType == 1) {      strncpy(buffer, (const char *)&gbRom[0x134], 15);      buffer[15] = 0;      report.AppendFormat("Game title   : %s\r\n", buffer);    }  }    report.AppendFormat("Using BIOS   : %d\r\n", useBiosFile);  report.AppendFormat("Skip BIOS    : %d\r\n", skipBiosFile);  report.AppendFormat("Disable SFX  : %d\r\n", cpuDisableSfx);  report.AppendFormat("Skip intro   : %d\r\n", removeIntros);  report.AppendFormat("Throttle     : %d\r\n", throttle);  report.AppendFormat("Auto frame   : %d\r\n", autoFrameSkip);  report.AppendFormat("Video option : %d\r\n", videoOption);  report.AppendFormat("Render type  : %d\r\n", renderMethod);  report.AppendFormat("Layer setting: %04X\r\n", layerSettings);  report.AppendFormat("Save type    : %d (%d)\r\n",                       winSaveType, cpuSaveType);  report.AppendFormat("Flash size   : %08X (%08x)\r\n",                       winFlashSize, flashSize);  report.AppendFormat("RTC          : %d (%d)\r\n", winRtcEnable,                      rtcIsEnabled());  report.AppendFormat("Enhanced Det.: %d\r\n", cpuEnhancedDetection);  report.AppendFormat("AGBPrint     : %d\r\n", agbPrintIsEnabled());  report.AppendFormat("Speed toggle : %d\r\n", speedupToggle);  report.AppendFormat("Synchronize  : %d\r\n", synchronize);  report.AppendFormat("Sound OFF    : %d\r\n", soundOffFlag);  report.AppendFormat("Channels     : %04x\r\n", soundGetEnable() & 0x30f);  report.AppendFormat("Old Sync     : %d\r\n", useOldSync);  report.AppendFormat("Priority     : %d\r\n", threadPriority);  report.AppendFormat("Filters      : %d (%d)\r\n", filterType, ifbType);  report.AppendFormat("Cheats       : %d\r\n", cheatsNumber);  report.AppendFormat("GB Cheats    : %d\r\n", gbCheatNumber);  report.AppendFormat("GB Emu Type  : %d\r\n", gbEmulatorType);  HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE,                                  (report.GetLength() + 1) * sizeof(CHAR));   if (hglbCopy == NULL) {     CloseClipboard();     return;  }    // Lock the handle and copy the text to the buffer.    LPSTR lptstrCopy = (LPSTR)GlobalLock(hglbCopy);   memcpy(lptstrCopy, (const char *)report,          report.GetLength() * sizeof(CHAR));   lptstrCopy[report.GetLength()] = (TCHAR) 0;    // null character   GlobalUnlock(hglbCopy);    // Place the handle on the clipboard.     SetClipboardData(CF_TEXT, hglbCopy);     CloseClipboard();  systemMessage(IDS_BUG_REPORT, "Bug report has been copied to the Clipboard");}