them big_tasks.md (roadmap G0-G4, danh dau G1.1-G1.5 hoan thanh) + debug scripts/probes cua phien lam viec G0.1-G1.5 (test_g13/test_g12/test_g15_stress, patch_g1x, deploy/build bridge, probe_g0x)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import io
|
||||
p = r'C:\Users\locpham\SonicForgeStudio\native_bridge\src\gui_probe.cpp'
|
||||
s = io.open(p, encoding='utf-8', newline='').read()
|
||||
def crlf(x): return x.replace('\n', '\r\n')
|
||||
|
||||
old = crlf(''' MSG msg;
|
||||
while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
}
|
||||
Sleep(5);''')
|
||||
new = crlf(''' MSG msg;
|
||||
while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) {
|
||||
printf("[pump] msg=0x%X hwnd=%p\\n", (unsigned)msg.message, (void*)msg.hwnd);
|
||||
fflush(stdout);
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
}
|
||||
Sleep(5);''')
|
||||
n = s.count(old)
|
||||
print('pump_for match:', n)
|
||||
s = s.replace(old, new)
|
||||
|
||||
old2 = crlf(''' MSG msg;
|
||||
while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
}''')
|
||||
new2 = crlf(''' MSG msg;
|
||||
while (PeekMessageW(&msg, nullptr, 0, 0, PM_REMOVE)) {
|
||||
printf("[wpump] msg=0x%X hwnd=%p\\n", (unsigned)msg.message, (void*)msg.hwnd);
|
||||
fflush(stdout);
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
}''')
|
||||
n2 = s.count(old2)
|
||||
print('worker pump match:', n2)
|
||||
s = s.replace(old2, new2)
|
||||
|
||||
io.open(p, 'w', encoding='utf-8', newline='').write(s)
|
||||
print('written')
|
||||
Reference in New Issue
Block a user