Ignore:
Timestamp:
Jan 29, 2000, 3:22:13 PM (26 years ago)
Author:
sandervl
Message:

Save and restore FPU control word when calling Open32's DrawText

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/text.cpp

    r2221 r2558  
    1 /* $Id: text.cpp,v 1.6 1999-12-27 22:52:39 cbratschi Exp $ */
     1/* $Id: text.cpp,v 1.7 2000-01-29 14:22:13 sandervl Exp $ */
    22
    33/*
     
    1616#include <misc.h>
    1717#include <string.h>
     18#include <float.h>
    1819#include "oslibgpi.h"
    1920
     
    406407  return rc;
    407408*/
    408 
     409  UINT fpuctrlword;
     410  INT rc;
     411
     412  //SvL: Open32's DrawText messes up the fpu control word! (@#$@#$@#$)
     413  fpuctrlword = _control87(0, 0);
    409414  dwDTFormat &= ~(DT_END_ELLIPSIS | DT_PATH_ELLIPSIS);
    410   return O32_DrawText(hdc,lpchText,cchText,lprc,dwDTFormat);
     415
     416  rc = O32_DrawText(hdc,lpchText,cchText,lprc,dwDTFormat);
     417  _control87(fpuctrlword, 0xFFFF);
     418  return rc;
    411419}
    412420//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.