fix for an un-threadsafe call to UpdateGUI (oops)

This commit is contained in:
nitsuja 2011-12-18 20:38:54 -08:00
parent 4a88d5ae93
commit 567e90bbd5
1 changed files with 5 additions and 1 deletions

View File

@ -863,8 +863,12 @@ int GetCmdForHotkey(unsigned int key)
void OnAfterLoadCallback() void OnAfterLoadCallback()
{ {
// warning: this gets called from the CPU thread, so we should only queue things to do on the proper thread
if(main_frame) if(main_frame)
main_frame->UpdateGUI(); {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEGUI);
main_frame->GetEventHandler()->AddPendingEvent(event);
}
} }
void TASManipFunction(SPADStatus *PadStatus, int controllerID) void TASManipFunction(SPADStatus *PadStatus, int controllerID)