Ignore:
Timestamp:
Jul 28, 2001, 3:43:54 PM (24 years ago)
Author:
sandervl
Message:

rewrote some functions

File:
1 edited

Legend:

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

    r5751 r6395  
    1 /* $Id: winmouse.cpp,v 1.15 2001-05-19 11:16:02 sandervl Exp $ */
     1/* $Id: winmouse.cpp,v 1.16 2001-07-28 13:43:54 sandervl Exp $ */
    22/*
    33 * Mouse handler for DINPUT
    44 *
    5  * Copyright 1999 Sander van Leeuwen
    6  *
     5 * Copyright 1999-2001 Sander van Leeuwen
     6 *
     7 * TODO: SwapMouseButton:
     8 *       We shouldn't let win32 apps change this for the whole system
     9 *       better to change mouse button message translation instead
    710 *
    811 * Project Odin Software License can be found in LICENSE.TXT
     
    160163{
    161164    dprintf(("USER32: GetDoubleClickTime"));
    162     return O32_GetDoubleClickTime();
    163 }
    164 //******************************************************************************
    165 //******************************************************************************
    166 BOOL WIN32API SetDoubleClickTime( UINT uInterval)
    167 {
     165    UINT result = OSLibWinQuerySysValue(SVOS_DBLCLKTIME);
     166    if(result == 0)
     167        SetLastError(ERROR_INVALID_PARAMETER); //TODO: ????
     168
     169    return result;
     170}
     171//******************************************************************************
     172//******************************************************************************
     173BOOL WIN32API SetDoubleClickTime(UINT uInterval)
     174{
     175    BOOL ret = TRUE;
     176
    168177    dprintf(("USER32: SetDoubleClickTime %d", uInterval));
    169     return O32_SetDoubleClickTime(uInterval);
    170 }
    171 //******************************************************************************
    172 //******************************************************************************
    173 BOOL WIN32API SwapMouseButton( BOOL fSwap)
     178
     179    ret = OSLibWinSetSysValue(SVOS_DBLCLKTIME, uInterval);
     180    if(ret == FALSE )
     181    {
     182        SetLastError(ERROR_INVALID_PARAMETER); //TODO: ????
     183    }
     184    return (ret);
     185}
     186//******************************************************************************
     187//TODO: we shouldn't let win32 apps change this for the whole system
     188//      better to change mouse button message translation instead
     189BOOL OPEN32API __SwapMouseButton(BOOL swapFlag);
     190
     191inline BOOL _SwapMouseButton(BOOL swapFlag)
     192{
     193 BOOL yyrc;
     194 USHORT sel = RestoreOS2FS();
     195
     196    yyrc = __SwapMouseButton(swapFlag);
     197    SetFS(sel);
     198
     199    return yyrc;
     200}
     201
     202//******************************************************************************
     203BOOL WIN32API SwapMouseButton(BOOL fSwap)
    174204{
    175205    dprintf(("USER32: SwapMouseButton %d", fSwap));
    176     return O32_SwapMouseButton(fSwap);
     206    return _SwapMouseButton(fSwap);
    177207}
    178208/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.