src/thread/windows/SDL_systhread.c
changeset 5970 34263edce4f4
parent 5969 3a041d215edc
child 5971 ca2d4b8e9e40
equal deleted inserted replaced
5969:3a041d215edc 5970:34263edce4f4
   162 SDL_SYS_SetupThread(const char *name)
   162 SDL_SYS_SetupThread(const char *name)
   163 {
   163 {
   164 #ifdef _MSC_VER  /* !!! FIXME: can we do SEH on other compilers yet? */
   164 #ifdef _MSC_VER  /* !!! FIXME: can we do SEH on other compilers yet? */
   165     /* This magic tells the debugger to name a thread if it's listening. */
   165     /* This magic tells the debugger to name a thread if it's listening. */
   166     THREADNAME_INFO inf;
   166     THREADNAME_INFO inf;
   167     info.dwType = 0x1000;
   167     inf.dwType = 0x1000;
   168     info.szName = name;
   168     inf.szName = name;
   169     info.dwThreadID = (DWORD) -1;
   169     inf.dwThreadID = (DWORD) -1;
   170     info.dwFlags = 0;
   170     inf.dwFlags = 0;
   171 
   171 
   172     __try
   172     __try
   173     {
   173     {
   174         RaiseException(0x406D1388, 0, sizeof(inf)/sizeof(DWORD), (DWORD*)&inf);
   174         RaiseException(0x406D1388, 0, sizeof(inf)/sizeof(DWORD), (DWORD*)&inf);
   175     }
   175     }