ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
554 discussions
Start a n
N
ew thread
[akhaldi] 60446: [DINPUT] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 29 12:16:54 2013 New Revision: 60446 URL:
http://svn.reactos.org/svn/reactos?rev=60446&view=rev
Log: [DINPUT] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/reactos/dll/directx/dinput/CMakeLists.txt trunk/reactos/dll/directx/dinput/device.c trunk/reactos/dll/directx/dinput/dinput_main.c trunk/reactos/dll/directx/dinput/dinput_private.h trunk/reactos/dll/directx/dinput/effect_linuxinput.c trunk/reactos/dll/directx/dinput/joystick.c trunk/reactos/dll/directx/dinput/joystick_linux.c trunk/reactos/dll/directx/dinput/joystick_linuxinput.c trunk/reactos/dll/directx/dinput/joystick_osx.c trunk/reactos/dll/directx/dinput/joystick_private.h trunk/reactos/dll/directx/dinput/keyboard.c trunk/reactos/dll/directx/dinput/mouse.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/directx/dinput/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/CMakeLi…
============================================================================== --- trunk/reactos/dll/directx/dinput/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/CMakeLists.txt [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -1,13 +1,9 @@ - -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(dinput.dll dinput.spec ADD_IMPORTLIB) -add_library(dinput SHARED +list(APPEND SOURCE config.c data_formats.c device.c @@ -19,12 +15,12 @@ joystick_osx.c keyboard.c mouse.c - dinput.rc ${CMAKE_CURRENT_BINARY_DIR}/dinput.def) +add_library(dinput SHARED ${SOURCE} dinput.rc) add_library(dinput_data_formats data_formats.c) add_dependencies(dinput_data_formats psdk) -set_module_type(dinput win32dll UNICODE) +set_module_type(dinput win32dll) target_link_libraries(dinput dxguid uuid wine) add_importlibs(dinput comctl32 ole32 user32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET dinput DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/directx/dinput/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/device.…
============================================================================== --- trunk/reactos/dll/directx/dinput/device.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/device.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -145,13 +145,13 @@ } void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) { - TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n", - debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName); + TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s - 0x%x\n", + debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName, ddoi->dwFlags); } void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) { - TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n", - debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName)); + TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s - 0x%x\n", + debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName), ddoi->dwFlags); } /* This function is a helper to convert a GUID into any possible DInput GUID out there */ Modified: trunk/reactos/dll/directx/dinput/dinput_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/dinput_…
============================================================================== --- trunk/reactos/dll/directx/dinput/dinput_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/dinput_main.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -375,17 +375,17 @@ for (i = 0; i < NB_DINPUT_DEVICES; i++) { if (!dinput_devices[i]->enum_deviceA) continue; - for (j = 0, r = -1; r != 0; j++) { - devInstance.dwSize = sizeof(devInstance); - TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); - if ((r = dinput_devices[i]->enum_deviceA(dwDevType, dwFlags, &devInstance, This->dwVersion, j))) { - if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) - return 0; - } - } - } - - return 0; + for (j = 0, r = S_OK; SUCCEEDED(r); j++) { + devInstance.dwSize = sizeof(devInstance); + TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); + r = dinput_devices[i]->enum_deviceA(dwDevType, dwFlags, &devInstance, This->dwVersion, j); + if (r == S_OK) + if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) + return S_OK; + } + } + + return S_OK; } /****************************************************************************** * IDirectInputW_EnumDevices @@ -397,7 +397,8 @@ IDirectInputImpl *This = impl_from_IDirectInput7W( iface ); DIDEVICEINSTANCEW devInstance; unsigned int i; - int j, r; + int j; + HRESULT r; TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), @@ -414,17 +415,17 @@ for (i = 0; i < NB_DINPUT_DEVICES; i++) { if (!dinput_devices[i]->enum_deviceW) continue; - for (j = 0, r = -1; r != 0; j++) { - devInstance.dwSize = sizeof(devInstance); - TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); - if ((r = dinput_devices[i]->enum_deviceW(dwDevType, dwFlags, &devInstance, This->dwVersion, j))) { - if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) - return 0; - } - } - } - - return 0; + for (j = 0, r = S_OK; SUCCEEDED(r); j++) { + devInstance.dwSize = sizeof(devInstance); + TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); + r = dinput_devices[i]->enum_deviceW(dwDevType, dwFlags, &devInstance, This->dwVersion, j); + if (r == S_OK) + if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) + return S_OK; + } + } + + return S_OK; } static ULONG WINAPI IDirectInputAImpl_AddRef(LPDIRECTINPUT7A iface) @@ -913,18 +914,18 @@ /* Enumerate all the joysticks */ for (i = 0; i < NB_DINPUT_DEVICES; i++) { - BOOL enumSuccess; + HRESULT enumSuccess; if (!dinput_devices[i]->enum_deviceA) continue; - for (j = 0, enumSuccess = -1; enumSuccess != 0; j++) + for (j = 0, enumSuccess = S_OK; SUCCEEDED(enumSuccess); j++) { TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); callbackFlags = diactionformat_priorityA(lpdiActionFormat, lpdiActionFormat->dwGenre); /* Default behavior is to enumerate attached game controllers */ enumSuccess = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, j); - if (enumSuccess) + if (enumSuccess == S_OK) { IDirectInput_CreateDevice(iface, &didevi.guidInstance, &lpdid, NULL); @@ -973,18 +974,18 @@ /* Enumerate all the joysticks */ for (i = 0; i < NB_DINPUT_DEVICES; i++) { - BOOL enumSuccess; + HRESULT enumSuccess; if (!dinput_devices[i]->enum_deviceW) continue; - for (j = 0, enumSuccess = -1; enumSuccess != 0; j++) + for (j = 0, enumSuccess = S_OK; SUCCEEDED(enumSuccess); j++) { TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); callbackFlags = diactionformat_priorityW(lpdiActionFormat, lpdiActionFormat->dwGenre); /* Default behavior is to enumerate attached game controllers */ enumSuccess = dinput_devices[i]->enum_deviceW(DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, j); - if (enumSuccess) + if (enumSuccess == S_OK) { IDirectInput_CreateDevice(iface, &didevi.guidInstance, &lpdid, NULL); @@ -1152,7 +1153,8 @@ { IDirectInputImpl *di = impl_from_IDirectInputJoyConfig8(iface); UINT found = 0; - int i, j, r; + int i, j; + HRESULT r; FIXME("(%p)->(%d, %p, 0x%08x): semi-stub!\n", iface, id, info, flags); @@ -1168,11 +1170,11 @@ { if (!dinput_devices[i]->enum_deviceA) continue; - for (j = 0, r = -1; r != 0; j++) + for (j = 0, r = S_OK; SUCCEEDED(r); j++) { DIDEVICEINSTANCEA dev; dev.dwSize = sizeof(dev); - if ((r = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, 0, &dev, di->dwVersion, j))) + if ((r = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, 0, &dev, di->dwVersion, j)) == S_OK) { /* Only take into account the chosen id */ if (found == id) @@ -1639,7 +1641,7 @@ LeaveCriticalSection(&dinput_hook_crit); } -BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved) { switch(reason) { @@ -1648,6 +1650,7 @@ DINPUT_instance = inst; break; case DLL_PROCESS_DETACH: + if (reserved) break; DeleteCriticalSection(&dinput_hook_crit); break; } Modified: trunk/reactos/dll/directx/dinput/dinput_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/dinput_…
============================================================================== --- trunk/reactos/dll/directx/dinput/dinput_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/dinput_private.h [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -55,8 +55,8 @@ /* Function called by all devices that Wine supports */ struct dinput_device { const char *name; - BOOL (*enum_deviceA)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id); - BOOL (*enum_deviceW)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id); + HRESULT (*enum_deviceA)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id); + HRESULT (*enum_deviceW)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id); HRESULT (*create_device)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPVOID *pdev, int unicode); }; Modified: trunk/reactos/dll/directx/dinput/effect_linuxinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/effect_…
============================================================================== --- trunk/reactos/dll/directx/dinput/effect_linuxinput.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/effect_linuxinput.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -43,6 +43,7 @@ #include "dinput.h" #include "device_private.h" +#include "joystick_private.h" WINE_DEFAULT_DEBUG_CHANNEL(dinput); @@ -65,194 +66,6 @@ { return CONTAINING_RECORD(iface, LinuxInputEffectImpl, IDirectInputEffect_iface); } - -/****************************************************************************** - * DirectInputEffect Functional Helper - */ - -static DWORD _typeFromGUID(REFGUID guid) -{ - if (IsEqualGUID(guid, &GUID_ConstantForce)) { - return DIEFT_CONSTANTFORCE; - } else if (IsEqualGUID(guid, &GUID_Square) - || IsEqualGUID(guid, &GUID_Sine) - || IsEqualGUID(guid, &GUID_Triangle) - || IsEqualGUID(guid, &GUID_SawtoothUp) - || IsEqualGUID(guid, &GUID_SawtoothDown)) { - return DIEFT_PERIODIC; - } else if (IsEqualGUID(guid, &GUID_RampForce)) { - return DIEFT_RAMPFORCE; - } else if (IsEqualGUID(guid, &GUID_Spring) - || IsEqualGUID(guid, &GUID_Damper) - || IsEqualGUID(guid, &GUID_Inertia) - || IsEqualGUID(guid, &GUID_Friction)) { - return DIEFT_CONDITION; - } else if (IsEqualGUID(guid, &GUID_CustomForce)) { - return DIEFT_CUSTOMFORCE; - } else { - WARN("GUID (%s) is not a known force type\n", _dump_dinput_GUID(guid)); - return 0; - } -} - - -/****************************************************************************** - * DirectInputEffect debug helpers - */ - -static void _dump_DIEFFECT_flags(DWORD dwFlags) -{ - if (TRACE_ON(dinput)) { - unsigned int i; - static const struct { - DWORD mask; - const char *name; - } flags[] = { -#define FE(x) { x, #x} - FE(DIEFF_CARTESIAN), - FE(DIEFF_OBJECTIDS), - FE(DIEFF_OBJECTOFFSETS), - FE(DIEFF_POLAR), - FE(DIEFF_SPHERICAL) -#undef FE - }; - for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) - if (flags[i].mask & dwFlags) - TRACE("%s ", flags[i].name); - TRACE("\n"); - } -} - -static void _dump_DIENVELOPE(LPCDIENVELOPE env) -{ - if (env->dwSize != sizeof(DIENVELOPE)) { - WARN("Non-standard DIENVELOPE structure size %d.\n", env->dwSize); - } - TRACE("Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n", - env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime); -} - -static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc) -{ - TRACE("Constant force has magnitude %d\n", frc->lMagnitude); -} - -static void _dump_DIPERIODIC(LPCDIPERIODIC frc) -{ - TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n", - frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod); -} - -static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc) -{ - TRACE("Ramp force has start %d, end %d\n", - frc->lStart, frc->lEnd); -} - -static void _dump_DICONDITION(LPCDICONDITION frc) -{ - TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n", - frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient, - frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand); -} - -static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc) -{ - unsigned int i; - TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n", - frc->cChannels, frc->dwSamplePeriod, frc->cSamples, frc->rglForceData); - if (frc->cSamples % frc->cChannels != 0) - WARN("Custom force has a non-integral samples-per-channel count!\n"); - if (TRACE_ON(dinput)) { - TRACE("Custom force data (time aligned, axes in order):\n"); - for (i = 1; i <= frc->cSamples; ++i) { - TRACE("%d ", frc->rglForceData[i]); - if (i % frc->cChannels == 0) - TRACE("\n"); - } - } -} - -static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) -{ - unsigned int i; - DWORD type = _typeFromGUID(guid); - - TRACE("Dumping DIEFFECT structure:\n"); - TRACE(" - dwSize: %d\n", eff->dwSize); - if ((eff->dwSize != sizeof(DIEFFECT)) && (eff->dwSize != sizeof(DIEFFECT_DX5))) { - WARN("Non-standard DIEFFECT structure size %d\n", eff->dwSize); - } - TRACE(" - dwFlags: %d\n", eff->dwFlags); - TRACE(" "); - _dump_DIEFFECT_flags(eff->dwFlags); - TRACE(" - dwDuration: %d\n", eff->dwDuration); - TRACE(" - dwGain: %d\n", eff->dwGain); - - if (eff->dwGain > 10000) - WARN("dwGain is out of range (>10,000)\n"); - - TRACE(" - dwTriggerButton: %d\n", eff->dwTriggerButton); - TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval); - TRACE(" - rglDirection: %p\n", eff->rglDirection); - TRACE(" - cbTypeSpecificParams: %d\n", eff->cbTypeSpecificParams); - TRACE(" - lpvTypeSpecificParams: %p\n", eff->lpvTypeSpecificParams); - - /* Only trace some members if dwFlags indicates they have data */ - if (dwFlags & DIEP_AXES) { - TRACE(" - cAxes: %d\n", eff->cAxes); - TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes); - - if (TRACE_ON(dinput) && eff->rgdwAxes) { - TRACE(" "); - for (i = 0; i < eff->cAxes; ++i) - TRACE("%d ", eff->rgdwAxes[i]); - TRACE("\n"); - } - } - - if (dwFlags & DIEP_ENVELOPE) { - TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope); - if (eff->lpEnvelope != NULL) - _dump_DIENVELOPE(eff->lpEnvelope); - } - - if (eff->dwSize > sizeof(DIEFFECT_DX5)) - TRACE(" - dwStartDelay: %d\n", eff->dwStartDelay); - - if (type == DIEFT_CONSTANTFORCE) { - if (eff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) { - WARN("Effect claims to be a constant force but the type-specific params are the wrong size!\n"); - } else { - _dump_DICONSTANTFORCE(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_PERIODIC) { - if (eff->cbTypeSpecificParams != sizeof(DIPERIODIC)) { - WARN("Effect claims to be a periodic force but the type-specific params are the wrong size!\n"); - } else { - _dump_DIPERIODIC(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_RAMPFORCE) { - if (eff->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) { - WARN("Effect claims to be a ramp force but the type-specific params are the wrong size!\n"); - } else { - _dump_DIRAMPFORCE(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_CONDITION) { - if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) { - WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n"); - } else { - _dump_DICONDITION(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_CUSTOMFORCE) { - if (eff->cbTypeSpecificParams != sizeof(DICUSTOMFORCE)) { - WARN("Effect claims to be a custom force but the type-specific params are the wrong size!\n"); - } else { - _dump_DICUSTOMFORCE(eff->lpvTypeSpecificParams); - } - } -} - /****************************************************************************** * LinuxInputEffectImpl @@ -546,12 +359,12 @@ DWORD dwFlags) { LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface); - DWORD type = _typeFromGUID(&This->guid); + DWORD type = typeFromGUID(&This->guid); HRESULT retval = DI_OK; TRACE("(this=%p,%p,%d)\n", This, peff, dwFlags); - _dump_DIEFFECT(peff, &This->guid, dwFlags); + dump_DIEFFECT(peff, &This->guid, dwFlags); if ((dwFlags & ~DIEP_NORESTART & ~DIEP_NODOWNLOAD & ~DIEP_START) == 0) { /* set everything */ @@ -800,7 +613,7 @@ { LinuxInputEffectImpl* newEffect = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LinuxInputEffectImpl)); - DWORD type = _typeFromGUID(rguid); + DWORD type = typeFromGUID(rguid); newEffect->IDirectInputEffect_iface.lpVtbl = &LinuxInputEffectVtbl; newEffect->ref = 1; @@ -869,7 +682,7 @@ REFGUID rguid, LPDIEFFECTINFOA info) { - DWORD type = _typeFromGUID(rguid); + DWORD type = typeFromGUID(rguid); TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type); @@ -903,7 +716,7 @@ REFGUID rguid, LPDIEFFECTINFOW info) { - DWORD type = _typeFromGUID(rguid); + DWORD type = typeFromGUID(rguid); TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type); Modified: trunk/reactos/dll/directx/dinput/joystick.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/joystic…
============================================================================== --- trunk/reactos/dll/directx/dinput/joystick.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/joystick.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -49,6 +49,184 @@ return &This->base.IDirectInputDevice8W_iface; } +DWORD typeFromGUID(REFGUID guid) +{ + if (IsEqualGUID(guid, &GUID_ConstantForce)) { + return DIEFT_CONSTANTFORCE; + } else if (IsEqualGUID(guid, &GUID_Square) + || IsEqualGUID(guid, &GUID_Sine) + || IsEqualGUID(guid, &GUID_Triangle) + || IsEqualGUID(guid, &GUID_SawtoothUp) + || IsEqualGUID(guid, &GUID_SawtoothDown)) { + return DIEFT_PERIODIC; + } else if (IsEqualGUID(guid, &GUID_RampForce)) { + return DIEFT_RAMPFORCE; + } else if (IsEqualGUID(guid, &GUID_Spring) + || IsEqualGUID(guid, &GUID_Damper) + || IsEqualGUID(guid, &GUID_Inertia) + || IsEqualGUID(guid, &GUID_Friction)) { + return DIEFT_CONDITION; + } else if (IsEqualGUID(guid, &GUID_CustomForce)) { + return DIEFT_CUSTOMFORCE; + } else { + WARN("GUID (%s) is not a known force type\n", _dump_dinput_GUID(guid)); + return 0; + } +} + +static void _dump_DIEFFECT_flags(DWORD dwFlags) +{ + if (TRACE_ON(dinput)) { + unsigned int i; + static const struct { + DWORD mask; + const char *name; + } flags[] = { +#define FE(x) { x, #x} + FE(DIEFF_CARTESIAN), + FE(DIEFF_OBJECTIDS), + FE(DIEFF_OBJECTOFFSETS), + FE(DIEFF_POLAR), + FE(DIEFF_SPHERICAL) +#undef FE + }; + for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) + if (flags[i].mask & dwFlags) + TRACE("%s ", flags[i].name); + TRACE("\n"); + } +} + +static void _dump_DIENVELOPE(LPCDIENVELOPE env) +{ + if (env->dwSize != sizeof(DIENVELOPE)) { + WARN("Non-standard DIENVELOPE structure size %d.\n", env->dwSize); + } + TRACE("Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n", + env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime); +} + +static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc) +{ + TRACE("Constant force has magnitude %d\n", frc->lMagnitude); +} + +static void _dump_DIPERIODIC(LPCDIPERIODIC frc) +{ + TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n", + frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod); +} + +static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc) +{ + TRACE("Ramp force has start %d, end %d\n", + frc->lStart, frc->lEnd); +} + +static void _dump_DICONDITION(LPCDICONDITION frc) +{ + TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n", + frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient, + frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand); +} + +static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc) +{ + unsigned int i; + TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n", + frc->cChannels, frc->dwSamplePeriod, frc->cSamples, frc->rglForceData); + if (frc->cSamples % frc->cChannels != 0) + WARN("Custom force has a non-integral samples-per-channel count!\n"); + if (TRACE_ON(dinput)) { + TRACE("Custom force data (time aligned, axes in order):\n"); + for (i = 1; i <= frc->cSamples; ++i) { + TRACE("%d ", frc->rglForceData[i]); + if (i % frc->cChannels == 0) + TRACE("\n"); + } + } +} + +void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) +{ + DWORD type = typeFromGUID(guid); + unsigned int i; + + TRACE("Dumping DIEFFECT structure:\n"); + TRACE(" - dwSize: %d\n", eff->dwSize); + if ((eff->dwSize != sizeof(DIEFFECT)) && (eff->dwSize != sizeof(DIEFFECT_DX5))) { + WARN("Non-standard DIEFFECT structure size %d\n", eff->dwSize); + } + TRACE(" - dwFlags: %d\n", eff->dwFlags); + TRACE(" "); + _dump_DIEFFECT_flags(eff->dwFlags); + TRACE(" - dwDuration: %d\n", eff->dwDuration); + TRACE(" - dwGain: %d\n", eff->dwGain); + + if (eff->dwGain > 10000) + WARN("dwGain is out of range (>10,000)\n"); + + TRACE(" - dwTriggerButton: %d\n", eff->dwTriggerButton); + TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval); + TRACE(" - rglDirection: %p\n", eff->rglDirection); + TRACE(" - cbTypeSpecificParams: %d\n", eff->cbTypeSpecificParams); + TRACE(" - lpvTypeSpecificParams: %p\n", eff->lpvTypeSpecificParams); + + /* Only trace some members if dwFlags indicates they have data */ + if (dwFlags & DIEP_AXES) { + TRACE(" - cAxes: %d\n", eff->cAxes); + TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes); + + if (TRACE_ON(dinput) && eff->rgdwAxes) { + TRACE(" "); + for (i = 0; i < eff->cAxes; ++i) + TRACE("%d ", eff->rgdwAxes[i]); + TRACE("\n"); + } + } + + if (dwFlags & DIEP_ENVELOPE) { + TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope); + if (eff->lpEnvelope != NULL) + _dump_DIENVELOPE(eff->lpEnvelope); + } + + if (eff->dwSize > sizeof(DIEFFECT_DX5)) + TRACE(" - dwStartDelay: %d\n", eff->dwStartDelay); + + if (type == DIEFT_CONSTANTFORCE) { + if (eff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) { + WARN("Effect claims to be a constant force but the type-specific params are the wrong size!\n"); + } else { + _dump_DICONSTANTFORCE(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_PERIODIC) { + if (eff->cbTypeSpecificParams != sizeof(DIPERIODIC)) { + WARN("Effect claims to be a periodic force but the type-specific params are the wrong size!\n"); + } else { + _dump_DIPERIODIC(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_RAMPFORCE) { + if (eff->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) { + WARN("Effect claims to be a ramp force but the type-specific params are the wrong size!\n"); + } else { + _dump_DIRAMPFORCE(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_CONDITION) { + if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) { + WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n"); + } else { + _dump_DICONDITION(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_CUSTOMFORCE) { + if (eff->cbTypeSpecificParams != sizeof(DICUSTOMFORCE)) { + WARN("Effect claims to be a custom force but the type-specific params are the wrong size!\n"); + } else { + _dump_DICUSTOMFORCE(eff->lpvTypeSpecificParams); + } + } +} + BOOL device_disabled_registry(const char* name) { static const char disabled_str[] = "disabled"; @@ -94,6 +272,7 @@ { JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface); DWORD i; + ObjProps remap_props; TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph); @@ -112,6 +291,28 @@ if (ph->dwHow == DIPH_DEVICE) { TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { + + remap_props.lDevMin = This->props[i].lMin; + remap_props.lDevMax = This->props[i].lMax; + + remap_props.lDeadZone = This->props[i].lDeadZone; + remap_props.lSaturation = This->props[i].lSaturation; + + remap_props.lMin = pr->lMin; + remap_props.lMax = pr->lMax; + + switch (This->base.data_format.wine_df->rgodf[i].dwOfs) { + case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break; + case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break; + case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break; + case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break; + case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break; + case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break; + case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break; + case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break; + default: break; + } + This->props[i].lMin = pr->lMin; This->props[i].lMax = pr->lMax; } @@ -120,6 +321,30 @@ TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj); if (obj >= 0) { + + /*ePSXe polls the joystick immediately after setting the range for calibration purposes, so the old values need to be remapped to the new range before it does so*/ + + remap_props.lDevMin = This->props[obj].lMin; + remap_props.lDevMax = This->props[obj].lMax; + + remap_props.lDeadZone = This->props[obj].lDeadZone; + remap_props.lSaturation = This->props[obj].lSaturation; + + remap_props.lMin = pr->lMin; + remap_props.lMax = pr->lMax; + + switch (ph->dwObj) { + case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break; + case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break; + case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break; + case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break; + case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break; + case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break; + case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break; + case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break; + default: break; + } + This->props[obj].lMin = pr->lMin; This->props[obj].lMax = pr->lMax; return DI_OK; Modified: trunk/reactos/dll/directx/dinput/joystick_linux.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/joystic…
============================================================================== --- trunk/reactos/dll/directx/dinput/joystick_linux.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/joystick_linux.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -220,15 +220,15 @@ return joystick_devices_count; } -static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { int fd = -1; - if (id >= find_joystick_devices()) return FALSE; + if (id >= find_joystick_devices()) return E_FAIL; if (dwFlags & DIEDFL_FORCEFEEDBACK) { WARN("force feedback not supported\n"); - return FALSE; + return S_FALSE; } if ((dwDevType == 0) || @@ -238,7 +238,7 @@ if ((fd = open(joystick_devices[id].device, O_RDONLY)) < 0) { WARN("open(%s, O_RDONLY) failed: %s\n", joystick_devices[id].name, strerror(errno)); - return FALSE; + return S_FALSE; } /* Return joystick */ @@ -257,21 +257,21 @@ lpddi->guidFFDriver = GUID_NULL; close(fd); TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, lpddi->tszProductName); - return TRUE; - } - - return FALSE; -} - -static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) + return S_OK; + } + + return S_FALSE; +} + +static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { int fd = -1; - if (id >= find_joystick_devices()) return FALSE; + if (id >= find_joystick_devices()) return E_FAIL; if (dwFlags & DIEDFL_FORCEFEEDBACK) { WARN("force feedback not supported\n"); - return FALSE; + return S_FALSE; } if ((dwDevType == 0) || @@ -281,7 +281,7 @@ if ((fd = open(joystick_devices[id].device, O_RDONLY)) < 0) { WARN("open(%s,O_RDONLY) failed: %s\n", joystick_devices[id].device, strerror(errno)); - return FALSE; + return S_FALSE; } /* Return joystick */ @@ -299,10 +299,10 @@ lpddi->guidFFDriver = GUID_NULL; close(fd); TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, joystick_devices[id].name); - return TRUE; - } - - return FALSE; + return S_OK; + } + + return S_FALSE; } static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, Modified: trunk/reactos/dll/directx/dinput/joystick_linuxinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/joystic…
============================================================================== --- trunk/reactos/dll/directx/dinput/joystick_linuxinput.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/joystick_linuxinput.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -43,7 +43,7 @@ # include <linux/input.h> # undef SW_MAX # if defined(EVIOCGBIT) && defined(EV_ABS) && defined(BTN_PINKIE) -# define HAVE_CORRECT_LINUXINPUT_H +# define HAS_PROPER_HEADER # endif #endif #ifdef HAVE_SYS_POLL_H @@ -65,7 +65,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); -#ifdef HAVE_CORRECT_LINUXINPUT_H +#ifdef HAS_PROPER_HEADER #define EVDEVPREFIX "/dev/input/event" #define EVDEVDRIVER " (event)" @@ -363,54 +363,54 @@ MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszProductName, MAX_PATH); } -static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { find_joydevs(); if (id >= have_joydevs) { - return FALSE; + return E_FAIL; } if (!((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))) - return FALSE; + return S_FALSE; #ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION if (dwFlags & DIEDFL_FORCEFEEDBACK) - return FALSE; + return S_FALSE; #endif if (!(dwFlags & DIEDFL_FORCEFEEDBACK) || joydevs[id].has_ff) { fill_joystick_dideviceinstanceA(lpddi, version, id); - return TRUE; + return S_OK; } - return FALSE; -} - -static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) + return S_FALSE; +} + +static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { find_joydevs(); if (id >= have_joydevs) { - return FALSE; + return E_FAIL; } if (!((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))) - return FALSE; + return S_FALSE; #ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION if (dwFlags & DIEDFL_FORCEFEEDBACK) - return FALSE; + return S_FALSE; #endif if (!(dwFlags & DIEDFL_FORCEFEEDBACK) || joydevs[id].has_ff) { fill_joystick_dideviceinstanceW(lpddi, version, id); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsigned short index) @@ -445,9 +445,10 @@ newDevice->generic.base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->base.crit"); /* Count number of available axes - supported Axis & POVs */ - for (i = 0; i < WINE_JOYSTICK_MAX_AXES; i++) - { - if (test_bit(newDevice->joydev->absbits, i)) + for (i = 0; i < ABS_MAX; i++) + { + if (i < WINE_JOYSTICK_MAX_AXES && + test_bit(newDevice->joydev->absbits, i)) { newDevice->generic.device_axis_count++; newDevice->dev_axes_to_di[i] = idx; @@ -1477,7 +1478,7 @@ IDirectInputDevice8WImpl_GetImageInfo }; -#else /* HAVE_CORRECT_LINUXINPUT_H */ +#else /* HAS_PROPER_HEADER */ const struct dinput_device joystick_linuxinput_device = { "Wine Linux-input joystick driver", @@ -1486,4 +1487,4 @@ NULL }; -#endif /* HAVE_CORRECT_LINUXINPUT_H */ +#endif /* HAS_PROPER_HEADER */ Modified: trunk/reactos/dll/directx/dinput/joystick_osx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/joystic…
============================================================================== --- trunk/reactos/dll/directx/dinput/joystick_osx.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/joystick_osx.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -24,6 +24,11 @@ //#include "wine/port.h" #if defined(HAVE_IOKIT_HID_IOHIDLIB_H) +#define DWORD UInt32 +#define LPDWORD UInt32* +#define LONG SInt32 +#define LPLONG SInt32* +#define E_PENDING __carbon_E_PENDING #define ULONG __carbon_ULONG #define E_INVALIDARG __carbon_E_INVALIDARG #define E_OUTOFMEMORY __carbon_E_OUTOFMEMORY @@ -44,7 +49,9 @@ #define MAKE_HRESULT __carbon_MAKE_HRESULT #define HRESULT __carbon_HRESULT #define STDMETHODCALLTYPE __carbon_STDMETHODCALLTYPE +#include <IOKit/IOKitLib.h> #include <IOKit/hid/IOHIDLib.h> +#include <ForceFeedback/ForceFeedback.h> #undef ULONG #undef E_INVALIDARG #undef E_OUTOFMEMORY @@ -65,6 +72,11 @@ #undef MAKE_HRESULT #undef HRESULT #undef STDMETHODCALLTYPE +#undef DWORD +#undef LPDWORD +#undef LONG +#undef LPLONG +#undef E_PENDING #endif /* HAVE_IOKIT_HID_IOHIDLIB_H */ //#include "wine/debug.h" @@ -98,6 +110,8 @@ int id; CFMutableArrayRef elementCFArrayRef; ObjProps **propmap; + FFDeviceObjectReference ff; + struct list effects; }; static inline JoystickImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface) @@ -110,14 +124,115 @@ return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface), JoystickGenericImpl, base), JoystickImpl, generic); } + +typedef struct _EffectImpl { + IDirectInputEffect IDirectInputEffect_iface; + LONG ref; + + JoystickImpl *device; + FFEffectObjectReference effect; + GUID guid; + + struct list entry; +} EffectImpl; + +static EffectImpl *impl_from_IDirectInputEffect(IDirectInputEffect *iface) +{ + return CONTAINING_RECORD(iface, EffectImpl, IDirectInputEffect_iface); +} + +static const IDirectInputEffectVtbl EffectVtbl; static const GUID DInput_Wine_OsX_Joystick_GUID = { /* 59CAD8F6-E617-41E2-8EB7-47B23EEEDC5A */ 0x59CAD8F6, 0xE617, 0x41E2, {0x8E, 0xB7, 0x47, 0xB2, 0x3E, 0xEE, 0xDC, 0x5A} }; +static HRESULT osx_to_win32_hresult(HRESULT in) +{ + /* OSX returns 16-bit COM runtime errors, which we should + * convert to win32 */ + switch(in){ + case 0x80000001: + return E_NOTIMPL; + case 0x80000002: + return E_OUTOFMEMORY; + case 0x80000003: + return E_INVALIDARG; + case 0x80000004: + return E_NOINTERFACE; + case 0x80000005: + return E_POINTER; + case 0x80000006: + return E_HANDLE; + case 0x80000007: + return E_ABORT; + case 0x80000008: + return E_FAIL; + case 0x80000009: + return E_ACCESSDENIED; + case 0x8000FFFF: + return E_UNEXPECTED; + } + return in; +} + static void CFSetApplierFunctionCopyToCFArray(const void *value, void *context) { CFArrayAppendValue( ( CFMutableArrayRef ) context, value ); +} + +static IOHIDDeviceRef get_device_ref(int id) +{ + IOHIDElementRef tIOHIDElementRef; + IOHIDDeviceRef tIOHIDDeviceRef; + + if (!gCollections) + return 0; + + tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gCollections, id); + if (!tIOHIDElementRef) + { + ERR("Invalid Element requested %i\n",id); + return 0; + } + + tIOHIDDeviceRef = IOHIDElementGetDevice(tIOHIDElementRef); + if (!tIOHIDDeviceRef) + { + ERR("Invalid Device requested %i\n",id); + return 0; + } + + return tIOHIDDeviceRef; +} + +static HRESULT get_ff(IOHIDDeviceRef device, FFDeviceObjectReference *ret) +{ + io_service_t service; + CFMutableDictionaryRef matching; + CFTypeRef type; + + matching = IOServiceMatching(kIOHIDDeviceKey); + if(!matching){ + WARN("IOServiceMatching failed, force feedback disabled\n"); + return DIERR_DEVICENOTREG; + } + + type = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDLocationIDKey)); + if(!matching){ + CFRelease(matching); + WARN("IOHIDDeviceGetProperty failed, force feedback disabled\n"); + return DIERR_DEVICENOTREG; + } + + CFDictionaryAddValue(matching, CFSTR(kIOHIDLocationIDKey), type); + + service = IOServiceGetMatchingService(kIOMasterPortDefault, matching); + + if(!ret) + return FFIsForceFeedback(service) == FF_OK ? S_OK : S_FALSE; + + return osx_to_win32_hresult(FFCreateDevice(service, ret)); } static CFMutableDictionaryRef creates_osx_device_match(int usage) @@ -298,30 +413,15 @@ static int get_osx_device_name(int id, char *name, int length) { CFStringRef str; - IOHIDElementRef tIOHIDElementRef; IOHIDDeviceRef tIOHIDDeviceRef; - if (!gCollections) - return 0; - - tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gCollections, id); - - if (!tIOHIDElementRef) - { - ERR("Invalid Element requested %i\n",id); - return 0; - } - - tIOHIDDeviceRef = IOHIDElementGetDevice(tIOHIDElementRef); + tIOHIDDeviceRef = get_device_ref(id); if (name) name[0] = 0; if (!tIOHIDDeviceRef) - { - ERR("Invalid Device requested %i\n",id); return 0; - } str = IOHIDDeviceGetProperty(tIOHIDDeviceRef, CFSTR( kIOHIDProductKey )); if (str) @@ -651,19 +751,21 @@ return joystick_devices_count; } -static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) -{ - if (id >= find_joystick_devices()) return FALSE; - - if (dwFlags & DIEDFL_FORCEFEEDBACK) { - WARN("force feedback not supported\n"); - return FALSE; - } +static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +{ + if (id >= find_joystick_devices()) return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { + if (dwFlags & DIEDFL_FORCEFEEDBACK) { + IOHIDDeviceRef device = get_device_ref(id); + if(!device) + return S_FALSE; + if(get_ff(device, NULL) != S_OK) + return S_FALSE; + } /* Return joystick */ lpddi->guidInstance = DInput_Wine_OsX_Joystick_GUID; lpddi->guidInstance.Data3 = id; @@ -679,27 +781,29 @@ get_osx_device_name(id, lpddi->tszProductName, MAX_PATH); lpddi->guidFFDriver = GUID_NULL; - return TRUE; - } - - return FALSE; -} - -static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) + return S_OK; + } + + return S_FALSE; +} + +static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { char name[MAX_PATH]; char friendly[32]; - if (id >= find_joystick_devices()) return FALSE; - - if (dwFlags & DIEDFL_FORCEFEEDBACK) { - WARN("force feedback not supported\n"); - return FALSE; - } + if (id >= find_joystick_devices()) return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { + if (dwFlags & DIEDFL_FORCEFEEDBACK) { + IOHIDDeviceRef device = get_device_ref(id); + if(!device) + return S_FALSE; + if(get_ff(device, NULL) != S_OK) + return S_FALSE; + } /* Return joystick */ lpddi->guidInstance = DInput_Wine_OsX_Joystick_GUID; lpddi->guidInstance.Data3 = id; @@ -716,16 +820,41 @@ MultiByteToWideChar(CP_ACP, 0, name, -1, lpddi->tszProductName, MAX_PATH); lpddi->guidFFDriver = GUID_NULL; - return TRUE; - } - - return FALSE; + return S_OK; + } + + return S_FALSE; +} + +static const char *osx_ff_axis_name(UInt8 axis) +{ + static char ret[6]; + switch(axis){ + case FFJOFS_X: + return "FFJOFS_X"; + case FFJOFS_Y: + return "FFJOFS_Y"; + case FFJOFS_Z: + return "FFJOFS_Z"; + } + sprintf(ret, "%u", (unsigned int)axis); + return ret; +} + +static int osx_axis_has_ff(FFCAPABILITIES *ffcaps, UInt8 axis) +{ + int i; + for(i = 0; i < ffcaps->numFfAxes; ++i) + if(ffcaps->ffAxes[i] == axis) + return 1; + return 0; } static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, JoystickImpl **pdev, unsigned short index) { DWORD i; + IOHIDDeviceRef device; JoystickImpl* newDevice; char name[MAX_PATH]; HRESULT hr; @@ -733,6 +862,7 @@ int idx = 0; int axis_map[8]; /* max axes */ int slider_count = 0; + FFCAPABILITIES ffcaps; TRACE("%s %p %p %hu\n", debugstr_guid(rguid), dinput, pdev, index); @@ -757,6 +887,38 @@ /* copy the device name */ newDevice->generic.name = HeapAlloc(GetProcessHeap(),0,strlen(name) + 1); strcpy(newDevice->generic.name, name); + + list_init(&newDevice->effects); + device = get_device_ref(index); + if(get_ff(device, &newDevice->ff) == S_OK){ + newDevice->generic.devcaps.dwFlags |= DIDC_FORCEFEEDBACK; + + hr = FFDeviceGetForceFeedbackCapabilities(newDevice->ff, &ffcaps); + if(SUCCEEDED(hr)){ + TRACE("FF Capabilities:\n"); + TRACE("\tsupportedEffects: 0x%x\n", (unsigned int)ffcaps.supportedEffects); + TRACE("\temulatedEffects: 0x%x\n", (unsigned int)ffcaps.emulatedEffects); + TRACE("\tsubType: 0x%x\n", (unsigned int)ffcaps.subType); + TRACE("\tnumFfAxes: %u\n", (unsigned int)ffcaps.numFfAxes); + TRACE("\tffAxes: ["); + for(i = 0; i < ffcaps.numFfAxes; ++i){ + TRACE("%s", osx_ff_axis_name(ffcaps.ffAxes[i])); + if(i < ffcaps.numFfAxes - 1) + TRACE(", "); + } + TRACE("]\n"); + TRACE("\tstorageCapacity: %u\n", (unsigned int)ffcaps.storageCapacity); + TRACE("\tplaybackCapacity: %u\n", (unsigned int)ffcaps.playbackCapacity); + } + + hr = FFDeviceSendForceFeedbackCommand(newDevice->ff, FFSFFC_RESET); + if(FAILED(hr)) + WARN("FFDeviceSendForceFeedbackCommand(FFSFFC_RESET) failed: %08x\n", hr); + + hr = FFDeviceSendForceFeedbackCommand(newDevice->ff, FFSFFC_SETACTUATORSON); + if(FAILED(hr)) + WARN("FFDeviceSendForceFeedbackCommand(FFSFFC_SETACTUATORSON) failed: %08x\n", hr); + } memset(axis_map, 0, sizeof(axis_map)); get_osx_device_elements(newDevice, axis_map); @@ -786,24 +948,46 @@ for (i = 0; i < newDevice->generic.devcaps.dwAxes; i++) { - int wine_obj = -1; + int wine_obj = -1, has_ff = 0; switch (axis_map[i]) { - case kHIDUsage_GD_X: wine_obj = 0; break; - case kHIDUsage_GD_Y: wine_obj = 1; break; - case kHIDUsage_GD_Z: wine_obj = 2; break; - case kHIDUsage_GD_Rx: wine_obj = 3; break; - case kHIDUsage_GD_Ry: wine_obj = 4; break; - case kHIDUsage_GD_Rz: wine_obj = 5; break; + case kHIDUsage_GD_X: + wine_obj = 0; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_X); + break; + case kHIDUsage_GD_Y: + wine_obj = 1; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_Y); + break; + case kHIDUsage_GD_Z: + wine_obj = 2; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_Z); + break; + case kHIDUsage_GD_Rx: + wine_obj = 3; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RX); + break; + case kHIDUsage_GD_Ry: + wine_obj = 4; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RY); + break; + case kHIDUsage_GD_Rz: + wine_obj = 5; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RZ); + break; case kHIDUsage_GD_Slider: wine_obj = 6 + slider_count; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_SLIDER(slider_count)); slider_count++; break; } if (wine_obj < 0 ) continue; memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[wine_obj], df->dwObjSize); - df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(wine_obj) | DIDFT_ABSAXIS; + df->rgodf[idx].dwType = DIDFT_MAKEINSTANCE(wine_obj) | DIDFT_ABSAXIS; + if(has_ff) + df->rgodf[idx].dwFlags |= DIDOI_FFACTUATOR; + ++idx; } for (i = 0; i < newDevice->generic.devcaps.dwPOVs; i++) @@ -830,7 +1014,7 @@ LeaveCriticalSection(&dinput->crit); newDevice->generic.devcaps.dwSize = sizeof(newDevice->generic.devcaps); - newDevice->generic.devcaps.dwFlags = DIDC_ATTACHED; + newDevice->generic.devcaps.dwFlags |= DIDC_ATTACHED; if (newDevice->generic.base.dinput->dwVersion >= 0x0800) newDevice->generic.devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); else @@ -934,6 +1118,174 @@ return DIERR_DEVICENOTREG; } +static HRESULT osx_set_autocenter(JoystickImpl *This, + const DIPROPDWORD *header) +{ + UInt32 v; + HRESULT hr; + if(!This->ff) + return DIERR_UNSUPPORTED; + v = header->dwData; + hr = osx_to_win32_hresult(FFDeviceSetForceFeedbackProperty(This->ff, FFPROP_AUTOCENTER, &v)); + TRACE("returning: %08x\n", hr); + return hr; +} + +static HRESULT osx_set_ffgain(JoystickImpl *This, const DIPROPDWORD *header) +{ + UInt32 v; + HRESULT hr; + if(!This->ff) + return DIERR_UNSUPPORTED; + v = header->dwData; + hr = osx_to_win32_hresult(FFDeviceSetForceFeedbackProperty(This->ff, FFPROP_FFGAIN, &v)); + TRACE("returning: %08x\n", hr); + return hr; +} + +static HRESULT WINAPI JoystickWImpl_SetProperty(IDirectInputDevice8W *iface, + const GUID *prop, const DIPROPHEADER *header) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(prop), header); + + switch(LOWORD(prop)) + { + case (DWORD_PTR)DIPROP_AUTOCENTER: + return osx_set_autocenter(This, (const DIPROPDWORD *)header); + case (DWORD_PTR)DIPROP_FFGAIN: + return osx_set_ffgain(This, (const DIPROPDWORD *)header); + } + + return JoystickWGenericImpl_SetProperty(iface, prop, header); +} + +static HRESULT WINAPI JoystickAImpl_SetProperty(IDirectInputDevice8A *iface, + const GUID *prop, const DIPROPHEADER *header) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(prop), header); + + switch(LOWORD(prop)) + { + case (DWORD_PTR)DIPROP_AUTOCENTER: + return osx_set_autocenter(This, (const DIPROPDWORD *)header); + case (DWORD_PTR)DIPROP_FFGAIN: + return osx_set_ffgain(This, (const DIPROPDWORD *)header); + } + + return JoystickAGenericImpl_SetProperty(iface, prop, header); +} + +static CFUUIDRef effect_win_to_mac(const GUID *effect) +{ +#define DO_MAP(X) \ + if(IsEqualGUID(&GUID_##X, effect)) \ + return kFFEffectType_##X##_ID; + DO_MAP(ConstantForce) + DO_MAP(RampForce) + DO_MAP(Square) + DO_MAP(Sine) + DO_MAP(Triangle) + DO_MAP(SawtoothUp) + DO_MAP(SawtoothDown) + DO_MAP(Spring) + DO_MAP(Damper) + DO_MAP(Inertia) + DO_MAP(Friction) + DO_MAP(CustomForce) +#undef DO_MAP + WARN("Unknown effect GUID! %s\n", debugstr_guid(effect)); + return 0; +} + +static HRESULT WINAPI JoystickWImpl_CreateEffect(IDirectInputDevice8W *iface, + const GUID *type, const DIEFFECT *params, IDirectInputEffect **out, + IUnknown *outer) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + EffectImpl *effect; + HRESULT hr; + + TRACE("%p %s %p %p %p\n", iface, debugstr_guid(type), params, out, outer); + dump_DIEFFECT(params, type, 0); + + if(!This->ff){ + TRACE("No force feedback support\n"); + *out = NULL; + return S_OK; + } + + if(outer) + WARN("aggregation not implemented\n"); + + effect = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This)); + effect->IDirectInputEffect_iface.lpVtbl = &EffectVtbl; + effect->ref = 1; + effect->guid = *type; + effect->device = This; + + /* Mac's FFEFFECT and Win's DIEFFECT are binary identical. */ + hr = osx_to_win32_hresult(FFDeviceCreateEffect(This->ff, + effect_win_to_mac(type), (FFEFFECT*)params, &effect->effect)); + if(FAILED(hr)){ + WARN("FFDeviceCreateEffect failed: %08x\n", hr); + HeapFree(GetProcessHeap(), 0, effect); + return hr; + } + + list_add_tail(&This->effects, &effect->entry); + *out = &effect->IDirectInputEffect_iface; + + TRACE("allocated effect: %p\n", effect); + + return S_OK; +} + +static HRESULT WINAPI JoystickAImpl_CreateEffect(IDirectInputDevice8A *iface, + const GUID *type, const DIEFFECT *params, IDirectInputEffect **out, + IUnknown *outer) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("%p %s %p %p %p\n", iface, debugstr_guid(type), params, out, outer); + + return JoystickWImpl_CreateEffect(&This->generic.base.IDirectInputDevice8W_iface, + type, params, out, outer); +} + +static HRESULT WINAPI JoystickWImpl_SendForceFeedbackCommand(IDirectInputDevice8W *iface, + DWORD flags) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + HRESULT hr; + + TRACE("%p 0x%x\n", This, flags); + + if(!This->ff) + return DI_NOEFFECT; + + hr = osx_to_win32_hresult(FFDeviceSendForceFeedbackCommand(This->ff, flags)); + if(FAILED(hr)){ + WARN("FFDeviceSendForceFeedbackCommand failed: %08x\n", hr); + return hr; + } + + return S_OK; +} + +static HRESULT WINAPI JoystickAImpl_SendForceFeedbackCommand(IDirectInputDevice8A *iface, + DWORD flags) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("%p 0x%x\n", This, flags); + + return JoystickWImpl_SendForceFeedbackCommand(&This->generic.base.IDirectInputDevice8W_iface, flags); +} + const struct dinput_device joystick_osx_device = { "Wine OS X joystick driver", joydev_enum_deviceA, @@ -949,7 +1301,7 @@ JoystickAGenericImpl_GetCapabilities, IDirectInputDevice2AImpl_EnumObjects, JoystickAGenericImpl_GetProperty, - JoystickAGenericImpl_SetProperty, + JoystickAImpl_SetProperty, IDirectInputDevice2AImpl_Acquire, IDirectInputDevice2AImpl_Unacquire, JoystickAGenericImpl_GetDeviceState, @@ -961,11 +1313,11 @@ JoystickAGenericImpl_GetDeviceInfo, IDirectInputDevice2AImpl_RunControlPanel, IDirectInputDevice2AImpl_Initialize, - IDirectInputDevice2AImpl_CreateEffect, + JoystickAImpl_CreateEffect, IDirectInputDevice2AImpl_EnumEffects, IDirectInputDevice2AImpl_GetEffectInfo, IDirectInputDevice2AImpl_GetForceFeedbackState, - IDirectInputDevice2AImpl_SendForceFeedbackCommand, + JoystickAImpl_SendForceFeedbackCommand, IDirectInputDevice2AImpl_EnumCreatedEffectObjects, IDirectInputDevice2AImpl_Escape, JoystickAGenericImpl_Poll, @@ -985,7 +1337,7 @@ JoystickWGenericImpl_GetCapabilities, IDirectInputDevice2WImpl_EnumObjects, JoystickWGenericImpl_GetProperty, - JoystickWGenericImpl_SetProperty, + JoystickWImpl_SetProperty, IDirectInputDevice2WImpl_Acquire, IDirectInputDevice2WImpl_Unacquire, JoystickWGenericImpl_GetDeviceState, @@ -997,11 +1349,11 @@ JoystickWGenericImpl_GetDeviceInfo, IDirectInputDevice2WImpl_RunControlPanel, IDirectInputDevice2WImpl_Initialize, - IDirectInputDevice2WImpl_CreateEffect, + JoystickWImpl_CreateEffect, IDirectInputDevice2WImpl_EnumEffects, IDirectInputDevice2WImpl_GetEffectInfo, IDirectInputDevice2WImpl_GetForceFeedbackState, - IDirectInputDevice2WImpl_SendForceFeedbackCommand, + JoystickWImpl_SendForceFeedbackCommand, IDirectInputDevice2WImpl_EnumCreatedEffectObjects, IDirectInputDevice2WImpl_Escape, JoystickWGenericImpl_Poll, @@ -1013,6 +1365,137 @@ IDirectInputDevice8WImpl_GetImageInfo }; +static HRESULT WINAPI effect_QueryInterface(IDirectInputEffect *iface, + const GUID *guid, void **out) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(guid), out); + + if(IsEqualIID(guid, &IID_IDirectInputEffect)){ + *out = iface; + IDirectInputEffect_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI effect_AddRef(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("%p, ref is now: %u\n", This, ref); + return ref; +} + +static ULONG WINAPI effect_Release(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + ULONG ref = InterlockedDecrement(&This->ref); + TRACE("%p, ref is now: %u\n", This, ref); + + if(!ref){ + list_remove(&This->entry); + FFDeviceReleaseEffect(This->device->ff, This->effect); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI effect_Initialize(IDirectInputEffect *iface, HINSTANCE hinst, + DWORD version, const GUID *guid) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p 0x%x, %s\n", This, hinst, version, debugstr_guid(guid)); + return S_OK; +} + +static HRESULT WINAPI effect_GetEffectGuid(IDirectInputEffect *iface, GUID *out) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p\n", This, out); + *out = This->guid; + return S_OK; +} + +static HRESULT WINAPI effect_GetParameters(IDirectInputEffect *iface, + DIEFFECT *effect, DWORD flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p 0x%x\n", This, effect, flags); + return osx_to_win32_hresult(FFEffectGetParameters(This->effect, (FFEFFECT*)effect, flags)); +} + +static HRESULT WINAPI effect_SetParameters(IDirectInputEffect *iface, + const DIEFFECT *effect, DWORD flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p 0x%x\n", This, effect, flags); + dump_DIEFFECT(effect, &This->guid, flags); + return osx_to_win32_hresult(FFEffectSetParameters(This->effect, (FFEFFECT*)effect, flags)); +} + +static HRESULT WINAPI effect_Start(IDirectInputEffect *iface, DWORD iterations, + DWORD flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p 0x%x 0x%x\n", This, iterations, flags); + return osx_to_win32_hresult(FFEffectStart(This->effect, iterations, flags)); +} + +static HRESULT WINAPI effect_Stop(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p\n", This); + return osx_to_win32_hresult(FFEffectStop(This->effect)); +} + +static HRESULT WINAPI effect_GetEffectStatus(IDirectInputEffect *iface, DWORD *flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p\n", This, flags); + return osx_to_win32_hresult(FFEffectGetEffectStatus(This->effect, (UInt32*)flags)); +} + +static HRESULT WINAPI effect_Download(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p\n", This); + return osx_to_win32_hresult(FFEffectDownload(This->effect)); +} + +static HRESULT WINAPI effect_Unload(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p\n", This); + return osx_to_win32_hresult(FFEffectUnload(This->effect)); +} + +static HRESULT WINAPI effect_Escape(IDirectInputEffect *iface, DIEFFESCAPE *escape) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p\n", This, escape); + return osx_to_win32_hresult(FFEffectEscape(This->effect, (FFEFFESCAPE*)escape)); +} + +static const IDirectInputEffectVtbl EffectVtbl = { + effect_QueryInterface, + effect_AddRef, + effect_Release, + effect_Initialize, + effect_GetEffectGuid, + effect_GetParameters, + effect_SetParameters, + effect_Start, + effect_Stop, + effect_GetEffectStatus, + effect_Download, + effect_Unload, + effect_Escape +}; + #else /* HAVE_IOHIDMANAGERCREATE */ const struct dinput_device joystick_osx_device = { Modified: trunk/reactos/dll/directx/dinput/joystick_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/joystic…
============================================================================== --- trunk/reactos/dll/directx/dinput/joystick_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/joystick_private.h [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -98,4 +98,7 @@ HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN; HRESULT WINAPI JoystickWGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN; +DWORD typeFromGUID(REFGUID guid) DECLSPEC_HIDDEN; +void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) DECLSPEC_HIDDEN; + #endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */ Modified: trunk/reactos/dll/directx/dinput/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/keyboar…
============================================================================== --- trunk/reactos/dll/directx/dinput/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/keyboard.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -185,10 +185,10 @@ memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi))); } -static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) || @@ -197,16 +197,16 @@ fill_keyboard_dideviceinstanceA(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; -} - -static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) + return S_FALSE; +} + +static HRESULT keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) || @@ -215,10 +215,10 @@ fill_keyboard_dideviceinstanceW(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static SysKeyboardImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput) @@ -440,7 +440,7 @@ scan = DIDFT_GETINSTANCE(pdidoi->dwType); if (scan == DIK_PAUSE || scan == DIK_NUMLOCK) scan ^= 0x80; if (!GetKeyNameTextW((scan & 0x80) << 17 | (scan & 0x7f) << 16, - pdidoi->tszName, sizeof(pdidoi->tszName))) + pdidoi->tszName, sizeof(pdidoi->tszName)/sizeof(pdidoi->tszName[0]))) return DIERR_OBJECTNOTFOUND; _dump_OBJECTINSTANCEW(pdidoi); Modified: trunk/reactos/dll/directx/dinput/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dinput/mouse.c…
============================================================================== --- trunk/reactos/dll/directx/dinput/mouse.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dinput/mouse.c [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -159,10 +159,10 @@ memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi))); } -static BOOL mousedev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT mousedev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 0x0800)) || @@ -171,16 +171,16 @@ fill_mouse_dideviceinstanceA(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; -} - -static BOOL mousedev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) + return S_FALSE; +} + +static HRESULT mousedev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 0x0800)) || @@ -189,10 +189,10 @@ fill_mouse_dideviceinstanceW(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static SysMouseImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Sep 29 12:16:54 2013 @@ -28,7 +28,7 @@ The following libraries are shared with Wine. reactos/dll/directx/amstream # Synced to Wine-1.3.37 -reactos/dll/directx/dinput # Synced to Wine-1.5.26 +reactos/dll/directx/dinput # Synced to Wine-1.7.1 reactos/dll/directx/dinput8 # Synced to Wine-1.5.26 reactos/dll/directx/dmusic # Synced to Wine-1.5.26 reactos/dll/directx/dplay # Synced to Wine-1.5.26
11 years, 2 months
1
0
0
0
[ekohl] 60445: [INCLUDE] Add the directory service setup interface definition files.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Sep 29 11:08:27 2013 New Revision: 60445 URL:
http://svn.reactos.org/svn/reactos?rev=60445&view=rev
Log: [INCLUDE] Add the directory service setup interface definition files. Added: trunk/reactos/include/reactos/idl/dssetup.acf (with props) trunk/reactos/include/reactos/idl/dssetup.idl (with props) Added: trunk/reactos/include/reactos/idl/dssetup.acf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/dssetu…
============================================================================== --- trunk/reactos/include/reactos/idl/dssetup.acf (added) +++ trunk/reactos/include/reactos/idl/dssetup.acf [iso-8859-1] Sun Sep 29 11:08:27 2013 @@ -0,0 +1,6 @@ +[ + explicit_handle +] +interface dssetup +{ +} Propchange: trunk/reactos/include/reactos/idl/dssetup.acf ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/include/reactos/idl/dssetup.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/dssetu…
============================================================================== --- trunk/reactos/include/reactos/idl/dssetup.idl (added) +++ trunk/reactos/include/reactos/idl/dssetup.idl [iso-8859-1] Sun Sep 29 11:08:27 2013 @@ -0,0 +1,75 @@ +/* + * Directory Service Setup interface definition + */ + +#include <ms-dtyp.idl> + +typedef enum _DSROLE_MACHINE_ROLE { + DsRole_RoleStandaloneWorkstation, + DsRole_RoleMemberWorkstation, + DsRole_RoleStandaloneServer, + DsRole_RoleMemberServer, + DsRole_RoleBackupDomainController, + DsRole_RolePrimaryDomainController +} DSROLE_MACHINE_ROLE; + +typedef enum _DSROLE_SERVER_STATE { + DsRoleServerUnknown = 0, + DsRoleServerPrimary, + DsRoleServerBackup +} DSROLE_SERVER_STATE, *PDSROLE_SERVER_STATE; + +typedef enum _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL { + DsRolePrimaryDomainInfoBasic = 1, + DsRoleUpgradeStatus, + DsRoleOperationState +} DSROLE_PRIMARY_DOMAIN_INFO_LEVEL; + +typedef struct _DSROLE_UPGRADE_STATUS_INFO { + ULONG OperationState; + DSROLE_SERVER_STATE PreviousServerState; +} DSROLE_UPGRADE_STATUS_INFO, *PDSROLE_UPGRADE_STATUS_INFO; + +typedef enum _DSROLE_OPERATION_STATE { + DsRoleOperationIdle = 0, + DsRoleOperationActive, + DsRoleOperationNeedReboot +} DSROLE_OPERATION_STATE; + +typedef struct _DSROLE_OPERATION_STATE_INFO { + DSROLE_OPERATION_STATE OperationState; +} DSROLE_OPERATION_STATE_INFO, *PDSROLE_OPERATION_STATE_INFO; + +typedef struct _DSROLER_PRIMARY_DOMAIN_INFO_BASIC { + DSROLE_MACHINE_ROLE MachineRole; + ULONG Flags; + [unique, string] wchar_t *DomainNameFlat; + [unique, string] wchar_t *DomainNameDns; + [unique, string] wchar_t *DomainForestName; + GUID DomainGuid; +} DSROLER_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLER_PRIMARY_DOMAIN_INFO_BASIC; + +typedef [switch_type(DSROLE_PRIMARY_DOMAIN_INFO_LEVEL)] union _DSROLER_PRIMARY_DOMAIN_INFORMATION { + [case(DsRolePrimaryDomainInfoBasic)] DSROLER_PRIMARY_DOMAIN_INFO_BASIC DomainInfoBasic; + [case(DsRoleUpgradeStatus)] DSROLE_UPGRADE_STATUS_INFO UpgradStatusInfo; + [case(DsRoleOperationState)] DSROLE_OPERATION_STATE_INFO OperationStateInfo; +} DSROLER_PRIMARY_DOMAIN_INFORMATION, *PDSROLER_PRIMARY_DOMAIN_INFORMATION; + +[ + uuid(3919286a-b10c-11d0-9ba8-00c04fd92ef5), + version(0.0), + pointer_default(unique), + endpoint("ncacn_np:[\\pipe\\lsarpc]") +#ifndef __midl + ,explicit_handle +#endif +] +interface dssetup +{ + DWORD + __stdcall + DsRolerGetPrimaryDomainInformation( + [in] handle_t hBinding, + [in] DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, + [out, switch_is(InfoLevel)] PDSROLER_PRIMARY_DOMAIN_INFORMATION *DomainInfo); +} Propchange: trunk/reactos/include/reactos/idl/dssetup.idl ------------------------------------------------------------------------------ svn:eol-style = native
11 years, 2 months
1
0
0
0
[akhaldi] 60444: [UNICODE] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 29 10:52:38 2013 New Revision: 60444 URL:
http://svn.reactos.org/svn/reactos?rev=60444&view=rev
Log: [UNICODE] * Sync with Wine 1.7.1. CORE-7469 Added: trunk/reactos/tools/unicode/c_10001.c (with props) trunk/reactos/tools/unicode/c_10002.c (with props) trunk/reactos/tools/unicode/c_10003.c (with props) trunk/reactos/tools/unicode/c_10004.c (with props) trunk/reactos/tools/unicode/c_10005.c (with props) trunk/reactos/tools/unicode/c_10008.c (with props) trunk/reactos/tools/unicode/c_10010.c (with props) trunk/reactos/tools/unicode/c_10017.c (with props) trunk/reactos/tools/unicode/c_10021.c (with props) trunk/reactos/tools/unicode/c_10082.c (with props) Modified: trunk/reactos/media/doc/README.WINE trunk/reactos/tools/unicode/CMakeLists.txt trunk/reactos/tools/unicode/c_037.c trunk/reactos/tools/unicode/c_10000.c trunk/reactos/tools/unicode/c_10006.c trunk/reactos/tools/unicode/c_10007.c trunk/reactos/tools/unicode/c_10029.c trunk/reactos/tools/unicode/c_1006.c trunk/reactos/tools/unicode/c_10079.c trunk/reactos/tools/unicode/c_10081.c trunk/reactos/tools/unicode/c_1026.c trunk/reactos/tools/unicode/c_1250.c trunk/reactos/tools/unicode/c_1251.c trunk/reactos/tools/unicode/c_1252.c trunk/reactos/tools/unicode/c_1253.c trunk/reactos/tools/unicode/c_1254.c trunk/reactos/tools/unicode/c_1255.c trunk/reactos/tools/unicode/c_1256.c trunk/reactos/tools/unicode/c_1257.c trunk/reactos/tools/unicode/c_1258.c trunk/reactos/tools/unicode/c_1361.c trunk/reactos/tools/unicode/c_20127.c trunk/reactos/tools/unicode/c_20866.c trunk/reactos/tools/unicode/c_20932.c trunk/reactos/tools/unicode/c_21866.c trunk/reactos/tools/unicode/c_28591.c trunk/reactos/tools/unicode/c_28592.c trunk/reactos/tools/unicode/c_28593.c trunk/reactos/tools/unicode/c_28594.c trunk/reactos/tools/unicode/c_28595.c trunk/reactos/tools/unicode/c_28596.c trunk/reactos/tools/unicode/c_28597.c trunk/reactos/tools/unicode/c_28598.c trunk/reactos/tools/unicode/c_28599.c trunk/reactos/tools/unicode/c_28600.c trunk/reactos/tools/unicode/c_28603.c trunk/reactos/tools/unicode/c_28604.c trunk/reactos/tools/unicode/c_28605.c trunk/reactos/tools/unicode/c_28606.c trunk/reactos/tools/unicode/c_424.c trunk/reactos/tools/unicode/c_437.c trunk/reactos/tools/unicode/c_500.c trunk/reactos/tools/unicode/c_737.c trunk/reactos/tools/unicode/c_775.c trunk/reactos/tools/unicode/c_850.c trunk/reactos/tools/unicode/c_852.c trunk/reactos/tools/unicode/c_855.c trunk/reactos/tools/unicode/c_856.c trunk/reactos/tools/unicode/c_857.c trunk/reactos/tools/unicode/c_860.c trunk/reactos/tools/unicode/c_861.c trunk/reactos/tools/unicode/c_862.c trunk/reactos/tools/unicode/c_863.c trunk/reactos/tools/unicode/c_864.c trunk/reactos/tools/unicode/c_865.c trunk/reactos/tools/unicode/c_866.c trunk/reactos/tools/unicode/c_869.c trunk/reactos/tools/unicode/c_874.c trunk/reactos/tools/unicode/c_875.c trunk/reactos/tools/unicode/c_878.c trunk/reactos/tools/unicode/c_932.c trunk/reactos/tools/unicode/c_936.c trunk/reactos/tools/unicode/c_949.c trunk/reactos/tools/unicode/c_950.c trunk/reactos/tools/unicode/casemap.c trunk/reactos/tools/unicode/cptable.c trunk/reactos/tools/unicode/string.c trunk/reactos/tools/unicode/wctype.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
Modified: trunk/reactos/tools/unicode/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/CMakeLists.t…
Modified: trunk/reactos/tools/unicode/c_037.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_037.c?rev=…
Modified: trunk/reactos/tools/unicode/c_10000.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10000.c?re…
Added: trunk/reactos/tools/unicode/c_10001.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10001.c?re…
Added: trunk/reactos/tools/unicode/c_10002.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10002.c?re…
Added: trunk/reactos/tools/unicode/c_10003.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10003.c?re…
Added: trunk/reactos/tools/unicode/c_10004.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10004.c?re…
Added: trunk/reactos/tools/unicode/c_10005.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10005.c?re…
Modified: trunk/reactos/tools/unicode/c_10006.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10006.c?re…
Modified: trunk/reactos/tools/unicode/c_10007.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10007.c?re…
Added: trunk/reactos/tools/unicode/c_10008.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10008.c?re…
Added: trunk/reactos/tools/unicode/c_10010.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10010.c?re…
Added: trunk/reactos/tools/unicode/c_10017.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10017.c?re…
Added: trunk/reactos/tools/unicode/c_10021.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10021.c?re…
Modified: trunk/reactos/tools/unicode/c_10029.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10029.c?re…
Modified: trunk/reactos/tools/unicode/c_1006.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1006.c?rev…
Modified: trunk/reactos/tools/unicode/c_10079.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10079.c?re…
Modified: trunk/reactos/tools/unicode/c_10081.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10081.c?re…
Added: trunk/reactos/tools/unicode/c_10082.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_10082.c?re…
Modified: trunk/reactos/tools/unicode/c_1026.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1026.c?rev…
Modified: trunk/reactos/tools/unicode/c_1250.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1250.c?rev…
Modified: trunk/reactos/tools/unicode/c_1251.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1251.c?rev…
Modified: trunk/reactos/tools/unicode/c_1252.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1252.c?rev…
Modified: trunk/reactos/tools/unicode/c_1253.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1253.c?rev…
Modified: trunk/reactos/tools/unicode/c_1254.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1254.c?rev…
Modified: trunk/reactos/tools/unicode/c_1255.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1255.c?rev…
Modified: trunk/reactos/tools/unicode/c_1256.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1256.c?rev…
Modified: trunk/reactos/tools/unicode/c_1257.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1257.c?rev…
Modified: trunk/reactos/tools/unicode/c_1258.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1258.c?rev…
Modified: trunk/reactos/tools/unicode/c_1361.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_1361.c?rev…
Modified: trunk/reactos/tools/unicode/c_20127.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_20127.c?re…
Modified: trunk/reactos/tools/unicode/c_20866.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_20866.c?re…
Modified: trunk/reactos/tools/unicode/c_20932.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_20932.c?re…
Modified: trunk/reactos/tools/unicode/c_21866.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_21866.c?re…
Modified: trunk/reactos/tools/unicode/c_28591.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28591.c?re…
Modified: trunk/reactos/tools/unicode/c_28592.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28592.c?re…
Modified: trunk/reactos/tools/unicode/c_28593.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28593.c?re…
Modified: trunk/reactos/tools/unicode/c_28594.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28594.c?re…
Modified: trunk/reactos/tools/unicode/c_28595.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28595.c?re…
Modified: trunk/reactos/tools/unicode/c_28596.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28596.c?re…
Modified: trunk/reactos/tools/unicode/c_28597.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28597.c?re…
Modified: trunk/reactos/tools/unicode/c_28598.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28598.c?re…
Modified: trunk/reactos/tools/unicode/c_28599.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28599.c?re…
Modified: trunk/reactos/tools/unicode/c_28600.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28600.c?re…
Modified: trunk/reactos/tools/unicode/c_28603.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28603.c?re…
Modified: trunk/reactos/tools/unicode/c_28604.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28604.c?re…
Modified: trunk/reactos/tools/unicode/c_28605.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28605.c?re…
Modified: trunk/reactos/tools/unicode/c_28606.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_28606.c?re…
Modified: trunk/reactos/tools/unicode/c_424.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_424.c?rev=…
Modified: trunk/reactos/tools/unicode/c_437.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_437.c?rev=…
Modified: trunk/reactos/tools/unicode/c_500.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_500.c?rev=…
Modified: trunk/reactos/tools/unicode/c_737.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_737.c?rev=…
Modified: trunk/reactos/tools/unicode/c_775.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_775.c?rev=…
Modified: trunk/reactos/tools/unicode/c_850.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_850.c?rev=…
Modified: trunk/reactos/tools/unicode/c_852.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_852.c?rev=…
Modified: trunk/reactos/tools/unicode/c_855.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_855.c?rev=…
Modified: trunk/reactos/tools/unicode/c_856.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_856.c?rev=…
Modified: trunk/reactos/tools/unicode/c_857.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_857.c?rev=…
Modified: trunk/reactos/tools/unicode/c_860.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_860.c?rev=…
Modified: trunk/reactos/tools/unicode/c_861.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_861.c?rev=…
Modified: trunk/reactos/tools/unicode/c_862.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_862.c?rev=…
Modified: trunk/reactos/tools/unicode/c_863.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_863.c?rev=…
Modified: trunk/reactos/tools/unicode/c_864.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_864.c?rev=…
Modified: trunk/reactos/tools/unicode/c_865.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_865.c?rev=…
Modified: trunk/reactos/tools/unicode/c_866.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_866.c?rev=…
Modified: trunk/reactos/tools/unicode/c_869.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_869.c?rev=…
Modified: trunk/reactos/tools/unicode/c_874.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_874.c?rev=…
Modified: trunk/reactos/tools/unicode/c_875.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_875.c?rev=…
Modified: trunk/reactos/tools/unicode/c_878.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_878.c?rev=…
Modified: trunk/reactos/tools/unicode/c_932.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_932.c?rev=…
Modified: trunk/reactos/tools/unicode/c_936.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_936.c?rev=…
Modified: trunk/reactos/tools/unicode/c_949.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_949.c?rev=…
Modified: trunk/reactos/tools/unicode/c_950.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/c_950.c?rev=…
Modified: trunk/reactos/tools/unicode/casemap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/casemap.c?re…
Modified: trunk/reactos/tools/unicode/cptable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/cptable.c?re…
Modified: trunk/reactos/tools/unicode/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/string.c?rev…
Modified: trunk/reactos/tools/unicode/wctype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/wctype.c?rev…
11 years, 2 months
1
0
0
0
[ekohl] 60443: [SAMSRV] SamrDeleteAlias: Remove all members from an alias before it will be deleted.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Sep 29 08:53:24 2013 New Revision: 60443 URL:
http://svn.reactos.org/svn/reactos?rev=60443&view=rev
Log: [SAMSRV] SamrDeleteAlias: Remove all members from an alias before it will be deleted. Modified: trunk/reactos/dll/win32/samsrv/alias.c trunk/reactos/dll/win32/samsrv/samrpc.c trunk/reactos/dll/win32/samsrv/samsrv.h Modified: trunk/reactos/dll/win32/samsrv/alias.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/alias.c?r…
============================================================================== --- trunk/reactos/dll/win32/samsrv/alias.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/alias.c [iso-8859-1] Sun Sep 29 08:53:24 2013 @@ -218,4 +218,159 @@ return Status; } + +NTSTATUS +SampGetMembersInAlias(IN PSAM_DB_OBJECT AliasObject, + OUT PULONG MemberCount, + OUT PSAMPR_SID_INFORMATION *MemberArray) +{ + HANDLE MembersKeyHandle = NULL; + PSAMPR_SID_INFORMATION Members = NULL; + ULONG Count = 0; + ULONG DataLength; + ULONG Index; + NTSTATUS Status; + + /* Open the members key of the alias object */ + Status = SampRegOpenKey(AliasObject->KeyHandle, + L"Members", + KEY_READ, + &MembersKeyHandle); + if (!NT_SUCCESS(Status)) + { + ERR("SampRegOpenKey failed with status 0x%08lx\n", Status); + goto done; + } + + /* Get the number of members */ + Status = SampRegQueryKeyInfo(MembersKeyHandle, + NULL, + &Count); + if (!NT_SUCCESS(Status)) + { + ERR("SampRegQueryKeyInfo failed with status 0x%08lx\n", Status); + goto done; + } + + /* Allocate the member array */ + Members = midl_user_allocate(Count * sizeof(SAMPR_SID_INFORMATION)); + if (Members == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + /* Enumerate the members */ + Index = 0; + while (TRUE) + { + /* Get the size of the next SID */ + DataLength = 0; + Status = SampRegEnumerateValue(MembersKeyHandle, + Index, + NULL, + NULL, + NULL, + NULL, + &DataLength); + if (!NT_SUCCESS(Status)) + { + if (Status == STATUS_NO_MORE_ENTRIES) + Status = STATUS_SUCCESS; + break; + } + + /* Allocate a buffer for the SID */ + Members[Index].SidPointer = midl_user_allocate(DataLength); + if (Members[Index].SidPointer == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + /* Read the SID into the buffer */ + Status = SampRegEnumerateValue(MembersKeyHandle, + Index, + NULL, + NULL, + NULL, + (PVOID)Members[Index].SidPointer, + &DataLength); + if (!NT_SUCCESS(Status)) + { + goto done; + } + + Index++; + } + + if (NT_SUCCESS(Status)) + { + *MemberCount = Count; + *MemberArray = Members; + } + +done: + return Status; +} + + +NTSTATUS +SampRemoveAllMembersFromAlias(IN PSAM_DB_OBJECT AliasObject) +{ + HANDLE MembersKeyHandle = NULL; + PSAMPR_SID_INFORMATION MemberArray = NULL; + ULONG MemberCount = 0; + ULONG Index; + NTSTATUS Status; + + TRACE("(%p)\n", AliasObject); + + /* Open the members key of the alias object */ + Status = SampRegOpenKey(AliasObject->KeyHandle, + L"Members", + KEY_READ, + &MembersKeyHandle); + if (!NT_SUCCESS(Status)) + { + ERR("SampRegOpenKey failed (Status 0x%08lx)\n", Status); + goto done; + } + + /* Get a list of all members of the alias */ + Status = SampGetMembersInAlias(AliasObject, + &MemberCount, + &MemberArray); + if (!NT_SUCCESS(Status)) + { + ERR("SampGetMembersInAlias failed (Status 0x%08lx)\n", Status); + goto done; + } + + /* Remove all members from the alias */ + for (Index = 0; Index < MemberCount; Index++) + { + Status = SampRemoveMemberFromAlias(AliasObject, + MemberArray[Index].SidPointer); + if (!NT_SUCCESS(Status)) + goto done; + } + +done: + if (MemberArray != NULL) + { + for (Index = 0; Index < MemberCount; Index++) + { + if (MemberArray[Index].SidPointer != NULL) + midl_user_free(MemberArray[Index].SidPointer); + } + + midl_user_free(MemberArray); + } + + SampRegCloseKey(&MembersKeyHandle); + + return Status; +} + /* EOF */ Modified: trunk/reactos/dll/win32/samsrv/samrpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samrpc.c?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samrpc.c [iso-8859-1] Sun Sep 29 08:53:24 2013 @@ -4980,7 +4980,13 @@ goto done; } - /* FIXME: Remove all members from the alias */ + /* Remove all members from the alias */ + Status = SampRemoveAllMembersFromAlias(AliasObject); + if (!NT_SUCCESS(Status)) + { + TRACE("SampRemoveAllMembersFromAlias() failed (Status 0x%08lx)\n", Status); + goto done; + } /* Delete the alias from the database */ Status = SampDeleteAccountDbObject(AliasObject); @@ -5085,10 +5091,8 @@ OUT PSAMPR_PSID_ARRAY_OUT Members) { PSAM_DB_OBJECT AliasObject; - HANDLE MembersKeyHandle = NULL; PSAMPR_SID_INFORMATION MemberArray = NULL; - ULONG ValueCount = 0; - ULONG DataLength; + ULONG MemberCount = 0; ULONG Index; NTSTATUS Status; @@ -5109,83 +5113,14 @@ goto done; } - /* Open the members key of the alias objct */ - Status = SampRegOpenKey(AliasObject->KeyHandle, - L"Members", - KEY_READ, - &MembersKeyHandle); - if (!NT_SUCCESS(Status)) - { - ERR("SampRegOpenKey failed with status 0x%08lx\n", Status); - goto done; - } - - /* Get the number of members */ - Status = SampRegQueryKeyInfo(MembersKeyHandle, - NULL, - &ValueCount); - if (!NT_SUCCESS(Status)) - { - ERR("SampRegQueryKeyInfo failed with status 0x%08lx\n", Status); - goto done; - } - - /* Allocate the member array */ - MemberArray = midl_user_allocate(ValueCount * sizeof(SAMPR_SID_INFORMATION)); - if (MemberArray == NULL) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - goto done; - } - - /* Enumerate the members */ - Index = 0; - while (TRUE) - { - /* Get the size of the next SID */ - DataLength = 0; - Status = SampRegEnumerateValue(MembersKeyHandle, - Index, - NULL, - NULL, - NULL, - NULL, - &DataLength); - if (!NT_SUCCESS(Status)) - { - if (Status == STATUS_NO_MORE_ENTRIES) - Status = STATUS_SUCCESS; - break; - } - - /* Allocate a buffer for the SID */ - MemberArray[Index].SidPointer = midl_user_allocate(DataLength); - if (MemberArray[Index].SidPointer == NULL) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - goto done; - } - - /* Read the SID into the buffer */ - Status = SampRegEnumerateValue(MembersKeyHandle, - Index, - NULL, - NULL, - NULL, - (PVOID)MemberArray[Index].SidPointer, - &DataLength); - if (!NT_SUCCESS(Status)) - { - goto done; - } - - Index++; - } + Status = SampGetMembersInAlias(AliasObject, + &MemberCount, + &MemberArray); /* Return the number of members and the member array */ if (NT_SUCCESS(Status)) { - Members->Count = ValueCount; + Members->Count = MemberCount; Members->Sids = MemberArray; } @@ -5195,7 +5130,7 @@ { if (MemberArray != NULL) { - for (Index = 0; Index < ValueCount; Index++) + for (Index = 0; Index < MemberCount; Index++) { if (MemberArray[Index].SidPointer != NULL) midl_user_free(MemberArray[Index].SidPointer); @@ -5204,9 +5139,6 @@ midl_user_free(MemberArray); } } - - /* Close the members key */ - SampRegCloseKey(&MembersKeyHandle); RtlReleaseResource(&SampResource); Modified: trunk/reactos/dll/win32/samsrv/samsrv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samsrv.h?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samsrv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samsrv.h [iso-8859-1] Sun Sep 29 08:53:24 2013 @@ -141,6 +141,14 @@ SampRemoveMemberFromAlias(IN PSAM_DB_OBJECT AliasObject, IN PRPC_SID MemberId); +NTSTATUS +SampGetMembersInAlias(IN PSAM_DB_OBJECT AliasObject, + OUT PULONG MemberCount, + OUT PSAMPR_SID_INFORMATION *MemberArray); + +NTSTATUS +SampRemoveAllMembersFromAlias(IN PSAM_DB_OBJECT AliasObject); + /* database.c */
11 years, 2 months
1
0
0
0
[ekohl] 60442: [ADVAPI32] EqualSid: Set last error to ERROR_SUCCESS before calling RtlEqualSid.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Sep 28 19:36:27 2013 New Revision: 60442 URL:
http://svn.reactos.org/svn/reactos?rev=60442&view=rev
Log: [ADVAPI32] EqualSid: Set last error to ERROR_SUCCESS before calling RtlEqualSid. Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c Modified: trunk/reactos/dll/win32/advapi32/sec/sid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/sid…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/sid.c [iso-8859-1] Sat Sep 28 19:36:27 2013 @@ -1439,6 +1439,7 @@ EqualSid(PSID pSid1, PSID pSid2) { + SetLastError(ERROR_SUCCESS); return RtlEqualSid (pSid1, pSid2); }
11 years, 2 months
1
0
0
0
[aandrejevic] 60441: [SOFT386] Stubplement opcode group handlers.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sat Sep 28 18:56:58 2013 New Revision: 60441 URL:
http://svn.reactos.org/svn/reactos?rev=60441&view=rev
Log: [SOFT386] Stubplement opcode group handlers. Added: branches/ntvdm/lib/soft386/opgroups.c (with props) branches/ntvdm/lib/soft386/opgroups.h (with props) Modified: branches/ntvdm/lib/soft386/CMakeLists.txt branches/ntvdm/lib/soft386/opcodes.c Modified: branches/ntvdm/lib/soft386/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/CMakeLists.tx…
============================================================================== --- branches/ntvdm/lib/soft386/CMakeLists.txt [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/CMakeLists.txt [iso-8859-1] Sat Sep 28 18:56:58 2013 @@ -4,6 +4,7 @@ list(APPEND SOURCE soft386.c opcodes.c + opgroups.c common.c) add_library(soft386 ${SOURCE}) Modified: branches/ntvdm/lib/soft386/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Sat Sep 28 18:56:58 2013 @@ -18,6 +18,7 @@ #include <soft386.h> #include "opcodes.h" +#include "opgroups.h" #include "common.h" /* PUBLIC VARIABLES ***********************************************************/ @@ -153,10 +154,10 @@ Soft386OpcodeShortConditionalJmp, Soft386OpcodeShortConditionalJmp, Soft386OpcodeShortConditionalJmp, - NULL, // TODO: OPCODE 0x80 NOT SUPPORTED - NULL, // TODO: OPCODE 0x81 NOT SUPPORTED - NULL, // TODO: OPCODE 0x82 NOT SUPPORTED - NULL, // TODO: OPCODE 0x83 NOT SUPPORTED + Soft386OpcodeGroup80, + Soft386OpcodeGroup81, + Soft386OpcodeGroup82, + Soft386OpcodeGroup83, Soft386OpcodeTestByteModrm, Soft386OpcodeTestModrm, Soft386OpcodeXchgByteModrm, @@ -168,7 +169,7 @@ Soft386OpcodeMovStoreSeg, Soft386OpcodeLea, Soft386OpcodeMovLoadSeg, - NULL, // TODO: OPCODE 0x8F NOT SUPPORTED + Soft386OpcodeGroup8F, Soft386OpcodeNop, Soft386OpcodeExchangeEax, Soft386OpcodeExchangeEax, @@ -217,14 +218,14 @@ Soft386OpcodeMovRegImm, Soft386OpcodeMovRegImm, Soft386OpcodeMovRegImm, - NULL, // TODO: OPCODE 0xC0 NOT SUPPORTED - NULL, // TODO: OPCODE 0xC1 NOT SUPPORTED + Soft386OpcodeGroupC0, + Soft386OpcodeGroupC1, Soft386OpcodeRet, Soft386OpcodeRet, Soft386OpcodeLdsLes, Soft386OpcodeLdsLes, - NULL, // TODO: OPCODE 0xC6 NOT SUPPORTED - NULL, // TODO: OPCODE 0xC7 NOT SUPPORTED + Soft386OpcodeGroupC6, + Soft386OpcodeGroupC7, Soft386OpcodeEnter, Soft386OpcodeLeave, Soft386OpcodeRetFarImm, @@ -233,10 +234,10 @@ Soft386OpcodeInt, Soft386OpcodeInt, Soft386OpcodeIret, - NULL, // TODO: OPCODE 0xD0 NOT SUPPORTED - NULL, // TODO: OPCODE 0xD1 NOT SUPPORTED - NULL, // TODO: OPCODE 0xD2 NOT SUPPORTED - NULL, // TODO: OPCODE 0xD3 NOT SUPPORTED + Soft386OpcodeGroupD0, + Soft386OpcodeGroupD1, + Soft386OpcodeGroupD2, + Soft386OpcodeGroupD3, Soft386OpcodeAam, Soft386OpcodeAad, NULL, // TODO: OPCODE 0xD6 NOT SUPPORTED @@ -271,16 +272,16 @@ Soft386OpcodePrefix, Soft386OpcodeHalt, Soft386OpcodeComplCarry, - NULL, // TODO: OPCODE 0xF6 NOT SUPPORTED - NULL, // TODO: OPCODE 0xF7 NOT SUPPORTED + Soft386OpcodeGroupF6, + Soft386OpcodeGroupF7, Soft386OpcodeClearCarry, Soft386OpcodeSetCarry, Soft386OpcodeClearInt, Soft386OpcodeSetInt, Soft386OpcodeClearDir, Soft386OpcodeSetDir, - NULL, // TODO: OPCODE 0xFE NOT SUPPORTED - NULL, // TODO: OPCODE 0xFF NOT SUPPORTED + Soft386OpcodeGroupFE, + Soft386OpcodeGroupFF, }; /* PUBLIC FUNCTIONS ***********************************************************/ Added: branches/ntvdm/lib/soft386/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/soft386/opgroups.c (added) +++ branches/ntvdm/lib/soft386/opgroups.c [iso-8859-1] Sat Sep 28 18:56:58 2013 @@ -0,0 +1,127 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: 386/486 CPU Emulation Library + * FILE: opgroups.c + * PURPOSE: Opcode group handlers. + * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> + */ + +/* INCLUDES *******************************************************************/ + +// #define WIN32_NO_STATUS +// #define _INC_WINDOWS +#include <windef.h> + +// #define NDEBUG +#include <debug.h> + +#include <soft386.h> +#include "opcodes.h" +#include "common.h" + +/* PUBLIC FUNCTIONS ***********************************************************/ + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup80) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup81) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup82) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup83) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup8F) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC0) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC1) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC6) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC7) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD0) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD1) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD2) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD3) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupF6) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupF7) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFE) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFF) +{ + UNIMPLEMENTED; + return FALSE; // TODO: NOT IMPLEMENTED +} + +/* EOF */ + Propchange: branches/ntvdm/lib/soft386/opgroups.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ntvdm/lib/soft386/opgroups.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opgroups.h?re…
============================================================================== --- branches/ntvdm/lib/soft386/opgroups.h (added) +++ branches/ntvdm/lib/soft386/opgroups.h [iso-8859-1] Sat Sep 28 18:56:58 2013 @@ -0,0 +1,35 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: 386/486 CPU Emulation Library + * FILE: opgroups.h + * PURPOSE: Opcode group handlers. (header file) + * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> + */ + +#ifndef _OPGROUPS_H_ +#define _OPGROUPS_H_ + +/* DEFINES ********************************************************************/ + +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup80); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup81); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup82); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup83); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroup8F); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC0); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC1); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC6); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupC7); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD0); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD1); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD2); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupD3); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupF6); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupF7); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFE); +SOFT386_OPCODE_HANDLER(Soft386OpcodeGroupFF); + +#endif // _OPGROUPS_H_ + +/* EOF */ + Propchange: branches/ntvdm/lib/soft386/opgroups.h ------------------------------------------------------------------------------ svn:eol-style = native
11 years, 2 months
1
0
0
0
[akhaldi] 60440: [XMLLITE_WINETEST] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 28 15:43:21 2013 New Revision: 60440 URL:
http://svn.reactos.org/svn/reactos?rev=60440&view=rev
Log: [XMLLITE_WINETEST] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/rostests/winetests/xmllite/CMakeLists.txt trunk/rostests/winetests/xmllite/reader.c Modified: trunk/rostests/winetests/xmllite/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/xmllite/CMakeLi…
============================================================================== --- trunk/rostests/winetests/xmllite/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/xmllite/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:43:21 2013 @@ -1,19 +1,10 @@ - -add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE reader.c writer.c testlist.c) -if(NOT MSVC) - # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- #allow_warnings(xmllite_winetest) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - add_executable(xmllite_winetest ${SOURCE}) -target_link_libraries(xmllite_winetest wine uuid) set_module_type(xmllite_winetest win32cui) -add_importlibs(xmllite_winetest xmllite ole32 msvcrt kernel32 ntdll) +add_importlibs(xmllite_winetest ole32 msvcrt kernel32) add_cd_file(TARGET xmllite_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/xmllite/reader.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/xmllite/reader.…
============================================================================== --- trunk/rostests/winetests/xmllite/reader.c [iso-8859-1] (original) +++ trunk/rostests/winetests/xmllite/reader.c [iso-8859-1] Sat Sep 28 15:43:21 2013 @@ -747,7 +747,6 @@ hr = IXmlReader_GetDepth(reader, &count); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); -todo_wine ok(count == 1, "Expected 1, got %d\n", count); hr = IXmlReader_MoveToElement(reader); @@ -776,6 +775,7 @@ const char *value; HRESULT hr; HRESULT hr_broken; /* this is set to older version results */ + int todo : 1; }; static struct test_entry comment_tests[] = { @@ -1053,18 +1053,16 @@ str = NULL; hr = IXmlReader_GetLocalName(reader, &str, &len); ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine { ok(len == lstrlenW(sysW), "got %u\n", len); ok(!lstrcmpW(str, sysW), "got %s\n", wine_dbgstr_w(str)); -} + len = 0; str = NULL; hr = IXmlReader_GetValue(reader, &str, &len); ok(hr == S_OK, "got 0x%08x\n", hr); -todo_wine { ok(len == lstrlenW(sysvalW), "got %u\n", len); ok(!lstrcmpW(str, sysvalW), "got %s\n", wine_dbgstr_w(str)); -} + hr = IXmlReader_MoveToElement(reader); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -1072,9 +1070,10 @@ str = NULL; hr = IXmlReader_GetLocalName(reader, &str, &len); ok(hr == S_OK, "got 0x%08x\n", hr); +todo_wine { ok(len == lstrlenW(dtdnameW), "got %u\n", len); ok(!lstrcmpW(str, dtdnameW), "got %s\n", wine_dbgstr_w(str)); - +} len = 0; str = NULL; hr = IXmlReader_GetQualifiedName(reader, &str, &len); @@ -1170,16 +1169,20 @@ ok(hr == S_OK, "got %08x\n", hr); ok(depth == 0, "got %d\n", depth); + type = XmlNodeType_None; hr = IXmlReader_Read(reader, &type); ok(hr == S_OK, "got %08x\n", hr); + ok(type == XmlNodeType_Element, "got %d\n", type); depth = 1; hr = IXmlReader_GetDepth(reader, &depth); ok(hr == S_OK, "got %08x\n", hr); ok(depth == 0, "got %d\n", depth); + type = XmlNodeType_None; hr = IXmlReader_Read(reader, &type); ok(hr == S_OK, "got %08x\n", hr); + ok(type == XmlNodeType_Element, "got %d\n", type); depth = 0; hr = IXmlReader_GetDepth(reader, &depth); @@ -1322,6 +1325,9 @@ static struct test_entry cdata_tests[] = { { "<a><![CDATA[ ]]data ]]></a>", "", " ]]data ", S_OK }, { "<a><![CDATA[<![CDATA[ data ]]]]></a>", "", "<![CDATA[ data ]]", S_OK }, + { "<a><![CDATA[\n \r\n \n\n ]]></a>", "", "\n \n \n\n ", S_OK, S_OK, 1 }, + { "<a><![CDATA[\r \r\r\n \n\n ]]></a>", "", "\n \n\n \n\n ", S_OK, S_OK, 1 }, + { "<a><![CDATA[\r\r \n\r \r \n\n ]]></a>", "", "\n\n \n\n \n \n\n ", S_OK }, { NULL } }; @@ -1365,15 +1371,122 @@ ok(type == XmlNodeType_CDATA, "got %d for %s\n", type, test->xml); + str_exp = a2w(test->name); + len = 1; str = NULL; hr = IXmlReader_GetLocalName(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(len == strlen(test->name), "got %u\n", len); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + + str = NULL; + hr = IXmlReader_GetLocalName(reader, &str, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + + free_str(str_exp); + + len = 1; + str = NULL; + hr = IXmlReader_GetQualifiedName(reader, &str, &len); ok(hr == S_OK, "got 0x%08x\n", hr); ok(len == strlen(test->name), "got %u\n", len); str_exp = a2w(test->name); ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); free_str(str_exp); + /* value */ + len = 1; + str = NULL; + hr = IXmlReader_GetValue(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str_exp = a2w(test->value); + if (test->todo) + { + todo_wine { + ok(len == strlen(test->value), "got %u\n", len); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + } + } + else + { + ok(len == strlen(test->value), "got %u\n", len); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + } + free_str(str_exp); + } + + IStream_Release(stream); + test++; + } + + IXmlReader_Release(reader); +} + +static struct test_entry text_tests[] = { + { "<a>simple text</a>", "", "simple text", S_OK }, + { "<a>text ]]> text</a>", "", "", WC_E_CDSECTEND }, + { NULL } +}; + +static void test_read_text(void) +{ + struct test_entry *test = text_tests; + IXmlReader *reader; + HRESULT hr; + + hr = pCreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL); + ok(hr == S_OK, "S_OK, got %08x\n", hr); + + while (test->xml) + { + XmlNodeType type; + IStream *stream; + + stream = create_stream_on_data(test->xml, strlen(test->xml)+1); + hr = IXmlReader_SetInput(reader, (IUnknown*)stream); + ok(hr == S_OK, "got %08x\n", hr); + + type = XmlNodeType_None; + hr = IXmlReader_Read(reader, &type); + + /* read one more to get to CDATA */ + if (type == XmlNodeType_Element) + { + type = XmlNodeType_None; + hr = IXmlReader_Read(reader, &type); + } + + if (test->hr_broken) + ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml); + else + ok(hr == test->hr, "got %08x for %s\n", hr, test->xml); + if (hr == S_OK) + { + const WCHAR *str; + WCHAR *str_exp; + UINT len; + + ok(type == XmlNodeType_Text, "got %d for %s\n", type, test->xml); + + str_exp = a2w(test->name); + + len = 1; + str = NULL; + hr = IXmlReader_GetLocalName(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(len == strlen(test->name), "got %u\n", len); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + + str = NULL; + hr = IXmlReader_GetLocalName(reader, &str, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + + free_str(str_exp); + len = 1; str = NULL; hr = IXmlReader_GetQualifiedName(reader, &str, &len); @@ -1383,6 +1496,159 @@ ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); free_str(str_exp); + /* value */ + len = 1; + str = NULL; + hr = IXmlReader_GetValue(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str_exp = a2w(test->value); + if (test->todo) + { + todo_wine { + ok(len == strlen(test->value), "got %u\n", len); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + } + } + else + { + ok(len == strlen(test->value), "got %u\n", len); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + } + free_str(str_exp); + } + + IStream_Release(stream); + test++; + } + + IXmlReader_Release(reader); +} + +struct test_entry_empty { + const char *xml; + BOOL empty; +}; + +static struct test_entry_empty empty_element_tests[] = { + { "<a></a>", FALSE }, + { "<a/>", TRUE }, + { NULL } +}; + +static void test_isemptyelement(void) +{ + struct test_entry_empty *test = empty_element_tests; + IXmlReader *reader; + HRESULT hr; + + hr = pCreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL); + ok(hr == S_OK, "S_OK, got %08x\n", hr); + + while (test->xml) + { + XmlNodeType type; + IStream *stream; + BOOL ret; + + stream = create_stream_on_data(test->xml, strlen(test->xml)+1); + hr = IXmlReader_SetInput(reader, (IUnknown*)stream); + ok(hr == S_OK, "got %08x\n", hr); + + type = XmlNodeType_None; + hr = IXmlReader_Read(reader, &type); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(type == XmlNodeType_Element, "got %d\n", type); + + ret = IXmlReader_IsEmptyElement(reader); + ok(ret == test->empty, "got %d, expected %d. xml=%s\n", ret, test->empty, test->xml); + + IStream_Release(stream); + test++; + } + + IXmlReader_Release(reader); +} + +static struct test_entry attributes_tests[] = { + { "<a attr1=\"attrvalue\"/>", "attr1", "attrvalue", S_OK }, + { "<a attr1=\"a\'\'ttrvalue\"/>", "attr1", "a\'\'ttrvalue", S_OK }, + { "<a attr1=\'a\"ttrvalue\'/>", "attr1", "a\"ttrvalue", S_OK }, + { "<a attr1=\' \'/>", "attr1", " ", S_OK }, + { "<a attr1=\" \"/>", "attr1", " ", S_OK }, + { "<a attr1=\"\r\n \r \n \t\n\r\"/>", "attr1", " ", S_OK }, + { "<a attr1=\" val \"/>", "attr1", " val ", S_OK }, + { "<a attr1=\"\r\n\tval\n\"/>", "attr1", " val ", S_OK }, + { "<a attr1=\"val \"/>", "attr1", "val ", S_OK }, + { "<a attr1=\"val \"/>", "attr1", "val ", S_OK }, + { "<a attr1=\"<>&'"\"/>", "attr1", "<>&\'\"", S_OK }, + { "<a attr1=\"&entname;\"/>", NULL, NULL, WC_E_UNDECLAREDENTITY }, + { "<a attr1=\"val\"/>", NULL, NULL, WC_E_XMLCHARACTER }, + { "<a attr1=\"val &#a;\"/>", NULL, NULL, WC_E_DIGIT, WC_E_SEMICOLON }, + { "<a attr1=\"val a;\"/>", NULL, NULL, WC_E_SEMICOLON }, + { "<a attr1=\"val g;\"/>", NULL, NULL, WC_E_SEMICOLON }, + { "<a attr1=\"val &#xg;\"/>", NULL, NULL, WC_E_HEXDIGIT, WC_E_SEMICOLON }, + { "<a attr1=attrvalue/>", NULL, NULL, WC_E_QUOTE }, + { "<a attr1=\"attr<value\"/>", NULL, NULL, WC_E_LESSTHAN }, + { "<a attr1=\"&entname\"/>", NULL, NULL, WC_E_SEMICOLON }, + { NULL } +}; + +static void test_read_attribute(void) +{ + struct test_entry *test = attributes_tests; + IXmlReader *reader; + HRESULT hr; + + hr = pCreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL); + ok(hr == S_OK, "S_OK, got %08x\n", hr); + + while (test->xml) + { + XmlNodeType type; + IStream *stream; + + stream = create_stream_on_data(test->xml, strlen(test->xml)+1); + hr = IXmlReader_SetInput(reader, (IUnknown*)stream); + ok(hr == S_OK, "got %08x\n", hr); + + type = XmlNodeType_None; + hr = IXmlReader_Read(reader, &type); + + if (test->hr_broken) + ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml); + else + ok(hr == test->hr, "got %08x for %s\n", hr, test->xml); + if (hr == S_OK) + { + const WCHAR *str; + WCHAR *str_exp; + UINT len; + + ok(type == XmlNodeType_Element, "got %d for %s\n", type, test->xml); + + hr = IXmlReader_MoveToFirstAttribute(reader); + ok(hr == S_OK, "got 0x%08x\n", hr); + + len = 1; + str = NULL; + hr = IXmlReader_GetLocalName(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(len == strlen(test->name), "got %u\n", len); + str_exp = a2w(test->name); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + free_str(str_exp); + + len = 1; + str = NULL; + hr = IXmlReader_GetQualifiedName(reader, &str, &len); + ok(hr == S_OK, "got 0x%08x\n", hr); + todo_wine { + ok(len == strlen(test->name), "got %u\n", len); + str_exp = a2w(test->name); + ok(!lstrcmpW(str, str_exp), "got %s\n", wine_dbgstr_w(str)); + free_str(str_exp); + } /* value */ len = 1; str = NULL; @@ -1417,11 +1683,14 @@ test_reader_create(); test_readerinput(); test_reader_state(); + test_read_attribute(); test_read_cdata(); test_read_comment(); test_read_pi(); test_read_dtd(); test_read_element(); + test_isemptyelement(); + test_read_text(); test_read_full(); test_read_pending(); test_readvaluechunk();
11 years, 2 months
1
0
0
0
[akhaldi] 60439: [XMLLITE] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 28 15:42:58 2013 New Revision: 60439 URL:
http://svn.reactos.org/svn/reactos?rev=60439&view=rev
Log: [XMLLITE] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/reactos/dll/win32/xmllite/CMakeLists.txt trunk/reactos/dll/win32/xmllite/reader.c trunk/reactos/dll/win32/xmllite/xmllite_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/xmllite/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/xmllite/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:42:58 2013 @@ -1,25 +1,17 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(xmllite.dll xmllite.spec ADD_IMPORTLIB) list(APPEND SOURCE reader.c writer.c xmllite_main.c - #${REACTOS_BINARY_DIR}/include/psdk/xmllite_i.c ${CMAKE_CURRENT_BINARY_DIR}/xmllite_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/xmllite.def) -if(NOT MSVC) - # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- #allow_warnings(xmllite) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() - add_library(xmllite SHARED ${SOURCE}) set_module_type(xmllite win32dll) -target_link_libraries(xmllite wine uuid) +target_link_libraries(xmllite wine) add_importlibs(xmllite msvcrt kernel32 ntdll) add_cd_file(TARGET xmllite DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/xmllite/reader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/reader.c…
============================================================================== --- trunk/reactos/dll/win32/xmllite/reader.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/reader.c [iso-8859-1] Sat Sep 28 15:42:58 2013 @@ -24,6 +24,7 @@ #define COBJMACROS +#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> @@ -57,7 +58,8 @@ XmlReadInState_DTD_Misc, XmlReadInState_Element, XmlReadInState_Content, - XmlReadInState_MiscEnd + XmlReadInState_MiscEnd, /* optional Misc at the end of a document */ + XmlReadInState_Eof } XmlReaderInternalState; /* This state denotes where parsing was interrupted by input problem. @@ -69,7 +71,8 @@ XmlReadResumeState_PIBody, XmlReadResumeState_CDATA, XmlReadResumeState_Comment, - XmlReadResumeState_STag + XmlReadResumeState_STag, + XmlReadResumeState_CharData } XmlReaderResumeState; /* saved pointer index to resume from particular input position */ @@ -77,13 +80,14 @@ { XmlReadResume_Name, /* PITarget, name for NCName, prefix for QName */ XmlReadResume_Local, /* local for QName */ - XmlReadResume_Body, /* PI body, comment text, CDATA text */ + XmlReadResume_Body, /* PI body, comment text, CDATA text, CharData text */ XmlReadResume_Last } XmlReaderResume; typedef enum { StringValue_LocalName, + StringValue_Prefix, StringValue_QualifiedName, StringValue_Value, StringValue_Last @@ -98,6 +102,62 @@ static const WCHAR gtW[] = {'>',0}; static const WCHAR commentW[] = {'<','!','-','-',0}; static const WCHAR piW[] = {'<','?',0}; + +static const char *debugstr_nodetype(XmlNodeType nodetype) +{ + static const char* type_names[] = + { + "None", + "Element", + "Attribute", + "Text", + "CDATA", + "", + "", + "ProcessingInstruction", + "Comment", + "", + "DocumentType", + "", + "", + "Whitespace", + "", + "EndElement", + "", + "XmlDeclaration" + }; + + if (nodetype > _XmlNodeType_Last) + { + static char buf[25]; + sprintf(buf, "unknown type=%d", nodetype); + return buf; + } + return type_names[nodetype]; +} + +static const char *debugstr_prop(XmlReaderProperty prop) +{ + static const char* prop_names[] = + { + "MultiLanguage", + "ConformanceLevel", + "RandomAccess", + "XmlResolver", + "DtdProcessing", + "ReadState", + "MaxElementDepth", + "MaxEntityExpansion" + }; + + if (prop > _XmlReaderProperty_Last) + { + static char buf[25]; + sprintf(buf, "unknown property=%d", prop); + return buf; + } + return prop_names[prop]; +} struct xml_encoding_data { @@ -151,9 +211,9 @@ */ typedef struct { + WCHAR *str; /* allocated null-terminated string */ + UINT len; /* length in WCHARs, altered after ReadValueChunk */ WCHAR *start; /* input position where value starts */ - UINT len; /* length in WCHARs, altered after ReadValueChunk */ - WCHAR *str; /* allocated null-terminated string */ } strval; static WCHAR emptyW[] = {0}; @@ -170,6 +230,7 @@ { struct list entry; strval qname; + strval localname; }; typedef struct @@ -190,6 +251,8 @@ struct list elements; strval strvalues[StringValue_Last]; UINT depth; + UINT max_depth; + BOOL empty_element; WCHAR *resume[XmlReadResume_Last]; /* pointers used to resume reader */ } xmlreader; @@ -365,16 +428,21 @@ reader_free(reader, elem); } list_init(&reader->elements); + reader->empty_element = FALSE; } static HRESULT reader_inc_depth(xmlreader *reader) { - /* FIXME: handle XmlReaderProperty_MaxElementDepth property */ - reader->depth++; - return S_OK; -} - -static HRESULT reader_push_element(xmlreader *reader, strval *qname) + if (++reader->depth > reader->max_depth) return SC_E_MAXELEMENTDEPTH; + return S_OK; +} + +static void reader_dec_depth(xmlreader *reader) +{ + if (reader->depth > 1) reader->depth--; +} + +static HRESULT reader_push_element(xmlreader *reader, strval *qname, strval *localname) { struct element *elem; HRESULT hr; @@ -383,15 +451,30 @@ if (!elem) return E_OUTOFMEMORY; hr = reader_strvaldup(reader, qname, &elem->qname); - if (FAILED(hr)) return hr; + if (FAILED(hr)) { + reader_free(reader, elem); + return hr; + } + + hr = reader_strvaldup(reader, localname, &elem->localname); + if (FAILED(hr)) + { + reader_free_strvalued(reader, &elem->qname); + reader_free(reader, elem); + return hr; + } if (!list_empty(&reader->elements)) { hr = reader_inc_depth(reader); - if (FAILED(hr)) return hr; + if (FAILED(hr)) { + reader_free(reader, elem); + return hr; + } } list_add_head(&reader->elements, &elem->entry); + reader->empty_element = FALSE; return hr; } @@ -403,7 +486,9 @@ { list_remove(&elem->entry); reader_free_strvalued(reader, &elem->qname); + reader_free_strvalued(reader, &elem->localname); reader_free(reader, elem); + reader_dec_depth(reader); } } @@ -1034,7 +1119,7 @@ reader_skipn(reader, reader_cmp(reader, yesW) ? 2 : 3); ptr = reader_get_cur(reader); TRACE("standalone=%s\n", debugstr_wn(start, ptr-start)); - val.str = start; + val.str = val.start = start; val.len = ptr-start; if (reader_cmp(reader, quoteW) && reader_cmp(reader, dblquoteW)) @@ -1072,6 +1157,7 @@ if (reader_cmp(reader, declcloseW)) return WC_E_XMLDECL; reader_skipn(reader, 2); + reader_inc_depth(reader); reader->nodetype = XmlNodeType_XmlDeclaration; reader_set_strvalue(reader, StringValue_LocalName, &strval_empty); reader_set_strvalue(reader, StringValue_QualifiedName, &strval_empty); @@ -1216,6 +1302,14 @@ return (ch == ':') || is_ncnamechar(ch); } +static XmlNodeType reader_get_nodetype(const xmlreader *reader) +{ + /* When we're on attribute always return attribute type, container node type is kept. + Note that container is not necessarily an element, and attribute doesn't mean it's + an attribute in XML spec terms. */ + return reader->attr ? XmlNodeType_Attribute : reader->nodetype; +} + /* [4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] @@ -1298,6 +1392,9 @@ case XmlReadResumeState_PITarget: hr = reader_parse_pitarget(reader, &target); if (FAILED(hr)) return hr; + reader_set_strvalue(reader, StringValue_LocalName, &target); + reader_set_strvalue(reader, StringValue_QualifiedName, &target); + reader_set_strvalue(reader, StringValue_Value, &strval_empty); reader->resumestate = XmlReadResumeState_PIBody; default: ; @@ -1311,9 +1408,6 @@ reader_skipn(reader, 2); reader->nodetype = XmlNodeType_ProcessingInstruction; reader->resumestate = XmlReadResumeState_Initial; - reader_set_strvalue(reader, StringValue_LocalName, &target); - reader_set_strvalue(reader, StringValue_QualifiedName, &target); - reader_set_strvalue(reader, StringValue_Value, &strval_empty); return S_OK; } @@ -1346,8 +1440,6 @@ reader->resumestate = XmlReadResumeState_Initial; reader->resume[XmlReadResume_Body] = NULL; reader_init_strvalue(start, ptr-start, &value); - reader_set_strvalue(reader, StringValue_LocalName, &target); - reader_set_strvalue(reader, StringValue_QualifiedName, &target); reader_set_strvalue(reader, StringValue_Value, &value); return S_OK; } @@ -1446,8 +1538,7 @@ } if (*cur == quote) reader_skipn(reader, 1); - literal->str = start; - literal->len = cur-start; + reader_init_strvalue(start, cur-start, literal); TRACE("%s\n", debugstr_wn(start, cur-start)); return S_OK; } @@ -1679,36 +1770,280 @@ return S_OK; } +/* Applies normalization rules to a single char, used for attribute values. + + Rules include 2 steps: + + 1) replacing \r\n with a single \n; + 2) replacing all whitespace chars with ' '. + + */ +static void reader_normalize_space(xmlreader *reader, WCHAR *ptr) +{ + encoded_buffer *buffer = &reader->input->buffer->utf16; + + if (!is_wchar_space(*ptr)) return; + + if (*ptr == '\r' && *(ptr+1) == '\n') + { + int len = buffer->written - ((char*)ptr - buffer->data) - 2*sizeof(WCHAR); + memmove(ptr+1, ptr+2, len); + } + *ptr = ' '; +} + +static WCHAR get_predefined_entity(const strval *name) +{ + static const WCHAR entltW[] = {'l','t'}; + static const WCHAR entgtW[] = {'g','t'}; + static const WCHAR entampW[] = {'a','m','p'}; + static const WCHAR entaposW[] = {'a','p','o','s'}; + static const WCHAR entquotW[] = {'q','u','o','t'}; + + static const strval lt = { (WCHAR*)entltW, 2 }; + static const strval gt = { (WCHAR*)entgtW, 2 }; + static const strval amp = { (WCHAR*)entampW, 3 }; + static const strval apos = { (WCHAR*)entaposW, 4 }; + static const strval quot = { (WCHAR*)entquotW, 4 }; + + switch (name->str[0]) + { + case 'l': + if (strval_eq(name, <)) return '<'; + break; + case 'g': + if (strval_eq(name, >)) return '>'; + break; + case 'a': + if (strval_eq(name, &)) + return '&'; + else if (strval_eq(name, &apos)) + return '\''; + break; + case 'q': + if (strval_eq(name, ")) return '\"'; + break; + default: + ; + } + + return 0; +} + +/* [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' + [67] Reference ::= EntityRef | CharRef + [68] EntityRef ::= '&' Name ';' */ +static HRESULT reader_parse_reference(xmlreader *reader) +{ + encoded_buffer *buffer = &reader->input->buffer->utf16; + WCHAR *start = reader_get_cur(reader), *ptr; + WCHAR ch = 0; + int len; + + /* skip '&' */ + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + + if (*ptr == '#') + { + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + + /* hex char or decimal */ + if (*ptr == 'x') + { + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + + while (*ptr != ';') + { + if ((*ptr >= '0' && *ptr <= '9')) + ch = ch*16 + *ptr - '0'; + else if ((*ptr >= 'a' && *ptr <= 'f')) + ch = ch*16 + *ptr - 'a' + 10; + else if ((*ptr >= 'A' && *ptr <= 'F')) + ch = ch*16 + *ptr - 'A' + 10; + else + return ch ? WC_E_SEMICOLON : WC_E_HEXDIGIT; + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + } + } + else + { + while (*ptr != ';') + { + if ((*ptr >= '0' && *ptr <= '9')) + { + ch = ch*10 + *ptr - '0'; + reader_skipn(reader, 1); + ptr = reader_get_cur(reader); + } + else + return ch ? WC_E_SEMICOLON : WC_E_DIGIT; + } + } + + if (!is_char(ch)) return WC_E_XMLCHARACTER; + + /* normalize */ + if (is_wchar_space(ch)) ch = ' '; + + len = buffer->written - ((char*)ptr - buffer->data) - sizeof(WCHAR); + memmove(start+1, ptr+1, len); + buffer->cur = (char*)(start+1); + + *start = ch; + } + else + { + strval name; + HRESULT hr; + + hr = reader_parse_name(reader, &name); + if (FAILED(hr)) return hr; + + ptr = reader_get_cur(reader); + if (*ptr != ';') return WC_E_SEMICOLON; + + /* predefined entities resolve to a single character */ + ch = get_predefined_entity(&name); + if (ch) + { + len = buffer->written - ((char*)ptr - buffer->data) - sizeof(WCHAR); + memmove(start+1, ptr+1, len); + buffer->cur = (char*)(start+1); + + *start = ch; + } + else + { + FIXME("undeclared entity %s\n", debugstr_wn(name.str, name.len)); + return WC_E_UNDECLAREDENTITY; + } + + } + + return S_OK; +} + +/* [10 NS] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" */ +static HRESULT reader_parse_attvalue(xmlreader *reader, strval *value) +{ + WCHAR *ptr, *start; + WCHAR quote; + + ptr = reader_get_cur(reader); + + /* skip opening quote */ + quote = *ptr; + if (quote != '\"' && quote != '\'') return WC_E_QUOTE; + reader_skipn(reader, 1); + + start = ptr = reader_get_cur(reader); + while (*ptr) + { + if (*ptr == '<') return WC_E_LESSTHAN; + + if (*ptr == quote) + { + /* skip closing quote */ + reader_skipn(reader, 1); + break; + } + + if (*ptr == '&') + { + HRESULT hr = reader_parse_reference(reader); + if (FAILED(hr)) return hr; + } + else + { + reader_normalize_space(reader, ptr); + reader_skipn(reader, 1); + } + ptr = reader_get_cur(reader); + } + + reader_init_strvalue(start, ptr-start, value); + + return S_OK; +} + +/* [1 NS] NSAttName ::= PrefixedAttName | DefaultAttName + [2 NS] PrefixedAttName ::= 'xmlns:' NCName + [3 NS] DefaultAttName ::= 'xmlns' + [15 NS] Attribute ::= NSAttName Eq AttValue | QName Eq AttValue */ +static HRESULT reader_parse_attribute(xmlreader *reader) +{ + static const WCHAR xmlnsW[] = {'x','m','l','n','s',0}; + strval prefix, local, qname, xmlns, value; + HRESULT hr; + + hr = reader_parse_qname(reader, &prefix, &local, &qname); + if (FAILED(hr)) return hr; + + reader_init_strvalue((WCHAR*)xmlnsW, 5, &xmlns); + + if (strval_eq(&prefix, &xmlns)) + { + FIXME("namespace definitions not supported\n"); + return E_NOTIMPL; + } + + if (strval_eq(&qname, &xmlns)) + { + FIXME("default namespace definitions not supported\n"); + return E_NOTIMPL; + } + + hr = reader_parse_eq(reader); + if (FAILED(hr)) return hr; + + hr = reader_parse_attvalue(reader, &value); + if (FAILED(hr)) return hr; + + TRACE("%s=%s\n", debugstr_wn(local.str, local.len), debugstr_wn(value.str, value.len)); + return reader_add_attr(reader, &local, &value); +} + /* [12 NS] STag ::= '<' QName (S Attribute)* S? '>' [14 NS] EmptyElemTag ::= '<' QName (S Attribute)* S? '/>' */ static HRESULT reader_parse_stag(xmlreader *reader, strval *prefix, strval *local, strval *qname, int *empty) { - static const WCHAR endW[] = {'/','>',0}; HRESULT hr; hr = reader_parse_qname(reader, prefix, local, qname); if (FAILED(hr)) return hr; - reader_skipspaces(reader); - - /* empty element */ - if ((*empty = !reader_cmp(reader, endW))) - { - /* skip '/>' */ - reader_skipn(reader, 2); - return S_OK; - } - - /* got a start tag */ - if (!reader_cmp(reader, gtW)) - { - /* skip '>' */ - reader_skipn(reader, 1); - return reader_push_element(reader, qname); - } - - FIXME("only empty elements/start tags without attribute list supported\n"); - return E_NOTIMPL; + while (1) + { + static const WCHAR endW[] = {'/','>',0}; + + reader_skipspaces(reader); + + /* empty element */ + if ((*empty = !reader_cmp(reader, endW))) + { + /* skip '/>' */ + reader_skipn(reader, 2); + reader->empty_element = TRUE; + return S_OK; + } + + /* got a start tag */ + if (!reader_cmp(reader, gtW)) + { + /* skip '>' */ + reader_skipn(reader, 1); + return reader_push_element(reader, qname, local); + } + + hr = reader_parse_attribute(reader); + if (FAILED(hr)) return hr; + } + + return S_OK; } /* [39] element ::= EmptyElemTag | STag content ETag */ @@ -1749,6 +2084,7 @@ reader->nodetype = XmlNodeType_Element; reader->resumestate = XmlReadResumeState_Initial; reader_set_strvalue(reader, StringValue_LocalName, &local); + reader_set_strvalue(reader, StringValue_Prefix, &prefix); reader_set_strvalue(reader, StringValue_QualifiedName, &qname); break; } @@ -1785,6 +2121,10 @@ if (!strval_eq(&elem->qname, &qname)) return WC_E_ELEMENTMATCH; reader_pop_element(reader); + + /* It was a root element, the rest is expected as Misc */ + if (list_empty(&reader->elements)) + reader->instate = XmlReadInState_MiscEnd; reader->nodetype = XmlNodeType_EndElement; reader_set_strvalue(reader, StringValue_LocalName, &local); @@ -1839,6 +2179,12 @@ } else { + /* Value normalization is not fully implemented, rules are: + + - single '\r' -> '\n'; + - sequence '\r\n' -> '\n', in this case value length changes; + */ + if (*ptr == '\r') *ptr = '\n'; reader_skipn(reader, 1); ptr++; } @@ -1847,20 +2193,51 @@ return S_OK; } -/* [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' - [67] Reference ::= EntityRef | CharRef - [68] EntityRef ::= '&' Name ';' */ -static HRESULT reader_parse_reference(xmlreader *reader) -{ - FIXME("References not supported\n"); - return E_NOTIMPL; -} - /* [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) */ static HRESULT reader_parse_chardata(xmlreader *reader) { - FIXME("CharData not supported\n"); - return E_NOTIMPL; + WCHAR *start, *ptr; + + if (reader->resume[XmlReadResume_Body]) + { + start = reader->resume[XmlReadResume_Body]; + ptr = reader_get_cur(reader); + } + else + { + reader_shrink(reader); + ptr = start = reader_get_cur(reader); + /* There's no text */ + if (!*ptr || *ptr == '<') return S_OK; + reader->nodetype = XmlNodeType_Text; + reader->resume[XmlReadResume_Body] = start; + reader->resumestate = XmlReadResumeState_CharData; + reader_set_strvalue(reader, StringValue_LocalName, &strval_empty); + reader_set_strvalue(reader, StringValue_QualifiedName, &strval_empty); + reader_set_strvalue(reader, StringValue_Value, NULL); + } + + while (*ptr) + { + /* CDATA closing sequence ']]>' is not allowed */ + if (ptr[0] == ']' && ptr[1] == ']' && ptr[2] == '>') + return WC_E_CDSECTEND; + + /* Found next markup part */ + if (ptr[0] == '<') + { + strval value; + + reader_init_strvalue(start, ptr-start, &value); + reader_set_strvalue(reader, StringValue_Value, &value); + return S_OK; + } + + reader_skipn(reader, 1); + ptr++; + } + + return S_OK; } /* [43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)* */ @@ -1881,6 +2258,8 @@ case XmlReadResumeState_PIBody: case XmlReadResumeState_PITarget: return reader_parse_pi(reader); + case XmlReadResumeState_CharData: + return reader_parse_chardata(reader); default: ERR("unknown resume state %d\n", reader->resumestate); } @@ -1914,6 +2293,9 @@ static HRESULT reader_parse_nextnode(xmlreader *reader) { HRESULT hr; + + if (!is_reader_pending(reader)) + reader_clear_attrs(reader); while (1) { @@ -1978,6 +2360,15 @@ return reader_parse_element(reader); case XmlReadInState_Content: return reader_parse_content(reader); + case XmlReadInState_MiscEnd: + hr = reader_parse_misc(reader); + if (FAILED(hr)) return hr; + + if (hr == S_FALSE) + reader->instate = XmlReadInState_Eof; + return hr; + case XmlReadInState_Eof: + return S_FALSE; default: FIXME("internal state %d not handled\n", reader->instate); return E_NOTIMPL; @@ -2107,7 +2498,7 @@ { xmlreader *This = impl_from_IXmlReader(iface); - TRACE("(%p %u %p)\n", This, property, value); + TRACE("(%p)->(%s %p)\n", This, debugstr_prop(property), value); if (!value) return E_INVALIDARG; @@ -2131,7 +2522,7 @@ { xmlreader *This = impl_from_IXmlReader(iface); - TRACE("(%p %u %lu)\n", iface, property, value); + TRACE("(%p)->(%s %lu)\n", This, debugstr_prop(property), value); switch (property) { @@ -2160,7 +2551,11 @@ hr = reader_parse_nextnode(This); if (oldtype == XmlNodeType_None && This->nodetype != oldtype) This->state = XmlReadState_Interactive; - if (hr == S_OK) *nodetype = This->nodetype; + if (hr == S_OK) + { + TRACE("node type %s\n", debugstr_nodetype(This->nodetype)); + *nodetype = This->nodetype; + } return hr; } @@ -2170,10 +2565,7 @@ xmlreader *This = impl_from_IXmlReader(iface); TRACE("(%p)->(%p)\n", This, node_type); - /* When we're on attribute always return attribute type, container node type is kept. - Note that container is not necessarily an element, and attribute doesn't mean it's - an attribute in XML spec terms. */ - *node_type = This->attr ? XmlNodeType_Attribute : This->nodetype; + *node_type = reader_get_nodetype(This); return This->state == XmlReadState_Closed ? S_FALSE : S_OK; } @@ -2185,6 +2577,9 @@ if (!This->attr_count) return S_FALSE; This->attr = LIST_ENTRY(list_head(&This->attrs), struct attribute, entry); + reader_set_strvalue(This, StringValue_LocalName, &This->attr->localname); + reader_set_strvalue(This, StringValue_Value, &This->attr->value); + return S_OK; } @@ -2202,7 +2597,11 @@ next = list_next(&This->attrs, &This->attr->entry); if (next) + { This->attr = LIST_ENTRY(next, struct attribute, entry); + reader_set_strvalue(This, StringValue_LocalName, &This->attr->localname); + reader_set_strvalue(This, StringValue_Value, &This->attr->value); + } return next ? S_OK : S_FALSE; } @@ -2218,11 +2617,21 @@ static HRESULT WINAPI xmlreader_MoveToElement(IXmlReader* iface) { xmlreader *This = impl_from_IXmlReader(iface); + struct element *elem; TRACE("(%p)\n", This); if (!This->attr_count) return S_FALSE; This->attr = NULL; + + /* FIXME: support other node types with 'attributes' like DTD */ + elem = LIST_ENTRY(list_head(&This->elements), struct element, entry); + if (elem) + { + reader_set_strvalue(This, StringValue_QualifiedName, &elem->qname); + reader_set_strvalue(This, StringValue_LocalName, &elem->localname); + } + return S_OK; } @@ -2250,16 +2659,18 @@ TRACE("(%p)->(%p %p)\n", This, name, len); *name = This->strvalues[StringValue_LocalName].str; - *len = This->strvalues[StringValue_LocalName].len; - return S_OK; -} - -static HRESULT WINAPI xmlreader_GetPrefix(IXmlReader* iface, - LPCWSTR *prefix, - UINT *prefix_length) -{ - FIXME("(%p %p %p): stub\n", iface, prefix, prefix_length); - return E_NOTIMPL; + if (len) *len = This->strvalues[StringValue_LocalName].len; + return S_OK; +} + +static HRESULT WINAPI xmlreader_GetPrefix(IXmlReader* iface, LPCWSTR *prefix, UINT *len) +{ + xmlreader *This = impl_from_IXmlReader(iface); + + TRACE("(%p)->(%p %p)\n", This, prefix, len); + *prefix = This->strvalues[StringValue_Prefix].str; + if (len) *len = This->strvalues[StringValue_Prefix].len; + return S_OK; } static HRESULT WINAPI xmlreader_GetValue(IXmlReader* iface, const WCHAR **value, UINT *len) @@ -2330,13 +2741,16 @@ static BOOL WINAPI xmlreader_IsDefault(IXmlReader* iface) { FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + return FALSE; } static BOOL WINAPI xmlreader_IsEmptyElement(IXmlReader* iface) { - FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + xmlreader *This = impl_from_IXmlReader(iface); + TRACE("(%p)\n", This); + /* Empty elements are not placed in stack, it's stored as a global reader flag that makes sense + when current node is start tag of an element */ + return (reader_get_nodetype(This) == XmlNodeType_Element) ? This->empty_element : FALSE; } static HRESULT WINAPI xmlreader_GetLineNumber(IXmlReader* iface, UINT *lineNumber) @@ -2516,6 +2930,8 @@ reader->attr = NULL; list_init(&reader->elements); reader->depth = 0; + reader->max_depth = 256; + reader->empty_element = FALSE; memset(reader->resume, 0, sizeof(reader->resume)); for (i = 0; i < StringValue_Last; i++) Modified: trunk/reactos/dll/win32/xmllite/xmllite_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xmllite/xmllite_…
============================================================================== --- trunk/reactos/dll/win32/xmllite/xmllite_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xmllite/xmllite_main.c [iso-8859-1] Sat Sep 28 15:42:58 2013 @@ -39,8 +39,6 @@ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 28 15:42:58 2013 @@ -216,7 +216,7 @@ reactos/dll/win32/xinput1_2 # Synced to Wine-1.7.1 reactos/dll/win32/xinput1_3 # Synced to Wine-1.7.1 reactos/dll/win32/xinput9_1_0 # Synced to Wine-1.7.1 -reactos/dll/win32/xmllite # Synced to Wine-1.5.26 +reactos/dll/win32/xmllite # Synced to Wine-1.7.1 reactos/dll/cpl/inetcpl # Synced to Wine-1.3.21
11 years, 2 months
1
0
0
0
[akhaldi] 60438: [XINPUT1_3_WINETEST] * Import from Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 28 15:39:51 2013 New Revision: 60438 URL:
http://svn.reactos.org/svn/reactos?rev=60438&view=rev
Log: [XINPUT1_3_WINETEST] * Import from Wine 1.7.1. CORE-7469 Added: trunk/rostests/winetests/xinput1_3/ trunk/rostests/winetests/xinput1_3/CMakeLists.txt (with props) trunk/rostests/winetests/xinput1_3/testlist.c (with props) trunk/rostests/winetests/xinput1_3/xinput.c (with props) Modified: trunk/rostests/winetests/CMakeLists.txt Modified: trunk/rostests/winetests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
============================================================================== --- trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:39:51 2013 @@ -104,4 +104,5 @@ add_subdirectory(wlanapi) add_subdirectory(wldap32) add_subdirectory(ws2_32) +add_subdirectory(xinput1_3) add_subdirectory(xmllite) Added: trunk/rostests/winetests/xinput1_3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/xinput1_3/CMake…
============================================================================== --- trunk/rostests/winetests/xinput1_3/CMakeLists.txt (added) +++ trunk/rostests/winetests/xinput1_3/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:39:51 2013 @@ -0,0 +1,5 @@ + +add_executable(xinput1_3_winetest xinput.c testlist.c) +set_module_type(xinput1_3_winetest win32cui) +add_importlibs(xinput1_3_winetest user32 msvcrt kernel32) +add_cd_file(TARGET xinput1_3_winetest DESTINATION reactos/bin FOR all) Propchange: trunk/rostests/winetests/xinput1_3/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/xinput1_3/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/xinput1_3/testl…
============================================================================== --- trunk/rostests/winetests/xinput1_3/testlist.c (added) +++ trunk/rostests/winetests/xinput1_3/testlist.c [iso-8859-1] Sat Sep 28 15:39:51 2013 @@ -0,0 +1,12 @@ +/* Automatically generated file; DO NOT EDIT!! */ + +#define STANDALONE +#include <wine/test.h> + +extern void func_xinput(void); + +const struct test winetest_testlist[] = +{ + { "xinput", func_xinput }, + { 0, 0 } +}; Propchange: trunk/rostests/winetests/xinput1_3/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/winetests/xinput1_3/xinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/xinput1_3/xinpu…
============================================================================== --- trunk/rostests/winetests/xinput1_3/xinput.c (added) +++ trunk/rostests/winetests/xinput1_3/xinput.c [iso-8859-1] Sat Sep 28 15:39:51 2013 @@ -0,0 +1,223 @@ +/* + * The Wine project - Xinput Joystick Library + * Copyright 2008 Andrew Fenn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <windows.h> +#include <stdio.h> + +#include "xinput.h" +#include "wine/test.h" + +static DWORD (WINAPI *pXInputGetState)(DWORD, XINPUT_STATE*); +static DWORD (WINAPI *pXInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*); +static DWORD (WINAPI *pXInputSetState)(DWORD, XINPUT_VIBRATION*); +static void (WINAPI *pXInputEnable)(BOOL); +static DWORD (WINAPI *pXInputGetKeystroke)(DWORD, DWORD, PXINPUT_KEYSTROKE); +static DWORD (WINAPI *pXInputGetDSoundAudioDeviceGuids)(DWORD, GUID*, GUID*); +static DWORD (WINAPI *pXInputGetBatteryInformation)(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*); + +static void test_set_state(void) +{ + XINPUT_VIBRATION vibrator; + DWORD controllerNum; + DWORD result; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&vibrator, sizeof(XINPUT_VIBRATION)); + + vibrator.wLeftMotorSpeed = 0; + vibrator.wRightMotorSpeed = 0; + result = pXInputSetState(controllerNum, &vibrator); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputSetState failed with (%d)\n", result); + + pXInputEnable(0); + + vibrator.wLeftMotorSpeed = 65535; + vibrator.wRightMotorSpeed = 65535; + result = pXInputSetState(controllerNum, &vibrator); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputSetState failed with (%d)\n", result); + + pXInputEnable(1); + } + + result = pXInputSetState(XUSER_MAX_COUNT+1, &vibrator); + ok(result == ERROR_BAD_ARGUMENTS, "XInputSetState returned (%d)\n", result); +} + +static void test_get_state(void) +{ + + XINPUT_STATE controllerState; + DWORD controllerNum; + DWORD result; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&controllerState, sizeof(XINPUT_STATE)); + + result = pXInputGetState(controllerNum, &controllerState); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetState failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + skip("Controller %d is not connected\n", controllerNum); + } + else + { + trace("-- Results for controller %d --\n", controllerNum); + trace("XInputGetState: %d\n", result); + trace("State->dwPacketNumber: %d\n", controllerState.dwPacketNumber); + trace("Gamepad Variables --\n"); + trace("Gamepad.wButtons: %#x\n", controllerState.Gamepad.wButtons); + trace("Gamepad.bLeftTrigger: 0x%08x\n", controllerState.Gamepad.bLeftTrigger); + trace("Gamepad.bRightTrigger: 0x%08x\n", controllerState.Gamepad.bRightTrigger); + trace("Gamepad.sThumbLX: %d\n", controllerState.Gamepad.sThumbLX); + trace("Gamepad.sThumbLY: %d\n", controllerState.Gamepad.sThumbLY); + trace("Gamepad.sThumbRX: %d\n", controllerState.Gamepad.sThumbRX); + trace("Gamepad.sThumbRY: %d\n", controllerState.Gamepad.sThumbRY); + } + } + + ZeroMemory(&controllerState, sizeof(XINPUT_STATE)); + result = pXInputGetState(XUSER_MAX_COUNT+1, &controllerState); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetState returned (%d)\n", result); +} + +static void test_get_keystroke(void) +{ + XINPUT_KEYSTROKE keystroke; + DWORD controllerNum; + DWORD result; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&keystroke, sizeof(XINPUT_KEYSTROKE)); + + result = pXInputGetKeystroke(controllerNum, XINPUT_FLAG_GAMEPAD, &keystroke); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetKeystroke failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + skip("Controller %d is not connected\n", controllerNum); + } + } + + ZeroMemory(&keystroke, sizeof(XINPUT_KEYSTROKE)); + result = pXInputGetKeystroke(XUSER_MAX_COUNT+1, XINPUT_FLAG_GAMEPAD, &keystroke); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetKeystroke returned (%d)\n", result); +} + +static void test_get_capabilities(void) +{ + XINPUT_CAPABILITIES capabilities; + DWORD controllerNum; + DWORD result; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&capabilities, sizeof(XINPUT_CAPABILITIES)); + + result = pXInputGetCapabilities(controllerNum, XINPUT_FLAG_GAMEPAD, &capabilities); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetCapabilities failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + skip("Controller %d is not connected\n", controllerNum); + } + } + + ZeroMemory(&capabilities, sizeof(XINPUT_CAPABILITIES)); + result = pXInputGetCapabilities(XUSER_MAX_COUNT+1, XINPUT_FLAG_GAMEPAD, &capabilities); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetCapabilities returned (%d)\n", result); +} + +static void test_get_dsoundaudiodevice(void) +{ + DWORD controllerNum; + DWORD result; + GUID soundRender; + GUID soundCapture; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + result = pXInputGetDSoundAudioDeviceGuids(controllerNum, &soundRender, &soundCapture); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetDSoundAudioDeviceGuids failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + skip("Controller %d is not connected\n", controllerNum); + } + } + + result = pXInputGetDSoundAudioDeviceGuids(XUSER_MAX_COUNT+1, &soundRender, &soundCapture); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetDSoundAudioDeviceGuids returned (%d)\n", result); +} + +static void test_get_batteryinformation(void) +{ + DWORD controllerNum; + DWORD result; + XINPUT_BATTERY_INFORMATION batteryInfo; + + for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++) + { + ZeroMemory(&batteryInfo, sizeof(XINPUT_BATTERY_INFORMATION)); + + result = pXInputGetBatteryInformation(controllerNum, BATTERY_DEVTYPE_GAMEPAD, &batteryInfo); + ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetBatteryInformation failed with (%d)\n", result); + + if (ERROR_DEVICE_NOT_CONNECTED == result) + { + ok(batteryInfo.BatteryLevel == BATTERY_TYPE_DISCONNECTED, "Failed to report device as being disconnected.\n"); + skip("Controller %d is not connected\n", controllerNum); + } + } + + result = pXInputGetBatteryInformation(XUSER_MAX_COUNT+1, BATTERY_DEVTYPE_GAMEPAD, &batteryInfo); + ok(result == ERROR_BAD_ARGUMENTS, "XInputGetBatteryInformation returned (%d)\n", result); +} + +START_TEST(xinput) +{ + HMODULE hXinput; + hXinput = LoadLibraryA( "xinput1_3.dll" ); + + if (!hXinput) + { + win_skip("Could not load xinput1_3.dll\n"); + return; + } + + pXInputEnable = (void*)GetProcAddress(hXinput, "XInputEnable"); + pXInputSetState = (void*)GetProcAddress(hXinput, "XInputSetState"); + pXInputGetState = (void*)GetProcAddress(hXinput, "XInputGetState"); + pXInputGetKeystroke = (void*)GetProcAddress(hXinput, "XInputGetKeystroke"); + pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities"); + pXInputGetDSoundAudioDeviceGuids = (void*)GetProcAddress(hXinput, "XInputGetDSoundAudioDeviceGuids"); + pXInputGetBatteryInformation = (void*)GetProcAddress(hXinput, "XInputGetBatteryInformation"); + + test_set_state(); + test_get_state(); + test_get_keystroke(); + test_get_capabilities(); + test_get_dsoundaudiodevice(); + test_get_batteryinformation(); + + FreeLibrary(hXinput); +} Propchange: trunk/rostests/winetests/xinput1_3/xinput.c ------------------------------------------------------------------------------ svn:eol-style = native
11 years, 2 months
1
0
0
0
[akhaldi] 60437: [XINPUT*] * Sync with Wine 1.7.1. CORE-7469
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Sep 28 15:38:10 2013 New Revision: 60437 URL:
http://svn.reactos.org/svn/reactos?rev=60437&view=rev
Log: [XINPUT*] * Sync with Wine 1.7.1. CORE-7469 Modified: trunk/reactos/dll/win32/xinput1_1/CMakeLists.txt trunk/reactos/dll/win32/xinput1_1/xinput1_1_main.c trunk/reactos/dll/win32/xinput1_2/CMakeLists.txt trunk/reactos/dll/win32/xinput1_2/xinput1_2_main.c trunk/reactos/dll/win32/xinput1_3/CMakeLists.txt trunk/reactos/dll/win32/xinput1_3/xinput1_3_main.c trunk/reactos/dll/win32/xinput9_1_0/CMakeLists.txt trunk/reactos/dll/win32/xinput9_1_0/xinput9_1_0_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/xinput1_1/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput1_1/CMakeL…
============================================================================== --- trunk/reactos/dll/win32/xinput1_1/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput1_1/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -1,16 +1,13 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(xinput1_1.dll xinput1_1.spec) list(APPEND SOURCE xinput1_1_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/xinput1_1.def) -add_library(xinput1_1 SHARED ${SOURCE}) - +add_library(xinput1_1 SHARED ${SOURCE} version.rc) set_module_type(xinput1_1 win32dll) -add_importlibs(xinput1_1 msvcrt kernel32 xinput1_3) +add_importlibs(xinput1_1 xinput1_3 msvcrt kernel32) add_cd_file(TARGET xinput1_1 DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/xinput1_1/xinput1_1_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput1_1/xinput…
============================================================================== --- trunk/reactos/dll/win32/xinput1_1/xinput1_1_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput1_1/xinput1_1_main.c [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -32,8 +32,6 @@ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } Modified: trunk/reactos/dll/win32/xinput1_2/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput1_2/CMakeL…
============================================================================== --- trunk/reactos/dll/win32/xinput1_2/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput1_2/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -1,16 +1,13 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(xinput1_2.dll xinput1_2.spec) list(APPEND SOURCE xinput1_2_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/xinput1_2.def) -add_library(xinput1_2 SHARED ${SOURCE}) - +add_library(xinput1_2 SHARED ${SOURCE} version.rc) set_module_type(xinput1_2 win32dll) -add_importlibs(xinput1_2 msvcrt kernel32 xinput1_3) +add_importlibs(xinput1_2 xinput1_3 msvcrt kernel32) add_cd_file(TARGET xinput1_2 DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/xinput1_2/xinput1_2_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput1_2/xinput…
============================================================================== --- trunk/reactos/dll/win32/xinput1_2/xinput1_2_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput1_2/xinput1_2_main.c [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -32,8 +32,6 @@ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } Modified: trunk/reactos/dll/win32/xinput1_3/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput1_3/CMakeL…
============================================================================== --- trunk/reactos/dll/win32/xinput1_3/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput1_3/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -1,17 +1,13 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(xinput1_3.dll xinput1_3.spec ADD_IMPORTLIB) list(APPEND SOURCE xinput1_3_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/xinput1_3.def) -add_library(xinput1_3 SHARED ${SOURCE}) - - +add_library(xinput1_3 SHARED ${SOURCE} version.rc) set_module_type(xinput1_3 win32dll) target_link_libraries(xinput1_3 wine) add_importlibs(xinput1_3 msvcrt kernel32 ntdll) Modified: trunk/reactos/dll/win32/xinput1_3/xinput1_3_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput1_3/xinput…
============================================================================== --- trunk/reactos/dll/win32/xinput1_3/xinput1_3_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput1_3/xinput1_3_main.c [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -39,8 +39,6 @@ return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); - break; - case DLL_PROCESS_DETACH: break; } return TRUE; Modified: trunk/reactos/dll/win32/xinput9_1_0/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput9_1_0/CMak…
============================================================================== --- trunk/reactos/dll/win32/xinput9_1_0/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput9_1_0/CMakeLists.txt [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -1,16 +1,13 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(xinput9_1_0.dll xinput9_1_0.spec) list(APPEND SOURCE xinput9_1_0_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/xinput9_1_0.def) -add_library(xinput9_1_0 SHARED ${SOURCE}) - +add_library(xinput9_1_0 SHARED ${SOURCE} version.rc) set_module_type(xinput9_1_0 win32dll) add_importlibs(xinput9_1_0 msvcrt kernel32 xinput1_3) add_cd_file(TARGET xinput9_1_0 DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/xinput9_1_0/xinput9_1_0_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/xinput9_1_0/xinp…
============================================================================== --- trunk/reactos/dll/win32/xinput9_1_0/xinput9_1_0_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/xinput9_1_0/xinput9_1_0_main.c [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -32,8 +32,6 @@ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 28 15:38:10 2013 @@ -212,10 +212,10 @@ reactos/dll/win32/wmi # Synced to Wine-1.7.1 reactos/dll/win32/wtsapi32 # Synced to Wine-1.7.1 reactos/dll/win32/wuapi # Synced to Wine-1.7.1 -reactos/dll/win32/xinput1_1 # Synced to Wine-1.5.19 -reactos/dll/win32/xinput1_2 # Synced to Wine-1.5.19 -reactos/dll/win32/xinput1_3 # Synced to Wine-1.5.19 -reactos/dll/win32/xinput9_1_0 # Synced to Wine-1.5.19 +reactos/dll/win32/xinput1_1 # Synced to Wine-1.7.1 +reactos/dll/win32/xinput1_2 # Synced to Wine-1.7.1 +reactos/dll/win32/xinput1_3 # Synced to Wine-1.7.1 +reactos/dll/win32/xinput9_1_0 # Synced to Wine-1.7.1 reactos/dll/win32/xmllite # Synced to Wine-1.5.26 reactos/dll/cpl/inetcpl # Synced to Wine-1.3.21
11 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
56
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200