Ignore:
Timestamp:
Sep 16, 2008 5:02:48 PM (12 years ago)
Author:
nanang
Message:

Ticket #625: Fixed unicode build issues on Windows platforms (thanks David Parker for the patch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/dsound.c

    r2039 r2286  
    597597 
    598598/* DirectSound enum device callback */ 
    599 static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription,   
    600                                      LPCSTR lpcstrModule, LPVOID lpContext) 
     599static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCTSTR lpcstrDescription,   
     600                                     LPCTSTR lpcstrModule, LPVOID lpContext) 
    601601{ 
    602602    unsigned index, max = sizeof(dev_info[index].info.name); 
     
    627627    } 
    628628 
     629#ifdef UNICODE 
     630    WideCharToMultiByte(CP_ACP, 0, lpcstrDescription, wcslen(lpcstrDescription), dev_info[index].info.name, max, NULL, NULL); 
     631#else 
    629632    strncpy(dev_info[index].info.name, lpcstrDescription, max); 
     633#endif 
     634 
    630635    dev_info[index].info.name[max-1] = '\0'; 
    631636    if (lpGuid == NULL) { 
Note: See TracChangeset for help on using the changeset viewer.