Ignore:
Timestamp:
Sep 29, 2010, 12:46:01 AM (15 years ago)
Author:
dmik
Message:

Undo interpreting strings as ANSI for certain OSLib APIs modified in the previous commits as it breaks the common logic where many other OSLib calls (e.g. all dealig with file names) seem to expect the OEM (OS/2) encoding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibwin.cpp

    r21461 r21463  
    562562LONG OSLibWinQueryWindowText(HWND hwnd, LONG length, LPSTR lpsz)
    563563{
    564     LONG retLen = WinQueryWindowText(hwnd, length, lpsz);
    565     OemToCharBuffA(lpsz, lpsz, retLen);
    566     lpsz[retLen] = '\0';
    567     return retLen;
     564  return WinQueryWindowText(hwnd, length, lpsz);
    568565}
    569566//******************************************************************************
     
    571568BOOL OSLibWinSetWindowText(HWND hwnd, LPSTR lpsz)
    572569{
    573     PSZ psz = NULL;
    574     if(lpsz) {
    575         psz = (PSZ)_smalloc(strlen(lpsz) + 1);
    576         CharToOemA(lpsz, psz);
    577     }
    578     BOOL rc = WinSetWindowText(hwnd, psz);
    579     if (psz) {
    580         _sfree(psz);
    581     }
    582     return rc;
     570  return WinSetWindowText(hwnd, lpsz);
    583571}
    584572//******************************************************************************
     
    586574BOOL OSLibWinSetTitleBarText(HWND hwnd, LPSTR lpsz)
    587575{
    588     PSZ psz = NULL;
    589     if(lpsz) {
    590         psz = (PSZ)_smalloc(strlen(lpsz) + 1);
    591         CharToOemA(lpsz, psz);
    592     }
    593     BOOL rc = WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), psz);
    594     if (psz) {
    595         _sfree(psz);
    596     }
    597     return rc;
     576  return WinSetWindowText(WinWindowFromID(hwnd, FID_TITLEBAR), lpsz);
    598577}
    599578//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.