| 570 | } |
| 571 | |
| 572 | void ThreadAdded(TextThread& thread) |
| 573 | { |
| 574 | std::wstring threadCode = HookCode::Generate(thread.hp, thread.tp.processId); |
| 575 | bool savedMatch = (savedThreadCtx & 0xFFFF) == (thread.tp.ctx & 0xFFFF) && savedThreadCtx2 == thread.tp.ctx2 && savedThreadCode == threadCode; |
| 576 | if (savedMatch) |
| 577 | { |
| 578 | savedThreadCtx = savedThreadCtx2 = savedThreadCode[0] = 0; |
| 579 | current = &thread; |
| 580 | } |
| 581 | QMetaObject::invokeMethod(This, [savedMatch, ttString = TextThreadString(thread) + S(FormatString(L" (%s)", threadCode))] |
| 582 | { |
| 583 | ui.ttCombo->addItem(ttString); |
| 584 | if (savedMatch) ViewThread(ui.ttCombo->count() - 1); |
| 585 | }); |
| 586 | } |
| 587 | |
| 588 | void ThreadRemoved(TextThread& thread) |
| 589 | { |
nothing calls this directly
no test coverage detected