Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 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
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 13 participants
- 84522 discussions
Jan. 3, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
v2: More changes to the tests but this should avoid spurious failures
caused by test output overflow.
It's also probably something I think we should ultimately do, as
there's little reason to keep these tests separated.
configure.ac | 1 -
dlls/dinput/tests/Makefile.in | 12 ++++++++++--
.../tests/device.c => dinput/tests/device8.c} | 2 +-
dlls/dinput/tests/dinput.c | 4 +++-
.../tests/dinput.c => dinput/tests/dinput8.c} | 5 ++---
dlls/{dinput8 => dinput}/tests/driver_hid.c | 0
dlls/{dinput8 => dinput}/tests/driver_hid.h | 0
dlls/{dinput8 => dinput}/tests/driver_hid.spec | 0
dlls/{dinput8 => dinput}/tests/hid.c | 0
dlls/{dinput8 => dinput}/tests/pop_hid_macros.h | 0
dlls/{dinput8 => dinput}/tests/psh_hid_macros.h | 0
dlls/dinput8/tests/Makefile.in | 12 ------------
12 files changed, 16 insertions(+), 20 deletions(-)
rename dlls/{dinput8/tests/device.c => dinput/tests/device8.c} (99%)
rename dlls/{dinput8/tests/dinput.c => dinput/tests/dinput8.c} (99%)
rename dlls/{dinput8 => dinput}/tests/driver_hid.c (100%)
rename dlls/{dinput8 => dinput}/tests/driver_hid.h (100%)
rename dlls/{dinput8 => dinput}/tests/driver_hid.spec (100%)
rename dlls/{dinput8 => dinput}/tests/hid.c (100%)
rename dlls/{dinput8 => dinput}/tests/pop_hid_macros.h (100%)
rename dlls/{dinput8 => dinput}/tests/psh_hid_macros.h (100%)
delete mode 100644 dlls/dinput8/tests/Makefile.in
diff --git a/configure.ac b/configure.ac
index 9b2c111119f..ddd45b8c241 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2743,7 +2743,6 @@ WINE_CONFIG_MAKEFILE(dlls/difxapi)
WINE_CONFIG_MAKEFILE(dlls/dinput)
WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
WINE_CONFIG_MAKEFILE(dlls/dinput8)
-WINE_CONFIG_MAKEFILE(dlls/dinput8/tests)
WINE_CONFIG_MAKEFILE(dlls/directmanipulation)
WINE_CONFIG_MAKEFILE(dlls/directmanipulation/tests)
WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16)
diff --git a/dlls/dinput/tests/Makefile.in b/dlls/dinput/tests/Makefile.in
index 858c2cdae7a..87a4dad2708 100644
--- a/dlls/dinput/tests/Makefile.in
+++ b/dlls/dinput/tests/Makefile.in
@@ -1,9 +1,17 @@
TESTDLL = dinput.dll
-IMPORTS = dinput ole32 version user32
+IMPORTS = dinput dinput8 ole32 version user32 advapi32 hid uuid crypt32 newdev setupapi wintrust winmm
-C_SRCS = \
+driver_hid_IMPORTS = winecrt0 ntoskrnl hal hidclass
+driver_hid_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
+
+SOURCES = \
device.c \
+ device8.c \
dinput.c \
+ dinput8.c \
+ driver_hid.c \
+ driver_hid.spec \
+ hid.c \
joystick.c \
keyboard.c \
mouse.c
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput/tests/device8.c
similarity index 99%
rename from dlls/dinput8/tests/device.c
rename to dlls/dinput/tests/device8.c
index 8b34de276db..817e843e33c 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput/tests/device8.c
@@ -1836,7 +1836,7 @@ static void test_keyboard_info(void)
ok( ref == 0, "Release returned %d\n", ref );
}
-START_TEST(device)
+START_TEST(device8)
{
instance = GetModuleHandleW( NULL );
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c
index c7fa0b76397..10da888fdd4 100644
--- a/dlls/dinput/tests/dinput.c
+++ b/dlls/dinput/tests/dinput.c
@@ -19,8 +19,10 @@
#define DIRECTINPUT_VERSION 0x0700
#define COBJMACROS
-#include <initguid.h>
#include <windows.h>
+#include "objbase.h"
+
+#include <initguid.h>
#include <dinput.h>
#include <dinputd.h>
diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput/tests/dinput8.c
similarity index 99%
rename from dlls/dinput8/tests/dinput.c
rename to dlls/dinput/tests/dinput8.c
index 3e2e4fbb371..81aeb8191f6 100644
--- a/dlls/dinput8/tests/dinput.c
+++ b/dlls/dinput/tests/dinput8.c
@@ -22,13 +22,12 @@
#include <windows.h>
#include <objidl.h>
-#include <initguid.h>
#include <dinput.h>
#include <dinputd.h>
#include "wine/test.h"
-HINSTANCE hInstance;
+static HINSTANCE hInstance;
static BOOL CALLBACK dummy_callback(const DIDEVICEINSTANCEA *instance, void *context)
{
@@ -711,7 +710,7 @@ static void test_Initialize(void)
IDirectInput8_Release(pDI);
}
-START_TEST(dinput)
+START_TEST(dinput8)
{
hInstance = GetModuleHandleA(NULL);
diff --git a/dlls/dinput8/tests/driver_hid.c b/dlls/dinput/tests/driver_hid.c
similarity index 100%
rename from dlls/dinput8/tests/driver_hid.c
rename to dlls/dinput/tests/driver_hid.c
diff --git a/dlls/dinput8/tests/driver_hid.h b/dlls/dinput/tests/driver_hid.h
similarity index 100%
rename from dlls/dinput8/tests/driver_hid.h
rename to dlls/dinput/tests/driver_hid.h
diff --git a/dlls/dinput8/tests/driver_hid.spec b/dlls/dinput/tests/driver_hid.spec
similarity index 100%
rename from dlls/dinput8/tests/driver_hid.spec
rename to dlls/dinput/tests/driver_hid.spec
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput/tests/hid.c
similarity index 100%
rename from dlls/dinput8/tests/hid.c
rename to dlls/dinput/tests/hid.c
diff --git a/dlls/dinput8/tests/pop_hid_macros.h b/dlls/dinput/tests/pop_hid_macros.h
similarity index 100%
rename from dlls/dinput8/tests/pop_hid_macros.h
rename to dlls/dinput/tests/pop_hid_macros.h
diff --git a/dlls/dinput8/tests/psh_hid_macros.h b/dlls/dinput/tests/psh_hid_macros.h
similarity index 100%
rename from dlls/dinput8/tests/psh_hid_macros.h
rename to dlls/dinput/tests/psh_hid_macros.h
diff --git a/dlls/dinput8/tests/Makefile.in b/dlls/dinput8/tests/Makefile.in
deleted file mode 100644
index 336dbd500ba..00000000000
--- a/dlls/dinput8/tests/Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
-TESTDLL = dinput8.dll
-IMPORTS = dinput8 dinput ole32 user32 hid advapi32 uuid crypt32 newdev setupapi wintrust winmm
-
-driver_hid_IMPORTS = winecrt0 ntoskrnl hal hidclass
-driver_hid_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
-
-SOURCES = \
- device.c \
- dinput.c \
- driver_hid.c \
- driver_hid.spec \
- hid.c
--
2.34.1
2
12
Jan. 3, 2022
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
include/d3dcommon.idl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/d3dcommon.idl b/include/d3dcommon.idl
index 05577d34daf..7a53a84079d 100644
--- a/include/d3dcommon.idl
+++ b/include/d3dcommon.idl
@@ -319,7 +319,7 @@ typedef enum D3D_PRIMITIVE
D3D_PRIMITIVE_17_CONTROL_POINT_PATCH,
D3D_PRIMITIVE_18_CONTROL_POINT_PATCH,
D3D_PRIMITIVE_19_CONTROL_POINT_PATCH,
- D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 28,
+ D3D_PRIMITIVE_20_CONTROL_POINT_PATCH,
D3D_PRIMITIVE_21_CONTROL_POINT_PATCH,
D3D_PRIMITIVE_22_CONTROL_POINT_PATCH,
D3D_PRIMITIVE_23_CONTROL_POINT_PATCH,
@@ -363,7 +363,7 @@ typedef enum D3D_PRIMITIVE
D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH,
D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH,
D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH,
- D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH = 28,
+ D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH,
D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH,
D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH,
D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH,
--
2.34.1
2
1
[tools] testbot/SetwinLocale: Tweak the --country checks and conversion.
by Francois Gouget Jan. 3, 2022
by Francois Gouget Jan. 3, 2022
Jan. 3, 2022
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/SetWinLocale | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index e7ae3c0ced..8360c76840 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -397,19 +397,19 @@ if (!defined $Usage)
$OptLocale ||= $OptDefault;
$OptSystem ||= $OptDefault;
$OptMUI ||= $OptDefault;
- if (!defined $OptCountry and defined $OptDefault and
- $OptDefault =~ /-([A-Z]{2})$/)
+
+ if (!$OptCountry and ($OptDefault || "") =~ /-([A-Z]{2})$/)
{
$OptCountry = $1;
}
- if (defined $OptCountry)
+ if ($OptCountry)
{
- if (!exists $Countries{$OptCountry})
+ $CountryId = $Countries{$OptCountry};
+ if (!defined $CountryId)
{
Error("unknown country '$OptCountry'\n");
$Usage = 2;
}
- $CountryId = $Countries{$OptCountry};
}
if (!$OptLocale and !$OptSystem and !$OptMUI and !$OptKeyboard and
--
2.30.2
1
0
[tools] testbot/SetWinLocale: Fix the usage message and add Powershell information.
by Francois Gouget Jan. 3, 2022
by Francois Gouget Jan. 3, 2022
Jan. 3, 2022
---
testbot/bin/SetWinLocale | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index e8aff6c9d1..3a74406a49 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -432,41 +432,46 @@ if (defined $Usage)
Error("try '$name0 --help' for more information\n");
exit $Usage;
}
- print "or $name0 [options] --show HOSTNAME\n";
- print "or $name0 [options] [--default LOC] [--locale USR] [--system SYS] [--mui MUI] [--keyboard KBD] [--country CTY] HOSTNAME\n";
+ print "Usage: $name0 [options] --show HOSTNAME\n";
+ print "or $name0 [options] [--default DEF] [--locale LOC] [--system SYS] [--mui MUI] [--keyboard KBD] [--country CTY] HOSTNAME\n";
print "\n";
print "Sets the locale of the specified Windows machine.\n";
print "\n";
print "Where:\n";
print " HOSTNAME Work on the specified Windows host (must be running TestAgentd).\n";
print " --show Show the locale settings of the specified host and exit.\n";
- print " --default LOC Use this Windows locale as the default for the other options.\n";
+ print " --default DEF Use this Windows locale as the default for the other options.\n";
print " The locale must be in a form suitable for Windows' intl.cpl\n";
print " control panel module, that is roughly ll-CC where ll is an\n";
print " ISO 639-1 language code and CC an ISO 3166-1 alpha-2 country\n";
print " code.\n";
- print " --locale USR Specifies the user formats (see --defaults).\n";
+ print " --locale LOC Specifies the user formats (see --defaults).\n";
print " . Windows 10 GUI: Time & language -> Region -> Regional\n";
print " format.\n";
print " . APIs: GetUserDefaultLCID(), GetThreadLocale().\n";
+ print " . Powershell: Set-Culture LOC\n";
print " --system SYS Specifies the system locale (see --defaults).\n";
print " . Only takes effect after a reboot.\n";
print " . Windows 10 GUI: Time & language -> Language ->\n";
print " Administrative Language Settings -> Change system locale.\n";
print " . APIs: GetSystemDefaultLCID().\n";
+ print " . Powershell: Set-WinSystemLocale -SystemLocale SYS\n";
print " --mui MUI Specifies the display language (see --defaults).\n";
print " . Only takes effect after a log out + log in.\n";
print " . Windows 10 GUI: Time & language -> Language -> Windows\n";
print " display language.\n";
print " . APIs: GetSystemPreferredUILanguages(),\n";
print " GetUserDefaultUILanguage(), GetThreadUILanguage().\n";
+ print " . Powershell: Set-WinUILanguageOverride -Language MUI\n";
print " --keyboard KBD Specifies the keyboard layout (see --defaults).\n";
print " . Windows 10 GUI: Time & language -> Language -> Keyboard ->\n";
print " Override for default input method.\n";
+ print " . Powershell: Set-WinDefaultInputMethodOverride -InputTip KBD-ID\n";
print " --country CTY Specifies the location using only the country part of the\n";
print " Windows locale (see --defaults).\n";
print " . Windows 10 GUI: Time & language -> Region -> Country.\n";
print " . APIs: GetUserGeoID().\n";
+ print " . Powershell: Set-WinHomeLocation -GeoId CTY-ID\n";
print " --no-reboot Do not reboot Windows. Some locale changes will only take\n";
print " effect after the next reboot.\n";
print " --debug Show more detailed information about progress.\n";
--
2.30.2
1
0
Jan. 3, 2022
---
testbot/bin/SetWinLocale | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index 8360c76840..e8aff6c9d1 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -551,7 +551,9 @@ sub GetWinSettings($)
}
if (($OptKeyboard || $OptDefault) or $All)
{
- $Settings->{InputMethod} = RegGetValue($HKCU_USER_PROFILE, "InputMethodOverride");
+ my $Values = RegGetValues($HKCU_USER_PROFILE, "*");
+ $Settings->{InputMethod} = $Values->{InputMethodOverride};
+ $Settings->{Languages} = $Values->{Languages};
}
if ($OptMUI or $All)
{
@@ -582,6 +584,7 @@ sub ShowWinSettings($)
print "Geo:Nation (--country) = ", Value2Str($Settings->{Country}), "\n";
print "Geo:Name (--country) = ", Value2Str($Settings->{CountryName}), "\n";
print "InputMethod (--keyboard) = ", Value2Str($Settings->{InputMethod}), "\n";
+ print "Languages = ", Value2Str($Settings->{Languages}), "\n";
print "PreferredUILanguages (--mui) = ", Value2Str($Settings->{PreferredUILanguages}), "\n";
print " ...Pending (--mui) = ", Value2Str($Settings->{PreferredUILanguagesPending}), "\n";
print " Previous... (--mui) = ", Value2Str($Settings->{PreviousPreferredUILanguages}), "\n";
--
2.30.2
1
0
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
po/fr.po | 160 ++++++++++++++++++++++----------------------------------------
1 file changed, 57 insertions(+), 103 deletions(-)
diff --git a/po/fr.po b/po/fr.po
index 4a1badfad6a..ebc433cbce5 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: Wine\n"
"Report-Msgid-Bugs-To: https://bugs.winehq.org\n"
"POT-Creation-Date: N/A\n"
-"PO-Revision-Date: 2022-01-02 15:45+0100\n"
+"PO-Revision-Date: 2022-01-03 13:08+0100\n"
"Last-Translator: Eric Pouech <eric.pouech(a)gmail.com>\n"
"Language-Team: French\n"
"Language: fr\n"
@@ -3134,7 +3134,7 @@ msgstr "Note : la clé privée de ce certificat n'est pas exportable."
#: dlls/cryptui/cryptui.rc:177
msgid "Intended Use"
-msgstr "Utilisation prévue :"
+msgstr "Utilisation prévue"
#: dlls/cryptui/cryptui.rc:178 dlls/shell32/shell32.rc:150
msgid "Location"
@@ -3671,7 +3671,7 @@ msgstr "Utiliser un script Proxy Auto-Config (PAC)"
#: dlls/inetcpl.cpl/inetcpl.rc:128 dlls/inetcpl.cpl/inetcpl.rc:132
msgid "Address:"
-msgstr "Adresse: "
+msgstr "Adresse :"
#: dlls/inetcpl.cpl/inetcpl.rc:130
msgid "Proxy server"
@@ -3683,7 +3683,7 @@ msgstr "Utiliser un serveur mandataire"
#: dlls/inetcpl.cpl/inetcpl.rc:134
msgid "Port:"
-msgstr "Port: "
+msgstr "Port :"
#: dlls/inetcpl.cpl/inetcpl.rc:31
msgid "Internet Settings"
@@ -3809,7 +3809,7 @@ msgstr "Indice hors limites"
#: dlls/jscript/jscript.rc:31
msgid "Out of stack space"
-msgstr "Dépassement de capacité de pile ; "
+msgstr "Dépassement de capacité de pile :"
#: dlls/jscript/jscript.rc:32
msgid "Object required"
@@ -7537,10 +7537,8 @@ msgid "Begin request has already been made.\n"
msgstr ""
#: dlls/mferror/mferror.mc:599
-#, fuzzy
-#| msgid "Object UUID not found.\n"
msgid "Sink has not been finalized.\n"
-msgstr "UUID d'objet introuvable.\n"
+msgstr "Le récepteur n'a pas été finalisé.\n"
#: dlls/mferror/mferror.mc:732
msgid "Clock was stopped\n"
@@ -7582,7 +7580,7 @@ msgstr "Représentation non prise en charge.\n"
#: dlls/mferror/mferror.mc:88
msgid "No more types in the list of suggested media types.\n"
-msgstr ""
+msgstr "Il n'y a plus de types dans la liste de type de médias suggérés.\n"
#: dlls/mferror/mferror.mc:95
msgid "Unsupported service.\n"
@@ -7609,10 +7607,8 @@ msgid "Unsupported scheme.\n"
msgstr "Schéma non pris en charge.\n"
#: dlls/mferror/mferror.mc:151
-#, fuzzy
-#| msgid "Unsupported type.\n"
msgid "Unsupported bytestream type.\n"
-msgstr "Type non pris en charge.\n"
+msgstr "Type de flux d'octets non pris en charge.\n"
#: dlls/mferror/mferror.mc:158
msgid "Unsupported time format.\n"
@@ -7787,10 +7783,8 @@ msgid "Invalid work queue index.\n"
msgstr "Index invalide.\n"
#: dlls/mferror/mferror.mc:438
-#, fuzzy
-#| msgid "No logon servers available.\n"
msgid "No events available.\n"
-msgstr "Aucun serveur de connexion disponible.\n"
+msgstr "Aucun événement disponible.\n"
#: dlls/mferror/mferror.mc:445
#, fuzzy
@@ -7843,18 +7837,16 @@ msgid "No media streams were selected.\n"
msgstr "Aucun flux de données médis n'a été détecté.\n"
#: dlls/mferror/mferror.mc:529
-#, fuzzy
-#| msgid "Unsupported type.\n"
msgid "Unsupported media source characteristics.\n"
-msgstr "Type non pris en charge.\n"
+msgstr "Caractéristiques du média source non prises en charge.\n"
#: dlls/mferror/mferror.mc:536
msgid "Stream sink was removed.\n"
-msgstr ""
+msgstr "Le récepteur de flux a été enlevé.\n"
#: dlls/mferror/mferror.mc:543
msgid "Stream sinks are out of sync.\n"
-msgstr ""
+msgstr "Les récepteurs de flux sont désynchronisés.\n"
#: dlls/mferror/mferror.mc:550
#, fuzzy
@@ -7863,38 +7855,28 @@ msgid "Media sink stream sinks set is fixed.\n"
msgstr "Le registre a été restauré.\n"
#: dlls/mferror/mferror.mc:557
-#, fuzzy
-#| msgid "Domain already exists.\n"
msgid "Stream sink already exists.\n"
-msgstr "Le domaine existe déjà.\n"
+msgstr "Le récepteur de flux existe déjà.\n"
#: dlls/mferror/mferror.mc:564
-#, fuzzy
-#| msgid "Operation canceled by user.\n"
msgid "Sample allocation was canceled.\n"
-msgstr "Opération annulée par l'utilisateur.\n"
+msgstr "L'allocation d'échantillons a été annulée.\n"
#: dlls/mferror/mferror.mc:571
-#, fuzzy
-#| msgid "Directory is not empty.\n"
msgid "Sample allocator is empty.\n"
-msgstr "Le répertoire n'est pas vide.\n"
+msgstr "L'allocateur d'échantillons est vide.\n"
#: dlls/mferror/mferror.mc:578
-#, fuzzy
-#| msgid "Class already exists.\n"
msgid "Sink was already stopped.\n"
-msgstr "La classe existe déjà.\n"
+msgstr "Le récepteur a déjà été arrếté.\n"
#: dlls/mferror/mferror.mc:585
msgid "Bitrate was unknown for ASF file sink.\n"
msgstr ""
#: dlls/mferror/mferror.mc:592
-#, fuzzy
-#| msgid "No data detected.\n"
msgid "No streams were selected for the sink.\n"
-msgstr "Aucune donnée détectée.\n"
+msgstr "Aucun flux n'a été sélectionné pour le récepteur.\n"
#: dlls/mferror/mferror.mc:606
msgid "Metadata was too long.\n"
@@ -7902,21 +7884,19 @@ msgstr "Métadonnées trop longues.\n"
#: dlls/mferror/mferror.mc:613
msgid "No samples were processed by the sink.\n"
-msgstr ""
+msgstr "Aucun échantillon n'a été traité par le récepteur.\n"
#: dlls/mferror/mferror.mc:620
msgid "Sink was not provided with required headers.\n"
-msgstr ""
+msgstr "Le récepteur n'a pas reçu les en-têtes attendues.\n"
#: dlls/mferror/mferror.mc:627
msgid "Optional node is invalid.\n"
msgstr "Le noeud optionnel n'est pas valide.\n"
#: dlls/mferror/mferror.mc:634
-#, fuzzy
-#| msgid "Cannot find the printer."
msgid "Cannot find decryptor.\n"
-msgstr "Impossible de trouver l'imprimante."
+msgstr "Impossible de trouver le décrypteur.\n"
#: dlls/mferror/mferror.mc:641
msgid "Codec was not found.\n"
@@ -8060,7 +8040,7 @@ msgstr ""
#: dlls/msi/msi.rc:32
msgid "path %s not found"
-msgstr "Le chemin %s est introuvable"
+msgstr "le chemin %s est introuvable"
#: dlls/msi/msi.rc:33
msgid "insert disk %s"
@@ -8155,7 +8135,7 @@ msgstr "Nouveau dossier"
#: dlls/msi/msi.rc:91
msgid "Allocating registry space"
-msgstr "Allocation d'espace pour le registre."
+msgstr "Allocation d'espace pour le registre"
#: dlls/msi/msi.rc:92
msgid "Searching for installed applications"
@@ -8212,10 +8192,8 @@ msgid "Installing new services"
msgstr "Installation des nouveaux services"
#: dlls/msi/msi.rc:107
-#, fuzzy
-#| msgid "Install/Uninstall"
msgid "Installing system catalog"
-msgstr "Installation/Désinstallation"
+msgstr "Installation du catalogue système"
#: dlls/msi/msi.rc:108
msgid "Validating install"
@@ -8319,7 +8297,7 @@ msgstr "Suppression des dossiers"
#: dlls/msi/msi.rc:133
msgid "Removing INI files entries"
-msgstr ""
+msgstr "Suppression des entrées dans les fichiers INI"
#: dlls/msi/msi.rc:134
msgid "Removing ODBC components"
@@ -8395,7 +8373,7 @@ msgstr "Suppression de l'enregistrement des bibliothèques de types"
#: dlls/msi/msi.rc:154
msgid "Writing INI files values"
-msgstr ""
+msgstr "Écriture des entrées dans les fichiers INI"
#: dlls/msi/msi.rc:155
msgid "Writing system registry values"
@@ -8483,7 +8461,7 @@ msgstr "Police : [1]"
#: dlls/msi/msi.rc:184 dlls/msi/msi.rc:205
msgid "MIME Content Type: [1], Extension: [2]"
-msgstr ""
+msgstr "Type de contenu MIME : [1], Extension : [2]"
#: dlls/msi/msi.rc:185 dlls/msi/msi.rc:206
msgid "ProgId: [1]"
@@ -8507,11 +8485,11 @@ msgstr "Application : [1], Ligne de commande : [2]"
#: dlls/msi/msi.rc:192 dlls/msi/msi.rc:209
msgid "File: [1], Section: [2], Key: [3], Value: [4]"
-msgstr ""
+msgstr "Fichier : [1], Section : [2], Clé : [3], Valeur : [4]"
#: dlls/msi/msi.rc:193
msgid "Key: [1], Name: [2]"
-msgstr ""
+msgstr "Clé : [1], Nom : [2]"
#: dlls/msi/msi.rc:195 dlls/msi/msi.rc:196
msgid "File: [1], Folder: [2]"
@@ -8523,7 +8501,7 @@ msgstr ""
#: dlls/msi/msi.rc:210
msgid "Key: [1], Name: [2], Value: [3]"
-msgstr ""
+msgstr "Clé : [1], Nom : [2], Valeur : [3]"
#: dlls/msi/msi.rc:72
msgid "{{Fatal error: }}"
@@ -8535,7 +8513,7 @@ msgstr "{{Erreur [1]. }}"
#: dlls/msi/msi.rc:74
msgid "Warning [1]."
-msgstr ""
+msgstr "Alerte : [1]."
#: dlls/msi/msi.rc:75
msgid "Info [1]."
@@ -8915,11 +8893,9 @@ msgid "selected"
msgstr "sélectionné"
#: dlls/oleacc/oleacc.rc:100
-#, fuzzy
-#| msgid "Paused"
msgctxt "object state"
msgid "focused"
-msgstr "En pause"
+msgstr "avec focus"
#: dlls/oleacc/oleacc.rc:101
msgctxt "object state"
@@ -8942,11 +8918,9 @@ msgid "read only"
msgstr "lecture seule"
#: dlls/oleacc/oleacc.rc:105
-#, fuzzy
-#| msgid "Hot Tracked Item"
msgctxt "object state"
msgid "hot tracked"
-msgstr "Élément actif"
+msgstr "actif"
#: dlls/oleacc/oleacc.rc:106
msgctxt "object state"
@@ -8994,10 +8968,9 @@ msgid "offscreen"
msgstr "hors écran"
#: dlls/oleacc/oleacc.rc:115
-#, fuzzy
msgctxt "object state"
msgid "sizeable"
-msgstr "&activer"
+msgstr "dimensionnable"
#: dlls/oleacc/oleacc.rc:116
msgctxt "object state"
@@ -9032,18 +9005,14 @@ msgid "traversed"
msgstr ""
#: dlls/oleacc/oleacc.rc:122
-#, fuzzy
-#| msgid "table"
msgctxt "object state"
msgid "multi selectable"
-msgstr "table"
+msgstr "avec sélection multiple"
#: dlls/oleacc/oleacc.rc:123
-#, fuzzy
-#| msgid "Please select a file."
msgctxt "object state"
msgid "extended selectable"
-msgstr "Sélectionnez un fichier."
+msgstr "avec sélection étendue"
#: dlls/oleacc/oleacc.rc:124
msgctxt "object state"
@@ -9066,7 +9035,6 @@ msgid "protected"
msgstr "protégé"
#: dlls/oleacc/oleacc.rc:128
-#, fuzzy
msgctxt "object state"
msgid "has popup"
msgstr "avec popup"
@@ -9118,7 +9086,7 @@ msgstr "Utiliser une chaîne de connexion"
#: dlls/oledb32/version.rc:75
msgid "&Connection string:"
-msgstr "&Chaîne de connexion"
+msgstr "&Chaîne de connexion :"
#: dlls/oledb32/version.rc:77
msgid "B&uild..."
@@ -9166,11 +9134,11 @@ msgstr "Niveau de protection :"
#: dlls/oledb32/version.rc:101
msgid "Connect:"
-msgstr "Connecté"
+msgstr "Connecté :"
#: dlls/oledb32/version.rc:103
msgid "seconds."
-msgstr "secondes"
+msgstr "secondes."
#: dlls/oledb32/version.rc:104
msgid "A&ccess:"
@@ -9186,17 +9154,15 @@ msgid ""
"value, select a property, then choose Edit Value below."
msgstr ""
"Voici les propriétés à initialiser pour ce type de données. Pour ce faire, "
-"sélectionnez une propriété, et appuyez sur « Modifier valeur... »"
+"sélectionnez une propriété, et appuyez sur « Modifier valeur... »."
#: dlls/oledb32/version.rc:115
msgid "&Edit Value..."
msgstr "&Modifier valeur..."
#: dlls/oledb32/version.rc:49
-#, fuzzy
-#| msgid "Properties"
msgid "Data Link Error"
-msgstr "Propriétés"
+msgstr "Erreur du lien vers les données"
#: dlls/oledb32/version.rc:50
msgid "Please select a provider."
@@ -9953,7 +9919,7 @@ msgstr "Wine est une réalisation de :"
#: dlls/shell32/shell32.rc:332
msgid "Run"
-msgstr "E&xécuter..."
+msgstr "E&xécuter"
#: dlls/shell32/shell32.rc:336
msgid ""
@@ -11196,32 +11162,24 @@ msgid "(UTC-05:00) Eastern Time (US & Canada)"
msgstr ""
#: dlls/tzres/tzres.rc:372
-#, fuzzy
-#| msgid "Date and time"
msgid "Transbaikal Standard Time"
-msgstr "Date et heure"
+msgstr "Heure du Transbaïkal"
#: dlls/tzres/tzres.rc:373
-#, fuzzy
-#| msgid "Date and time"
msgid "Transbaikal Daylight Time"
-msgstr "Date et heure"
+msgstr "Heure d'été du Transbaïkal"
#: dlls/tzres/tzres.rc:374
msgid "(UTC+09:00) Chita"
msgstr ""
#: dlls/tzres/tzres.rc:141
-#, fuzzy
-#| msgid "Central European"
msgid "E. Europe Standard Time"
-msgstr "Européen central"
+msgstr "Heure d'Europe de l'Est"
#: dlls/tzres/tzres.rc:142
-#, fuzzy
-#| msgid "Central European"
msgid "E. Europe Daylight Time"
-msgstr "Européen central"
+msgstr "Heure d'été d'Europe de l'Est"
#: dlls/tzres/tzres.rc:143
msgid "(UTC+02:00) Chisinau"
@@ -11684,14 +11642,12 @@ msgid "(UTC-04:00) Asuncion"
msgstr ""
#: dlls/tzres/tzres.rc:132
-#, fuzzy
-#| msgid "Date and time"
msgid "Dateline Standard Time"
-msgstr "Date et heure"
+msgstr "Heure de la ligne de changement de date"
#: dlls/tzres/tzres.rc:133
msgid "Dateline Daylight Time"
-msgstr ""
+msgstr "Heure d'été de la ligne de changement de date"
#: dlls/tzres/tzres.rc:134
msgid "(UTC-12:00) International Date Line West"
@@ -12221,7 +12177,7 @@ msgstr "Accès refusé"
#: dlls/vbscript/vbscript.rc:41
msgid "Path/File access error"
-msgstr ""
+msgstr "Erreur d'accès au chemin / fichier"
#: dlls/vbscript/vbscript.rc:42
msgid "Path not found"
@@ -12428,7 +12384,7 @@ msgstr "L'URL est invalide.\n"
#: dlls/wininet/winineterror.mc:41
msgid "The URL scheme could not be recognized or is not supported.\n"
-msgstr ""
+msgstr "Le schéma d'URL n'a été reconnu ou n'est pas pris en charge.\n"
#: dlls/wininet/winineterror.mc:46
msgid "The server name could not be resolved.\n"
@@ -12460,11 +12416,11 @@ msgstr ""
msgid ""
"SSL certificate date that was received from the server is bad. The "
"certificate is expired.\n"
-msgstr ""
+msgstr "La date du certificat SSL reçu du serveur est incorrecte : le certificat n'est plus valide.\n"
#: dlls/wininet/winineterror.mc:81
msgid "SSL certificate common name (host name field) is incorrect.\n"
-msgstr ""
+msgstr "Le nom commun (champ host name) du certificat SSL est incorrect.\n"
#: dlls/winmm/winmm.rc:32
msgid "The specified command was carried out."
@@ -13172,10 +13128,8 @@ msgid "Confidentiality Required"
msgstr "Confidentialité requise"
#: dlls/wldap32/wldap32.rc:46
-#, fuzzy
-#| msgid "Shutdown in progress.\n"
msgid "SASL Bind in Progress"
-msgstr "Arrêt du système en cours.\n"
+msgstr "Liaison SASL en cours"
#: dlls/wldap32/wldap32.rc:48
msgid "No Such Attribute"
@@ -14488,7 +14442,7 @@ msgid ""
"the window."
msgstr ""
"La taille du tampon écran doit être plus grande ou égale à celle du tampon "
-"de la fenêtre"
+"de la fenêtre."
#: programs/conhost/conhost.rc:41
msgid "Each character is %1!u! pixels wide and %2!u! pixels high"
@@ -15793,7 +15747,7 @@ msgid ""
msgstr ""
"REG ADD <key> [/v value_name | /ve] [/t type] [/s separator] [/d data] [/f]\n"
"\n"
-" Ajoute un clé au registre ou ajoute une nouvelle valeur à une clé de\n"
+" Ajoute une clé au registre ou ajoute une nouvelle valeur à une clé de\n"
" registre donnée.\n"
"\n"
" <key>\n"
@@ -16491,7 +16445,7 @@ msgstr "Impossible de modifier la clé de registre sélectionnée."
#: programs/regedit/regedit.rc:248
msgid "Unable to create a new registry key."
-msgstr "Impossible de créer un nouvelle clé de registre."
+msgstr "Impossible de créer une nouvelle clé de registre."
#: programs/regedit/regedit.rc:249
msgid "Unable to create a new registry value."
@@ -18145,11 +18099,11 @@ msgstr "&native (Windows)"
#: programs/winecfg/winecfg.rc:210
msgid "Buil&tin then Native"
-msgstr "i&ntégrée puis native"
+msgstr "I&ntégrée puis Native."
#: programs/winecfg/winecfg.rc:211
msgid "Nati&ve then Builtin"
-msgstr "n&ative puis intégrée"
+msgstr "N&ative puis Intégrée"
#: programs/winecfg/winecfg.rc:219
msgid "Select Drive Letter"
1
0
[PATCH] ddraw/tests: Port tests for fullscreen window size reset from d3d9.
by Paul Gofman Jan. 3, 2022
by Paul Gofman Jan. 3, 2022
Jan. 3, 2022
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
This is a follow up for commit 78533e9e94d4fcae06dd44d29dbed4755d4ac1f4
porting the same test for ddraw. Altough the test result is different,
ddraw doesn't seem to do the same.
What I think is going on in d3d9 (deserves a separate test which I don't have
yet ready) is that d3d9 window hook sends WM_ACTIVATEAPP
whenever it receives WM_SIZE event (dumping messages in flush_events() show
that). Then, WM_ACTIVATEAPP is already processed the way it restores the window
size in Wine but it probably should also remeber the "activated" state and then
the second resize also won't have an effect.
dlls/ddraw/tests/ddraw1.c | 40 ++++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw2.c | 40 ++++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw4.c | 40 ++++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw7.c | 40 ++++++++++++++++++++++++++++++++++++++-
4 files changed, 156 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index c9f2aead75c..11c14777122 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -14191,7 +14191,7 @@ static void test_vtbl_protection(void)
static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *monitor_rect,
LPARAM lparam)
{
- RECT primary_rect, window_rect;
+ RECT primary_rect, window_rect, new_rect;
IDirectDraw *ddraw;
HWND window;
HRESULT hr;
@@ -14214,6 +14214,44 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n",
wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
+ new_rect = window_rect;
+ --new_rect.right;
+ --new_rect.bottom;
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ /* After processing window events window rectangle gets restored. But only once, the size set
+ * on the second resize remains. */
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine
+ * it may get adjusted depending on window manager. */
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
/* Window activation should restore the window to fit the whole primary monitor */
ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0,
SWP_NOZORDER | SWP_NOSIZE);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 7285c1c3a88..33ad957b644 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -15115,7 +15115,7 @@ done:
static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *monitor_rect,
LPARAM lparam)
{
- RECT primary_rect, window_rect;
+ RECT primary_rect, window_rect, new_rect;
IDirectDraw2 *ddraw;
HWND window;
HRESULT hr;
@@ -15138,6 +15138,44 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n",
wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
+ new_rect = window_rect;
+ --new_rect.right;
+ --new_rect.bottom;
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ /* After processing window events window rectangle gets restored. But only once, the size set
+ * on the second resize remains. */
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine
+ * it may get adjusted depending on window manager. */
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
/* Window activation should restore the window to fit the whole primary monitor */
ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0,
SWP_NOZORDER | SWP_NOSIZE);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 07afc44e519..61828430331 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -18152,7 +18152,7 @@ done:
static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *monitor_rect,
LPARAM lparam)
{
- RECT primary_rect, window_rect;
+ RECT primary_rect, window_rect, new_rect;
IDirectDraw4 *ddraw;
HWND window;
HRESULT hr;
@@ -18175,6 +18175,44 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n",
wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
+ new_rect = window_rect;
+ --new_rect.right;
+ --new_rect.bottom;
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ /* After processing window events window rectangle gets restored. But only once, the size set
+ * on the second resize remains. */
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine
+ * it may get adjusted depending on window manager. */
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
/* Window activation should restore the window to fit the whole primary monitor */
ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0,
SWP_NOZORDER | SWP_NOSIZE);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 29fa3434d4b..fc0f854e125 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -18419,7 +18419,7 @@ done:
static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *monitor_rect,
LPARAM lparam)
{
- RECT primary_rect, window_rect;
+ RECT primary_rect, window_rect, new_rect;
IDirectDraw7 *ddraw;
HWND window;
HRESULT hr;
@@ -18442,6 +18442,44 @@ static BOOL CALLBACK test_window_position_cb(HMONITOR monitor, HDC hdc, RECT *mo
ok(EqualRect(&window_rect, &primary_rect), "Expect window rect %s, got %s.\n",
wine_dbgstr_rect(&primary_rect), wine_dbgstr_rect(&window_rect));
+ new_rect = window_rect;
+ --new_rect.right;
+ --new_rect.bottom;
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ /* After processing window events window rectangle gets restored. But only once, the size set
+ * on the second resize remains. */
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ /* Both Windows and Wine change the size of the window. On Windows it is exactly the new size but in Wine
+ * it may get adjusted depending on window manager. */
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
+ ret = MoveWindow(window, new_rect.left, new_rect.top, new_rect.right - new_rect.left,
+ new_rect.bottom - new_rect.top, TRUE);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(EqualRect(&window_rect, &new_rect),
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+ flush_events();
+ ret = GetWindowRect(window, &window_rect);
+ ok(ret, "Got unexpected ret %#x, error %#x.\n", ret, GetLastError());
+ ok(window_rect.right != monitor_rect->right && window_rect.bottom != monitor_rect->bottom,
+ "Expected window rect %s, got %s.\n",
+ wine_dbgstr_rect(monitor_rect), wine_dbgstr_rect(&window_rect));
+
/* Window activation should restore the window to fit the whole primary monitor */
ret = SetWindowPos(window, 0, monitor_rect->left, monitor_rect->top, 0, 0,
SWP_NOZORDER | SWP_NOSIZE);
--
2.33.1
3
2
[PATCH] wined3d: Fix memory leak on error path in wined3d_buffer_vk_create_buffer_object (Coverity)
by Alex Henrie Jan. 3, 2022
by Alex Henrie Jan. 3, 2022
Jan. 3, 2022
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/wined3d/buffer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index c078ba7e634..b42c7bd919a 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1498,6 +1498,7 @@ static BOOL wined3d_buffer_vk_create_buffer_object(struct wined3d_buffer_vk *buf
vk_memory_type_from_access_flags(resource->access, resource->usage), bo_vk)))
{
WARN("Failed to create Vulkan buffer.\n");
+ heap_free(bo_vk);
return FALSE;
}
--
2.34.1
2
1
[PATCH] dbghelp: don't use .debug_frame section if non present when unwinding
by Eric Pouech Jan. 3, 2022
by Eric Pouech Jan. 3, 2022
Jan. 3, 2022
fixes: https://bugs.winehq.org/show_bug.cgi?id=52295
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/dbghelp/dwarf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 70613317966..ea70fd915b4 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -3795,7 +3795,8 @@ static BOOL dwarf2_fetch_frame_info(struct module* module, struct cpu* cpu, LONG
fde_ctx.data = modfmt->u.dwarf2_info->debug_frame.address;
fde_ctx.end_data = fde_ctx.data + modfmt->u.dwarf2_info->debug_frame.size;
delta = module->reloc_delta;
- if (!dwarf2_get_cie(ip, module, delta, &fde_ctx, &cie_ctx, info, FALSE))
+ if (modfmt->u.dwarf2_info->debug_frame.address == IMAGE_NO_MAP ||
+ !dwarf2_get_cie(ip, module, delta, &fde_ctx, &cie_ctx, info, FALSE))
{
TRACE("Couldn't find information for %lx\n", ip);
return FALSE;
1
0
[PATCH 1/4] dinput8/tests: Test simple joystick with older dinput versions.
by Rémi Bernon Jan. 3, 2022
by Rémi Bernon Jan. 3, 2022
Jan. 3, 2022
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
This will overflow the test output limit on Wine, and I'm not sure what
to do about it. I don't think there's an unusually large number of todos
but the number of tests in this file simply has grow very large.
I can split the tests into individual files, if that's better, but I
believe it will make some of the tests run less often if they aren't
touched, which may not be desirable.
dlls/dinput8/tests/hid.c | 464 ++++++++++++++++++++++++++++-----------
1 file changed, 335 insertions(+), 129 deletions(-)
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index 82657c2e235..17559c61a39 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -3350,8 +3350,11 @@ static BOOL CALLBACK find_test_device( const DIDEVICEINSTANCEW *devinst, void *c
struct check_objects_todos
{
BOOL type;
+ BOOL ofs;
BOOL guid;
+ BOOL flags;
BOOL usage;
+ BOOL usage_page;
BOOL name;
};
@@ -3388,16 +3391,18 @@ static BOOL CALLBACK check_objects( const DIDEVICEOBJECTINSTANCEW *obj, void *ar
check_member( *obj, *exp, "%u", dwSize );
todo_wine_if( todo->guid )
check_member_guid( *obj, *exp, guidType );
- todo_wine_if( params->version < 0x700 && (obj->dwType & DIDFT_BUTTON) )
+ todo_wine_if( todo->ofs )
check_member( *obj, *exp, "%#x", dwOfs );
todo_wine_if( todo->type )
check_member( *obj, *exp, "%#x", dwType );
+ todo_wine_if( todo->flags )
check_member( *obj, *exp, "%#x", dwFlags );
if (!localized) todo_wine_if( todo->name )check_member_wstr( *obj, *exp, tszName );
check_member( *obj, *exp, "%u", dwFFMaxForce );
check_member( *obj, *exp, "%u", dwFFForceResolution );
check_member( *obj, *exp, "%u", wCollectionNumber );
check_member( *obj, *exp, "%u", wDesignatorIndex );
+ todo_wine_if( todo->usage_page )
check_member( *obj, *exp, "%#04x", wUsagePage );
todo_wine_if( todo->usage )
check_member( *obj, *exp, "%#04x", wUsage );
@@ -3681,7 +3686,7 @@ static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst,
return DI_OK;
}
-static void test_simple_joystick(void)
+static void test_simple_joystick( DWORD version )
{
#include "psh_hid_macros.h"
static const unsigned char report_desc[] =
@@ -3737,11 +3742,12 @@ static void test_simple_joystick(void)
{
.InputReportByteLength = 9,
};
- static const DIDEVCAPS expect_caps =
+ const DIDEVCAPS expect_caps =
{
.dwSize = sizeof(DIDEVCAPS),
.dwFlags = DIDC_ATTACHED | DIDC_EMULATED,
- .dwDevType = DIDEVTYPE_HID | (DI8DEVTYPEJOYSTICK_LIMITED << 8) | DI8DEVTYPE_JOYSTICK,
+ .dwDevType = version >= 0x800 ? DIDEVTYPE_HID | (DI8DEVTYPEJOYSTICK_LIMITED << 8) | DI8DEVTYPE_JOYSTICK
+ : DIDEVTYPE_HID | (DIDEVTYPEJOYSTICK_RUDDER << 8) | DIDEVTYPE_JOYSTICK,
.dwAxes = 6,
.dwPOVs = 1,
.dwButtons = 2,
@@ -3826,7 +3832,8 @@ static void test_simple_joystick(void)
.dwSize = sizeof(DIDEVICEINSTANCEW),
.guidInstance = expect_guid_product,
.guidProduct = expect_guid_product,
- .dwDevType = DIDEVTYPE_HID | (DI8DEVTYPEJOYSTICK_LIMITED << 8) | DI8DEVTYPE_JOYSTICK,
+ .dwDevType = version >= 0x800 ? DIDEVTYPE_HID | (DI8DEVTYPEJOYSTICK_LIMITED << 8) | DI8DEVTYPE_JOYSTICK
+ : DIDEVTYPE_HID | (DIDEVTYPEJOYSTICK_RUDDER << 8) | DIDEVTYPE_JOYSTICK,
.tszInstanceName = L"Wine test root driver",
.tszProductName = L"Wine test root driver",
.guidFFDriver = GUID_NULL,
@@ -3954,14 +3961,110 @@ static void test_simple_joystick(void)
.wUsage = HID_USAGE_GENERIC_JOYSTICK,
},
};
- const DIEFFECTINFOW expect_effects[] = {};
-
+ const DIDEVICEOBJECTINSTANCEW expect_objects_5[] =
+ {
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_XAxis,
+ .dwOfs = DIJOFS_X,
+ .dwType = DIDFT_ABSAXIS|DIDFT_MAKEINSTANCE(0),
+ .dwFlags = DIDOI_ASPECTPOSITION,
+ .tszName = L"X Axis",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_GENERIC,
+ .wUsage = HID_USAGE_GENERIC_X,
+ .wReportId = 1,
+ },
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_YAxis,
+ .dwOfs = DIJOFS_Y,
+ .dwType = DIDFT_ABSAXIS|DIDFT_MAKEINSTANCE(1),
+ .dwFlags = DIDOI_ASPECTPOSITION,
+ .tszName = L"Y Axis",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_GENERIC,
+ .wUsage = HID_USAGE_GENERIC_Y,
+ .wReportId = 1,
+ },
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_ZAxis,
+ .dwOfs = DIJOFS_Z,
+ .dwType = DIDFT_ABSAXIS|DIDFT_MAKEINSTANCE(2),
+ .dwFlags = DIDOI_ASPECTPOSITION,
+ .tszName = L"Wheel",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_GENERIC,
+ .wUsage = HID_USAGE_GENERIC_WHEEL,
+ .wReportId = 1,
+ },
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_RzAxis,
+ .dwOfs = DIJOFS_RZ,
+ .dwType = DIDFT_ABSAXIS|DIDFT_MAKEINSTANCE(5),
+ .dwFlags = DIDOI_ASPECTPOSITION,
+ .tszName = L"Rudder",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_SIMULATION,
+ .wUsage = HID_USAGE_SIMULATION_RUDDER,
+ .wReportId = 1,
+ },
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_POV,
+ .dwOfs = DIJOFS_POV(0),
+ .dwType = DIDFT_POV|DIDFT_MAKEINSTANCE(0),
+ .tszName = L"Hat Switch",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_GENERIC,
+ .wUsage = HID_USAGE_GENERIC_HATSWITCH,
+ .wReportId = 1,
+ },
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_Button,
+ .dwOfs = DIJOFS_BUTTON(0),
+ .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(0),
+ .tszName = L"Button 0",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_BUTTON,
+ .wUsage = 0x1,
+ .wReportId = 1,
+ },
+ {
+ .dwSize = sizeof(DIDEVICEOBJECTINSTANCEW),
+ .guidType = GUID_Button,
+ .dwOfs = DIJOFS_BUTTON(1),
+ .dwType = DIDFT_PSHBUTTON|DIDFT_MAKEINSTANCE(1),
+ .tszName = L"Button 1",
+ .wCollectionNumber = 1,
+ .wUsagePage = HID_USAGE_PAGE_BUTTON,
+ .wUsage = 0x2,
+ .wReportId = 1,
+ },
+ };
+ struct check_objects_todos todo_objects_5[ARRAY_SIZE(expect_objects_5)] =
+ {
+ {.guid = TRUE, .type = TRUE, .flags = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE},
+ {.guid = TRUE, .type = TRUE, .flags = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE},
+ {.guid = TRUE, .type = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE},
+ {.guid = TRUE, .ofs = TRUE, .type = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE},
+ {.guid = TRUE, .ofs = TRUE, .type = TRUE, .flags = TRUE, .usage = TRUE, .name = TRUE},
+ {.guid = TRUE, .ofs = TRUE, .type = TRUE, .flags = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE},
+ {.guid = TRUE, .ofs = TRUE, .type = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE},
+ };
struct check_objects_params check_objects_params =
{
- .version = DIRECTINPUT_VERSION,
- .expect_count = ARRAY_SIZE(expect_objects),
- .expect_objs = expect_objects,
+ .version = version,
+ .expect_count = version < 0x700 ? ARRAY_SIZE(expect_objects_5) : ARRAY_SIZE(expect_objects),
+ .expect_objs = version < 0x700 ? expect_objects_5 : expect_objects,
+ .todo_objs = version < 0x700 ? todo_objects_5 : NULL,
+ .todo_extra = version < 0x700 ? TRUE : FALSE,
};
+
+ const DIEFFECTINFOW expect_effects[] = {};
struct check_effects_params check_effects_params =
{
.expect_count = ARRAY_SIZE(expect_effects),
@@ -4015,44 +4118,55 @@ static void test_simple_joystick(void)
WCHAR cwd[MAX_PATH], tempdir[MAX_PATH];
DIDEVICEOBJECTDATA objdata[32] = {{0}};
DIDEVICEOBJECTINSTANCEW objinst = {0};
+ DIDEVICEOBJECTINSTANCEW expect_obj;
DIDEVICEINSTANCEW devinst = {0};
DIEFFECTINFOW effectinfo = {0};
DIDATAFORMAT dataformat = {0};
IDirectInputDevice8W *device;
IDirectInputEffect *effect;
DIEFFESCAPE escape = {0};
+ ULONG i, size, res, ref;
DIDEVCAPS caps = {0};
HANDLE event, file;
char buffer[1024];
DIJOYSTATE2 state;
- ULONG i, res, ref;
HRESULT hr;
WCHAR *tmp;
GUID guid;
HWND hwnd;
+ winetest_push_context( "version %#x", version );
+
GetCurrentDirectoryW( ARRAY_SIZE(cwd), cwd );
GetTempPathW( ARRAY_SIZE(tempdir), tempdir );
SetCurrentDirectoryW( tempdir );
cleanup_registry_keys();
if (!dinput_driver_start( report_desc, sizeof(report_desc), &hid_caps, NULL, 0 )) goto done;
- if (FAILED(hr = create_dinput_device( DIRECTINPUT_VERSION, &devinst, &device ))) goto done;
+ if (FAILED(hr = create_dinput_device( version, &devinst, &device ))) goto done;
- hr = IDirectInputDevice8_Initialize( device, instance, 0x0700, &GUID_NULL );
- todo_wine
- ok( hr == DIERR_BETADIRECTINPUTVERSION, "Initialize returned %#x\n", hr );
- hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, NULL );
+ hr = IDirectInputDevice8_Initialize( device, instance, 0x800 - (version - 0x700), &GUID_NULL );
+ if (version == 0x800)
+ {
+ todo_wine
+ ok( hr == DIERR_BETADIRECTINPUTVERSION, "Initialize returned %#x\n", hr );
+ }
+ else
+ {
+ todo_wine
+ ok( hr == DIERR_OLDDIRECTINPUTVERSION, "Initialize returned %#x\n", hr );
+ }
+ hr = IDirectInputDevice8_Initialize( device, instance, version, NULL );
todo_wine
ok( hr == E_POINTER, "Initialize returned %#x\n", hr );
- hr = IDirectInputDevice8_Initialize( device, NULL, DIRECTINPUT_VERSION, &GUID_NULL );
+ hr = IDirectInputDevice8_Initialize( device, NULL, version, &GUID_NULL );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "Initialize returned %#x\n", hr );
- hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, &GUID_NULL );
+ hr = IDirectInputDevice8_Initialize( device, instance, version, &GUID_NULL );
todo_wine
ok( hr == REGDB_E_CLASSNOTREG, "Initialize returned %#x\n", hr );
- hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, &devinst.guidInstance );
+ hr = IDirectInputDevice8_Initialize( device, instance, version, &devinst.guidInstance );
ok( hr == DI_OK, "Initialize returned %#x\n", hr );
guid = devinst.guidInstance;
memset( &devinst, 0, sizeof(devinst) );
@@ -4061,7 +4175,7 @@ static void test_simple_joystick(void)
ok( hr == DI_OK, "GetDeviceInfo returned %#x\n", hr );
ok( IsEqualGUID( &guid, &devinst.guidInstance ), "got %s expected %s\n", debugstr_guid( &guid ),
debugstr_guid( &devinst.guidInstance ) );
- hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, &devinst.guidProduct );
+ hr = IDirectInputDevice8_Initialize( device, instance, version, &devinst.guidProduct );
ok( hr == DI_OK, "Initialize returned %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceInfo( device, NULL );
@@ -4076,6 +4190,7 @@ static void test_simple_joystick(void)
todo_wine
check_member_guid( devinst, expect_devinst, guidInstance );
check_member_guid( devinst, expect_devinst, guidProduct );
+ todo_wine_if( version < 0x0800 )
check_member( devinst, expect_devinst, "%#x", dwDevType );
todo_wine
check_member_wstr( devinst, expect_devinst, tszInstanceName );
@@ -4090,6 +4205,7 @@ static void test_simple_joystick(void)
todo_wine
check_member_guid( devinst, expect_devinst, guidInstance );
check_member_guid( devinst, expect_devinst, guidProduct );
+ todo_wine_if( version < 0x0800 )
check_member( devinst, expect_devinst, "%#x", dwDevType );
todo_wine
check_member_wstr( devinst, expect_devinst, tszInstanceName );
@@ -4108,6 +4224,7 @@ static void test_simple_joystick(void)
ok( hr == DI_OK, "GetCapabilities returned %#x\n", hr );
check_member( caps, expect_caps, "%d", dwSize );
check_member( caps, expect_caps, "%#x", dwFlags );
+ todo_wine_if( version < 0x0800 )
check_member( caps, expect_caps, "%#x", dwDevType );
check_member( caps, expect_caps, "%d", dwAxes );
check_member( caps, expect_caps, "%d", dwButtons );
@@ -4125,7 +4242,9 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, NULL );
ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_string.diph );
- ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_INVALIDPARAM),
+ "GetProperty DIPROP_VIDPID returned %#x\n", hr );
prop_dword.diph.dwHeaderSize = sizeof(DIPROPHEADER) - 1;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
@@ -4133,8 +4252,14 @@ static void test_simple_joystick(void)
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
- ok( hr == DI_OK, "GetProperty DIPROP_VIDPID returned %#x\n", hr );
- ok( prop_dword.dwData == EXPECT_VIDPID, "got %#x expected %#x\n", prop_dword.dwData, EXPECT_VIDPID );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_OK),
+ "GetProperty DIPROP_VIDPID returned %#x\n", hr );
+ if (hr == DI_OK)
+ {
+ ok( prop_dword.dwData == EXPECT_VIDPID, "got %#x expected %#x\n",
+ prop_dword.dwData, EXPECT_VIDPID );
+ }
hr = IDirectInputDevice8_GetProperty( device, DIPROP_GUIDANDPATH, &prop_guid_path.diph );
ok( hr == DI_OK, "GetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
@@ -4163,14 +4288,23 @@ static void test_simple_joystick(void)
ok( !wcscmp( prop_string.wsz, expect_devinst.tszProductName ), "got product %s\n",
debugstr_w(prop_string.wsz) );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_TYPENAME, &prop_string.diph );
- todo_wine
- ok( hr == DI_OK, "GetProperty DIPROP_TYPENAME returned %#x\n", hr );
- todo_wine
- ok( !wcscmp( prop_string.wsz, expect_vidpid_str ), "got type %s\n", debugstr_w(prop_string.wsz) );
+ todo_wine_if( version >= 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_OK),
+ "GetProperty DIPROP_TYPENAME returned %#x\n", hr );
+ if (hr == DI_OK)
+ {
+ todo_wine
+ ok( !wcscmp( prop_string.wsz, expect_vidpid_str ), "got type %s\n", debugstr_w(prop_string.wsz) );
+ }
hr = IDirectInputDevice8_GetProperty( device, DIPROP_USERNAME, &prop_string.diph );
- ok( hr == S_FALSE, "GetProperty DIPROP_USERNAME returned %#x\n", hr );
- todo_wine
- ok( !wcscmp( prop_string.wsz, L"" ), "got user %s\n", debugstr_w(prop_string.wsz) );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_NOEFFECT),
+ "GetProperty DIPROP_USERNAME returned %#x\n", hr );
+ if (hr == DI_NOEFFECT)
+ {
+ todo_wine
+ ok( !wcscmp( prop_string.wsz, L"" ), "got user %s\n", debugstr_w(prop_string.wsz) );
+ }
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_JOYSTICKID, &prop_dword.diph );
@@ -4210,7 +4344,9 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_RANGE returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_KEYNAME, &prop_string.diph );
- ok( hr == DIERR_INVALIDPARAM, "GetProperty DIPROP_KEYNAME returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_INVALIDPARAM),
+ "GetProperty DIPROP_KEYNAME returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_LOGICALRANGE, &prop_range.diph );
ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_LOGICALRANGE returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_PHYSICALRANGE, &prop_range.diph );
@@ -4238,9 +4374,14 @@ static void test_simple_joystick(void)
prop_string.diph.dwHow = DIPH_BYUSAGE;
prop_string.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_KEYNAME, &prop_string.diph );
- ok( hr == DI_OK, "GetProperty DIPROP_KEYNAME returned %#x\n", hr );
- ok( !wcscmp( prop_string.wsz, expect_objects[4].tszName ), "got DIPROP_KEYNAME %s\n",
- debugstr_w( prop_string.wsz ) );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_OK),
+ "GetProperty DIPROP_KEYNAME returned %#x\n", hr );
+ if (hr == DI_OK)
+ {
+ ok( !wcscmp( prop_string.wsz, expect_objects[4].tszName ), "got DIPROP_KEYNAME %s\n",
+ debugstr_w( prop_string.wsz ) );
+ }
prop_string.diph.dwObj = MAKELONG( 0x1, HID_USAGE_PAGE_BUTTON );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_KEYNAME, &prop_string.diph );
todo_wine
@@ -4255,7 +4396,9 @@ static void test_simple_joystick(void)
prop_range.lMin = 0xdeadbeef;
prop_range.lMax = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_NOTFOUND, "GetProperty DIPROP_RANGE returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DI_OK : DIERR_NOTFOUND),
+ "GetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwObj = MAKELONG( 0, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
ok( hr == DIERR_NOTFOUND, "GetProperty DIPROP_RANGE returned %#x\n", hr );
@@ -4270,19 +4413,33 @@ static void test_simple_joystick(void)
ok( prop_range.lMin == 0, "got %d expected %d\n", prop_range.lMin, 0 );
ok( prop_range.lMax == 65535, "got %d expected %d\n", prop_range.lMax, 65535 );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_LOGICALRANGE, &prop_range.diph );
- ok( hr == DI_OK, "GetProperty DIPROP_LOGICALRANGE returned %#x\n", hr );
- ok( prop_range.lMin == -25, "got %d expected %d\n", prop_range.lMin, -25 );
- ok( prop_range.lMax == 56, "got %d expected %d\n", prop_range.lMax, 56 );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_OK),
+ "GetProperty DIPROP_LOGICALRANGE returned %#x\n", hr );
+ if (hr == DI_OK)
+ {
+ ok( prop_range.lMin == -25, "got %d expected %d\n", prop_range.lMin, -25 );
+ ok( prop_range.lMax == 56, "got %d expected %d\n", prop_range.lMax, 56 );
+ }
hr = IDirectInputDevice8_GetProperty( device, DIPROP_PHYSICALRANGE, &prop_range.diph );
- ok( hr == DI_OK, "GetProperty DIPROP_PHYSICALRANGE returned %#x\n", hr );
- ok( prop_range.lMin == -25, "got %d expected %d\n", prop_range.lMin, -25 );
- ok( prop_range.lMax == 56, "got %d expected %d\n", prop_range.lMax, 56 );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_OK),
+ "GetProperty DIPROP_PHYSICALRANGE returned %#x\n", hr );
+ if (hr == DI_OK)
+ {
+ ok( prop_range.lMin == -25, "got %d expected %d\n", prop_range.lMin, -25 );
+ ok( prop_range.lMax == 56, "got %d expected %d\n", prop_range.lMax, 56 );
+ }
prop_pointer.diph.dwHow = DIPH_BYUSAGE;
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
- todo_wine
- ok( hr == DIERR_NOTINITIALIZED, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
+ if (version < 0x0800) ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
+ else
+ {
+ todo_wine
+ ok( hr == DIERR_NOTINITIALIZED, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
+ }
hr = IDirectInputDevice8_EnumObjects( device, NULL, NULL, DIDFT_ALL );
ok( hr == DIERR_INVALIDPARAM, "EnumObjects returned %#x\n", hr );
@@ -4291,7 +4448,8 @@ static void test_simple_joystick(void)
res = 0;
hr = IDirectInputDevice8_EnumObjects( device, check_object_count, &res, DIDFT_AXIS | DIDFT_PSHBUTTON );
ok( hr == DI_OK, "EnumObjects returned %#x\n", hr );
- ok( res == 8, "got %u expected %u\n", res, 8 );
+ todo_wine_if( version < 0x0700 )
+ ok( res == (version < 0x0700 ? 6 : 8), "got %u objects\n", res );
hr = IDirectInputDevice8_EnumObjects( device, check_objects, &check_objects_params, DIDFT_ALL );
ok( hr == DI_OK, "EnumObjects returned %#x\n", hr );
ok( check_objects_params.index >= check_objects_params.expect_count, "missing %u objects\n",
@@ -4307,26 +4465,30 @@ static void test_simple_joystick(void)
res = MAKELONG( HID_USAGE_GENERIC_Z, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYUSAGE );
- ok( hr == DIERR_NOTFOUND, "GetObjectInfo returned: %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DI_OK : DIERR_NOTFOUND), "GetObjectInfo returned: %#x\n", hr );
res = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYUSAGE );
ok( hr == DI_OK, "GetObjectInfo returned: %#x\n", hr );
- check_member( objinst, expect_objects[4], "%u", dwSize );
- check_member_guid( objinst, expect_objects[4], guidType );
- check_member( objinst, expect_objects[4], "%#x", dwOfs );
- check_member( objinst, expect_objects[4], "%#x", dwType );
- check_member( objinst, expect_objects[4], "%#x", dwFlags );
- if (!localized) check_member_wstr( objinst, expect_objects[4], tszName );
- check_member( objinst, expect_objects[4], "%u", dwFFMaxForce );
- check_member( objinst, expect_objects[4], "%u", dwFFForceResolution );
- check_member( objinst, expect_objects[4], "%u", wCollectionNumber );
- check_member( objinst, expect_objects[4], "%u", wDesignatorIndex );
- check_member( objinst, expect_objects[4], "%#04x", wUsagePage );
- check_member( objinst, expect_objects[4], "%#04x", wUsage );
- check_member( objinst, expect_objects[4], "%#04x", dwDimension );
- check_member( objinst, expect_objects[4], "%#04x", wExponent );
- check_member( objinst, expect_objects[4], "%u", wReportId );
+ if (version < 0x0700) expect_obj = expect_objects_5[0];
+ else expect_obj = expect_objects[4];
+ check_member( objinst, expect_obj, "%u", dwSize );
+ check_member_guid( objinst, expect_obj, guidType );
+ todo_wine_if( version < 0x0700 )
+ check_member( objinst, expect_obj, "%#x", dwOfs );
+ check_member( objinst, expect_obj, "%#x", dwType );
+ check_member( objinst, expect_obj, "%#x", dwFlags );
+ if (!localized) check_member_wstr( objinst, expect_obj, tszName );
+ check_member( objinst, expect_obj, "%u", dwFFMaxForce );
+ check_member( objinst, expect_obj, "%u", dwFFForceResolution );
+ check_member( objinst, expect_obj, "%u", wCollectionNumber );
+ check_member( objinst, expect_obj, "%u", wDesignatorIndex );
+ check_member( objinst, expect_obj, "%#04x", wUsagePage );
+ check_member( objinst, expect_obj, "%#04x", wUsage );
+ check_member( objinst, expect_obj, "%#04x", dwDimension );
+ check_member( objinst, expect_obj, "%#04x", wExponent );
+ check_member( objinst, expect_obj, "%u", wReportId );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, 0x14, DIPH_BYOFFSET );
ok( hr == DIERR_NOTFOUND, "GetObjectInfo returned: %#x\n", hr );
@@ -4339,21 +4501,24 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYID );
ok( hr == DI_OK, "GetObjectInfo returned: %#x\n", hr );
- check_member( objinst, expect_objects[8], "%u", dwSize );
- check_member_guid( objinst, expect_objects[8], guidType );
- check_member( objinst, expect_objects[8], "%#x", dwOfs );
- check_member( objinst, expect_objects[8], "%#x", dwType );
- check_member( objinst, expect_objects[8], "%#x", dwFlags );
- if (!localized) check_member_wstr( objinst, expect_objects[8], tszName );
- check_member( objinst, expect_objects[8], "%u", dwFFMaxForce );
- check_member( objinst, expect_objects[8], "%u", dwFFForceResolution );
- check_member( objinst, expect_objects[8], "%u", wCollectionNumber );
- check_member( objinst, expect_objects[8], "%u", wDesignatorIndex );
- check_member( objinst, expect_objects[8], "%#04x", wUsagePage );
- check_member( objinst, expect_objects[8], "%#04x", wUsage );
- check_member( objinst, expect_objects[8], "%#04x", dwDimension );
- check_member( objinst, expect_objects[8], "%#04x", wExponent );
- check_member( objinst, expect_objects[8], "%u", wReportId );
+ if (version < 0x0700) expect_obj = expect_objects_5[6];
+ else expect_obj = expect_objects[8];
+ check_member( objinst, expect_obj, "%u", dwSize );
+ check_member_guid( objinst, expect_obj, guidType );
+ todo_wine_if( version < 0x0700 )
+ check_member( objinst, expect_obj, "%#x", dwOfs );
+ check_member( objinst, expect_obj, "%#x", dwType );
+ check_member( objinst, expect_obj, "%#x", dwFlags );
+ if (!localized) check_member_wstr( objinst, expect_obj, tszName );
+ check_member( objinst, expect_obj, "%u", dwFFMaxForce );
+ check_member( objinst, expect_obj, "%u", dwFFForceResolution );
+ check_member( objinst, expect_obj, "%u", wCollectionNumber );
+ check_member( objinst, expect_obj, "%u", wDesignatorIndex );
+ check_member( objinst, expect_obj, "%#04x", wUsagePage );
+ check_member( objinst, expect_obj, "%#04x", wUsage );
+ check_member( objinst, expect_obj, "%#04x", dwDimension );
+ check_member( objinst, expect_obj, "%#04x", wExponent );
+ check_member( objinst, expect_obj, "%u", wReportId );
hr = IDirectInputDevice8_EnumEffects( device, NULL, NULL, DIEFT_ALL );
ok( hr == DIERR_INVALIDPARAM, "EnumEffects returned %#x\n", hr );
@@ -4397,21 +4562,25 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, DIJOFS_Y, DIPH_BYOFFSET );
ok( hr == DI_OK, "GetObjectInfo returned: %#x\n", hr );
- check_member( objinst, expect_objects[3], "%u", dwSize );
- check_member_guid( objinst, expect_objects[3], guidType );
- check_member( objinst, expect_objects[3], "%#x", dwOfs );
- check_member( objinst, expect_objects[3], "%#x", dwType );
- check_member( objinst, expect_objects[3], "%#x", dwFlags );
- if (!localized) check_member_wstr( objinst, expect_objects[3], tszName );
- check_member( objinst, expect_objects[3], "%u", dwFFMaxForce );
- check_member( objinst, expect_objects[3], "%u", dwFFForceResolution );
- check_member( objinst, expect_objects[3], "%u", wCollectionNumber );
- check_member( objinst, expect_objects[3], "%u", wDesignatorIndex );
- check_member( objinst, expect_objects[3], "%#04x", wUsagePage );
- check_member( objinst, expect_objects[3], "%#04x", wUsage );
- check_member( objinst, expect_objects[3], "%#04x", dwDimension );
- check_member( objinst, expect_objects[3], "%#04x", wExponent );
- check_member( objinst, expect_objects[3], "%u", wReportId );
+ if (version < 0x0700) expect_obj = expect_objects_5[1];
+ else expect_obj = expect_objects[3];
+ if (version < 0x0800) expect_obj.dwOfs = DIJOFS_Y;
+ check_member( objinst, expect_obj, "%u", dwSize );
+ check_member_guid( objinst, expect_obj, guidType );
+ todo_wine_if( version < 0x0800 )
+ check_member( objinst, expect_obj, "%#x", dwOfs );
+ check_member( objinst, expect_obj, "%#x", dwType );
+ check_member( objinst, expect_obj, "%#x", dwFlags );
+ if (!localized) check_member_wstr( objinst, expect_obj, tszName );
+ check_member( objinst, expect_obj, "%u", dwFFMaxForce );
+ check_member( objinst, expect_obj, "%u", dwFFForceResolution );
+ check_member( objinst, expect_obj, "%u", wCollectionNumber );
+ check_member( objinst, expect_obj, "%u", wDesignatorIndex );
+ check_member( objinst, expect_obj, "%#04x", wUsagePage );
+ check_member( objinst, expect_obj, "%#04x", wUsage );
+ check_member( objinst, expect_obj, "%#04x", dwDimension );
+ check_member( objinst, expect_obj, "%#04x", wExponent );
+ check_member( objinst, expect_obj, "%u", wReportId );
hr = IDirectInputDevice8_SetEventNotification( device, (HANDLE)0xdeadbeef );
todo_wine
@@ -4472,7 +4641,8 @@ static void test_simple_joystick(void)
ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
hr = IDirectInputDevice8_Poll( device );
- ok( hr == DI_NOEFFECT, "Poll returned: %#x\n", hr );
+ todo_wine_if( version < 0x0700 )
+ ok( hr == (version < 0x0700 ? DI_OK : DI_NOEFFECT), "Poll returned: %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2) + 1, &state );
ok( hr == DIERR_INVALIDPARAM, "GetDeviceState returned: %#x\n", hr );
@@ -4516,11 +4686,16 @@ static void test_simple_joystick(void)
winetest_pop_context();
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA) - 1, objdata, &res, DIGDD_PEEK );
- todo_wine
- ok( hr == DIERR_INVALIDPARAM, "GetDeviceData returned %#x\n", hr );
+ size = version < 0x0800 ? sizeof(DIDEVICEOBJECTDATA_DX3) : sizeof(DIDEVICEOBJECTDATA);
+ hr = IDirectInputDevice8_GetDeviceData( device, size - 1, objdata, &res, DIGDD_PEEK );
+ if (version < 0x0800) ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
+ else
+ {
+ todo_wine
+ ok( hr == DIERR_INVALIDPARAM, "GetDeviceData returned %#x\n", hr );
+ }
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, DIGDD_PEEK );
ok( hr == DIERR_NOTBUFFERED, "GetDeviceData returned %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
@@ -4538,7 +4713,7 @@ static void test_simple_joystick(void)
ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, DIGDD_PEEK );
ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
@@ -4548,12 +4723,13 @@ static void test_simple_joystick(void)
ResetEvent( event );
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, DIGDD_PEEK );
+ todo_wine_if( version < 0x0800 )
ok( hr == DI_BUFFEROVERFLOW, "GetDeviceData returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
- todo_wine
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, 0 );
+ todo_wine_if( version >= 0x0800 )
ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
@@ -4573,22 +4749,23 @@ static void test_simple_joystick(void)
ResetEvent( event );
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, DIGDD_PEEK );
ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 1, "got %u expected %u\n", res, 1 );
check_member( objdata[0], expect_objdata[0], "%#x", dwOfs );
check_member( objdata[0], expect_objdata[0], "%#x", dwData );
- ok( objdata[0].uAppData == -1, "got %p, expected %p\n", (void *)objdata[0].uAppData, (void *)-1 );
+ if (version >= 0x0800) ok( objdata[0].uAppData == -1, "got %p\n", (void *)objdata[0].uAppData );
res = 4;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, 0 );
ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 4, "got %u expected %u\n", res, 4 );
for (i = 0; i < 4; ++i)
{
+ DIDEVICEOBJECTDATA *ptr = (DIDEVICEOBJECTDATA *)((char *)objdata + size * i);
winetest_push_context( "objdata[%d]", i );
- check_member( objdata[i], expect_objdata[1 + i], "%#x", dwOfs );
- check_member( objdata[i], expect_objdata[1 + i], "%#x", dwData );
- ok( objdata[i].uAppData == -1, "got %p, expected %p\n", (void *)objdata[i].uAppData, (void *)-1 );
+ check_member( *ptr, expect_objdata[1 + i], "%#x", dwOfs );
+ check_member( *ptr, expect_objdata[1 + i], "%#x", dwData );
+ if (version >= 0x0800) ok( ptr->uAppData == -1, "got %p\n", (void *)ptr->uAppData );
winetest_pop_context();
}
@@ -4602,26 +4779,28 @@ static void test_simple_joystick(void)
ResetEvent( event );
res = 1;
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, 0 );
+ todo_wine_if( version < 0x0800 )
ok( hr == DI_BUFFEROVERFLOW, "GetDeviceData returned %#x\n", hr );
ok( res == 1, "got %u expected %u\n", res, 1 );
todo_wine
check_member( objdata[0], expect_objdata[5], "%#x", dwOfs );
todo_wine
check_member( objdata[0], expect_objdata[5], "%#x", dwData );
- ok( objdata[0].uAppData == -1, "got %p, expected %p\n", (void *)objdata[0].uAppData, (void *)-1 );
+ if (version >= 0x0800) ok( objdata[0].uAppData == -1, "got %p\n", (void *)objdata[0].uAppData );
res = ARRAY_SIZE(objdata);
- hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
+ hr = IDirectInputDevice8_GetDeviceData( device, size, objdata, &res, 0 );
ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 8, "got %u expected %u\n", res, 8 );
for (i = 0; i < 8; ++i)
{
+ DIDEVICEOBJECTDATA *ptr = (DIDEVICEOBJECTDATA *)((char *)objdata + size * i);
winetest_push_context( "objdata[%d]", i );
todo_wine
- check_member( objdata[i], expect_objdata[6 + i], "%#x", dwOfs );
+ check_member( *ptr, expect_objdata[6 + i], "%#x", dwOfs );
todo_wine_if( i == 1 || i == 2 || i == 6 )
- check_member( objdata[i], expect_objdata[6 + i], "%#x", dwData );
- ok( objdata[i].uAppData == -1, "got %p, expected %p\n", (void *)objdata[i].uAppData, (void *)-1 );
+ check_member( *ptr, expect_objdata[6 + i], "%#x", dwData );
+ if (version >= 0x0800) ok( ptr->uAppData == -1, "got %p\n", (void *)ptr->uAppData );
winetest_pop_context();
}
@@ -4719,7 +4898,9 @@ static void test_simple_joystick(void)
ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].dwType = DIDFT_AXIS|DIDFT_MAKEINSTANCE( 0xff );
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
- ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
+ todo_wine_if( version < 0x0700 )
+ ok( hr == (version < 0x0700 ? DI_OK : DIERR_INVALIDPARAM),
+ "SetDataFormat returned: %#x\n", hr );
objdataformat[1].dwType = DIDFT_AXIS|DIDFT_MAKEINSTANCE( 1 );
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr );
@@ -4821,9 +5002,13 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_SetProperty( device, DIPROP_RANGE, &prop_range.diph );
ok( hr == DI_OK, "SetProperty DIPROP_RANGE returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_LOGICALRANGE, &prop_range.diph );
- ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_LOGICALRANGE returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_ACQUIRED),
+ "SetProperty DIPROP_LOGICALRANGE returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_PHYSICALRANGE, &prop_range.diph );
- ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_PHYSICALRANGE returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_ACQUIRED),
+ "SetProperty DIPROP_PHYSICALRANGE returned %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
@@ -4876,13 +5061,17 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_SetProperty( device, DIPROP_VIDPID, NULL );
ok( hr == DIERR_INVALIDPARAM, "SetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_VIDPID, &prop_string.diph );
- ok( hr == DIERR_INVALIDPARAM, "SetProperty returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_INVALIDPARAM),
+ "SetProperty DIPROP_VIDPID returned %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
- ok( hr == DIERR_READONLY, "SetProperty DIPROP_VIDPID returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_READONLY),
+ "SetProperty DIPROP_VIDPID returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_GUIDANDPATH, &prop_guid_path.diph );
ok( hr == DIERR_READONLY, "SetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
@@ -4903,9 +5092,13 @@ static void test_simple_joystick(void)
debugstr_w(prop_string.wsz) );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_TYPENAME, &prop_string.diph );
- ok( hr == DIERR_READONLY, "SetProperty DIPROP_TYPENAME returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_READONLY),
+ "SetProperty DIPROP_TYPENAME returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_USERNAME, &prop_string.diph );
- ok( hr == DIERR_READONLY, "SetProperty DIPROP_USERNAME returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_READONLY),
+ "SetProperty DIPROP_USERNAME returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
ok( hr == DIERR_READONLY, "SetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_GRANULARITY, &prop_dword.diph );
@@ -4924,7 +5117,8 @@ static void test_simple_joystick(void)
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
todo_wine
- ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_APPDATA returned %#x\n", hr );
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DIERR_ACQUIRED),
+ "SetProperty DIPROP_APPDATA returned %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
@@ -5039,8 +5233,8 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
winetest_push_context( "state[%d]", i );
- todo_wine
- ok( state.lX == 15, "got lX %d, expected %d\n" , state.lX, 15 );
+ todo_wine_if( version >= 0x0700 )
+ ok( state.lX == (version < 0x0700 ? -9000 : 15), "got lX %d\n", state.lX );
check_member( state, expect_state_abs[0], "%d", lY );
check_member( state, expect_state_abs[0], "%d", lZ );
check_member( state, expect_state_abs[0], "%d", lRx );
@@ -5076,7 +5270,9 @@ static void test_simple_joystick(void)
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
prop_pointer.uData = 0xfeedcafe;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
- ok( hr == DI_OK, "SetProperty DIPROP_APPDATA returned %#x\n", hr );
+ todo_wine_if( version < 0x0800 )
+ ok( hr == (version < 0x0800 ? DIERR_UNSUPPORTED : DI_OK),
+ "SetProperty DIPROP_APPDATA returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AXISMODE, &prop_dword.diph );
@@ -5103,9 +5299,13 @@ static void test_simple_joystick(void)
prop_pointer.diph.dwHow = DIPH_BYUSAGE;
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
- todo_wine
- ok( hr == DI_OK, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
- ok( prop_pointer.uData == 0xfeedcafe, "got %p expected %p\n", (void *)prop_pointer.uData, (void *)0xfeedcafe );
+ if (version < 0x0800) ok( hr == DIERR_UNSUPPORTED, "GetProperty returned %#x\n", hr );
+ else
+ {
+ todo_wine
+ ok( hr == DI_OK, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
+ ok( prop_pointer.uData == 0xfeedcafe, "got %p expected %p\n", (void *)prop_pointer.uData, (void *)0xfeedcafe );
+ }
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
@@ -5185,15 +5385,15 @@ static void test_simple_joystick(void)
objdata[0].dwOfs = 0xd;
objdata[0].dwData = 0x80;
res = 1;
- hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0xdeadbeef );
+ hr = IDirectInputDevice8_SendDeviceData( device, size, objdata, &res, 0xdeadbeef );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
res = 1;
- hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 1 /*DISDD_CONTINUE*/ );
+ hr = IDirectInputDevice8_SendDeviceData( device, size, objdata, &res, 1 /*DISDD_CONTINUE*/ );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
res = 1;
- hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
+ hr = IDirectInputDevice8_SendDeviceData( device, size, objdata, &res, 0 );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
@@ -5249,6 +5449,7 @@ done:
pnp_driver_stop();
cleanup_registry_keys();
SetCurrentDirectoryW( cwd );
+ winetest_pop_context();
}
struct device_desc
@@ -8035,6 +8236,8 @@ static void test_force_feedback_joystick( DWORD version )
{.guid = TRUE, .type = TRUE, .usage = TRUE, .name = TRUE},
{0},
{.guid = TRUE, .type = TRUE, .usage = TRUE, .name = TRUE},
+ {.ofs = TRUE},
+ {.ofs = TRUE},
};
struct check_objects_params check_objects_params =
{
@@ -10014,7 +10217,10 @@ START_TEST( hid )
test_device_types( 0x500 );
test_device_types( 0x700 );
- test_simple_joystick();
+ test_simple_joystick( 0x500 );
+ test_simple_joystick( 0x700 );
+ test_simple_joystick( 0x800 );
+
test_force_feedback_joystick( 0x500 );
test_force_feedback_joystick( 0x700 );
test_force_feedback_joystick( 0x800 );
--
2.34.1
2
7