Ignore:
Timestamp:
Oct 17, 2000, 12:26:53 AM (25 years ago)
Author:
sandervl
Message:

fs fixes for font & line callbacks

File:
1 edited

Legend:

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

    r4352 r4492  
    1 /* $Id: font.cpp,v 1.13 2000-10-01 12:06:32 sandervl Exp $ */
     1/* $Id: font.cpp,v 1.14 2000-10-16 22:26:53 sandervl Exp $ */
    22
    33/*
     
    3131#include <heapstring.h>
    3232#include <win\options.h>
     33#include <wprocess.h>
    3334
    3435#define DBG_LOCALLOG    DBG_font
     
    271272 ENUMUSERDATA *lpEnumData = (ENUMUSERDATA *)arg4;
    272273 FONTENUMPROCA proc = (FONTENUMPROCA)lpEnumData->userProc;
    273 
    274   return proc(lpLogFont, lpTextM, arg3, lpEnumData->userData);
     274 USHORT selTIB = SetWin32TIB(); // save current FS selector and set win32 sel
     275
     276  int rc = proc(lpLogFont, lpTextM, arg3, lpEnumData->userData);
     277  SetFS(selTIB);           // switch back to the saved FS selector
     278  return rc;
    275279}
    276280//******************************************************************************
     
    283287 ENUMLOGFONTW LogFont;
    284288 NEWTEXTMETRICW textM;
     289 USHORT selTIB = SetWin32TIB(); // save current FS selector and set win32 sel
    285290 int rc;
    286291
     
    316321  textM.ntmAvgWidth = 0;
    317322
    318   return proc(&LogFont, &textM, arg3, lpEnumData->userData);
     323  rc = proc(&LogFont, &textM, arg3, lpEnumData->userData);
     324  SetFS(selTIB);           // switch back to the saved FS selector
     325  return rc;
    319326}
    320327//******************************************************************************
     
    328335 ENUMLOGFONTEXA logFont;
    329336 NEWTEXTMETRICEXA textM;
     337 USHORT selTIB = SetWin32TIB(); // save current FS selector and set win32 sel
    330338
    331339  memcpy(&logFont, lpLogFont, sizeof(ENUMLOGFONTA));
     
    335343
    336344  dprintf(("EnumFontProcExA %s", logFont.elfLogFont.lfFaceName));
    337   return proc(&logFont, &textM, arg3, lpEnumData->userData);
     345
     346  int rc = proc(&logFont, &textM, arg3, lpEnumData->userData);
     347  SetFS(selTIB);           // switch back to the saved FS selector
     348  return rc;
    338349}
    339350//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.