Closed CasualPokePlayer closed 8 months ago
The
if (GlobalState::isNative())
return orig::pthread_create(tid_p, attr, start_routine, arg);
was introduced in 56220f4dede11aacec84a609d64f67752c4800ad for wine. I'm unsure if it wouldn't be better to remove it and capture even threads created from code flagged as Native, so that we can suspend them during savestates?
Your suggestion is more conservative though.
Also make sure ThreadInfo constructions use the correct constructor (new ThreadInfo is analogous to malloc while new ThreadInfo() is analogous to calloc; granted libtas overrides malloc to calloc so this probably doesn't matter in practice, but the compiler probably shouldn't be getting any funny ideas over UB here)