Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- 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
March 2018
- 90 participants
- 1704 messages
[PATCH 5/5] usp10: Use heap_calloc() in ScriptLayout().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/usp10/usp10.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 4daba34..f2264a2 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3755,8 +3755,7 @@ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *log
if (!level || (!vistolog && !logtovis))
return E_INVALIDARG;
- indexs = heap_alloc(sizeof(int) * runs);
- if (!indexs)
+ if (!(indexs = heap_calloc(runs, sizeof(*indexs))))
return E_OUTOFMEMORY;
if (vistolog)
--
2.1.4
March 1, 2018
[PATCH 4/5] wined3d: Explicitly calculate the sub-resource level in surface_load_texture().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/surface.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a339171..c82da87 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2269,7 +2269,7 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
static BOOL surface_load_texture(struct wined3d_surface *surface,
struct wined3d_context *context, BOOL srgb)
{
- unsigned int width, height, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch;
+ unsigned int width, height, level, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch;
unsigned int sub_resource_idx = surface_get_sub_resource_idx(surface);
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_texture *texture = surface->container;
@@ -2295,8 +2295,9 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
return TRUE;
}
- width = wined3d_texture_get_level_width(texture, surface->texture_level);
- height = wined3d_texture_get_level_height(texture, surface->texture_level);
+ level = sub_resource_idx % texture->level_count;
+ width = wined3d_texture_get_level_width(texture, level);
+ height = wined3d_texture_get_level_height(texture, level);
SetRect(&src_rect, 0, 0, width, height);
if (!depth && sub_resource->locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB)
@@ -2360,7 +2361,7 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
wined3d_texture_prepare_texture(texture, context, srgb);
wined3d_texture_bind_and_dirtify(texture, context, srgb);
- wined3d_texture_get_pitch(texture, surface->texture_level, &src_row_pitch, &src_slice_pitch);
+ wined3d_texture_get_pitch(texture, level, &src_row_pitch, &src_slice_pitch);
format = *texture->resource.format;
if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE)))
--
2.1.4
March 1, 2018
[PATCH 3/5] wined3d: Explicitly calculate the sub-resource level in surface_load_drawable().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/surface.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b6235ce..a339171 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2226,6 +2226,7 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
struct wined3d_texture *texture = surface->container;
struct wined3d_surface *restore_rt = NULL;
struct wined3d_device *device;
+ unsigned int level;
RECT r;
if (texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
@@ -2250,8 +2251,9 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
else
restore_rt = NULL;
- SetRect(&r, 0, 0, wined3d_texture_get_level_width(texture, surface->texture_level),
- wined3d_texture_get_level_height(texture, surface->texture_level));
+ level = sub_resource_idx % texture->level_count;
+ SetRect(&r, 0, 0, wined3d_texture_get_level_width(texture, level),
+ wined3d_texture_get_level_height(texture, level));
wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB);
device->blitter->ops->blitter_blit(device->blitter, WINED3D_BLIT_OP_COLOR_BLIT, context,
surface, WINED3D_LOCATION_TEXTURE_RGB, &r,
--
2.1.4
March 1, 2018
[PATCH 2/5] wined3d: Explicitly calculate the sub-resource level in surface_blt_special().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/surface.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 668cfba..b6235ce 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2113,7 +2113,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
if ((src_swapchain || src_surface == rt) && !dst_swapchain)
{
- unsigned int src_width, src_height;
+ unsigned int src_level, src_width, src_height;
/* Blit from render target to texture */
BOOL stretchx;
@@ -2147,8 +2147,9 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
* back buffer. This is slower than reading line per line, thus not used for flipping
* -> If the app wants a scaled image with a dest rect that is bigger than the fb, it has to be copied
* pixel by pixel. */
- src_width = wined3d_texture_get_level_width(src_texture, src_surface->texture_level);
- src_height = wined3d_texture_get_level_height(src_texture, src_surface->texture_level);
+ src_level = surface_get_sub_resource_idx(src_surface) % src_texture->level_count;
+ src_width = wined3d_texture_get_level_width(src_texture, src_level);
+ src_height = wined3d_texture_get_level_height(src_texture, src_level);
if (!stretchx || dst_rect->right - dst_rect->left > src_width
|| dst_rect->bottom - dst_rect->top > src_height)
{
--
2.1.4
March 1, 2018
[PATCH 1/5] wined3d: Explicitly calculate the sub-resource level in fb_copy_to_texture_direct().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/surface.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 12370ed..668cfba 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1722,9 +1722,9 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
const RECT *src_rect, const RECT *dst_rect_in, enum wined3d_texture_filter_type filter)
{
+ unsigned int src_width, src_height, src_pow2_width, src_pow2_height, src_level;
unsigned int src_sub_resource_idx = surface_get_sub_resource_idx(src_surface);
unsigned int dst_sub_resource_idx = surface_get_sub_resource_idx(dst_surface);
- unsigned int src_width, src_height, src_pow2_width, src_pow2_height;
struct wined3d_texture *src_texture = src_surface->container;
struct wined3d_texture *dst_texture = dst_surface->container;
struct wined3d_device *device = dst_texture->resource.device;
@@ -1752,10 +1752,11 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st
wined3d_texture_load(dst_texture, context, FALSE);
offscreen_buffer = context_get_offscreen_gl_buffer(context);
- src_width = wined3d_texture_get_level_width(src_texture, src_surface->texture_level);
- src_height = wined3d_texture_get_level_height(src_texture, src_surface->texture_level);
- src_pow2_width = wined3d_texture_get_level_pow2_width(src_texture, src_surface->texture_level);
- src_pow2_height = wined3d_texture_get_level_pow2_height(src_texture, src_surface->texture_level);
+ src_level = src_sub_resource_idx % src_texture->level_count;
+ src_width = wined3d_texture_get_level_width(src_texture, src_level);
+ src_height = wined3d_texture_get_level_height(src_texture, src_level);
+ src_pow2_width = wined3d_texture_get_level_pow2_width(src_texture, src_level);
+ src_pow2_height = wined3d_texture_get_level_pow2_height(src_texture, src_level);
src_offscreen = wined3d_resource_is_offscreen(&src_texture->resource);
noBackBufferBackup = src_offscreen && wined3d_settings.offscreen_rendering_mode == ORM_FBO;
--
2.1.4
March 1, 2018
Re: [PATCH 1/4 v2] user32: Fix itemData passed in ListBox WM_MEASUREITEM message
by Dmitry Timoshkov
Piotr Caban <piotr(a)codeweavers.com> wrote:
> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
> ---
> v2:
> - fixed test failures
Since this is a reworked patch in wine-staging it would be nice to at least
have a reference for it, or a bug fixed by this patch.
Are you planning to "rework" other patches in the staging tree using same
approach? :)
--
Dmitry.
March 1, 2018
[PATCH] fonts/tahoma.sfd: Add glyphs U+FB01 and U+FB02.
by Zebediah Figura
From: Michael Müller <michael(a)fds-team.de>
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
fonts/tahoma.sfd | 16 ++++++++++++++++
fonts/tahoma.ttf | Bin 143652 -> 143884 bytes
2 files changed, 16 insertions(+)
diff --git a/fonts/tahoma.sfd b/fonts/tahoma.sfd
index 3d6b44e..466f250 100644
--- a/fonts/tahoma.sfd
+++ b/fonts/tahoma.sfd
@@ -24398,6 +24398,10 @@ BDFChar: 252 8364 7 0 5 0 8
4@"GpJGap_49,?]
BDFChar: 253 8482 11 1 9 5 8
k^ZBX8q9H_
+BDFChar: 266 64257 6 0 5 0 9
+0LS1u6psF26pq"T
+BDFChar: 267 64258 6 0 5 0 9
+1djb(6psF26pq"T
BDFChar: 280 278 7 0 5 0 10
&-2WYJ:RQJJ:ROt
BDFChar: 306 279 6 0 5 0 8
@@ -25127,6 +25131,10 @@ BDFChar: 252 8364 7 0 5 0 8
4@"GpJGap_49,?]
BDFChar: 253 8482 11 1 9 5 8
k^ZBX8q9H_
+BDFChar: 266 64257 7 0 5 0 9
+0LS1u6psF26pq"T
+BDFChar: 267 64258 7 0 5 0 9
+1djb(6psF26pq"T
BDFChar: 280 278 7 1 6 0 11
0JEM)J:RQJJ:N1J
BDFChar: 306 279 7 0 5 0 8
@@ -25856,6 +25864,10 @@ BDFChar: 252 8364 8 0 6 0 10
*$RXur.+]q5U%0J
BDFChar: 253 8482 13 0 11 6 10
q(a)Fl*,1%O\+qO_S
+BDFChar: 266 64257 8 0 6 0 11
+3'okqnj5Z06:+"*
+BDFChar: 267 64258 8 0 6 0 11
+3^Q/"nj5Z06:+"*
BDFChar: 280 278 8 1 7 0 12
&-2][J:RWLJ:N0#rVuou
BDFChar: 306 279 8 0 6 0 10
@@ -26585,6 +26597,10 @@ BDFChar: 252 8364 9 0 7 0 11
%M9gK5lO%J5TgXK
BDFChar: 253 8482 14 1 12 7 11
q(a)Fl*,1%O\+qO_S
+BDFChar: 266 64257 9 0 6 0 12
+3'oqsnj5Z06:+"*63$uc
+BDFChar: 267 64258 8 0 6 0 12
+3^Q/"nj5Z06:+"*63$uc
BDFChar: 280 278 9 1 8 0 14
(`38QJ:N0#s+#WMJ:RY"
BDFChar: 306 279 8 0 6 0 11
diff --git a/fonts/tahoma.ttf b/fonts/tahoma.ttf
index 4f68d1edfa825a0b27e0f41932867b768157a7a7..8bee8ad35c8e8b1f71b97c8117e1c57282b233ce 100644
GIT binary patch
delta 1779
zcmd6nO-NKx6vxlG+RQl3G^0+A<3}^2gN~-7_F;n&h2;k^l0pk{HqFqYFvTD(a)eK3|8
zfk8^pE6gwmDr_;;;sv_si!=~&B?&F0f^bn;gt`#w-1pA-1#QDS-1&2U=e+mMz5n~(
z{ZFQAUrc=-f6}qR7l5rnfZo}f>d?VqTRZ@`-~*_dsI5KP000Q0V(v-31(UxG_Mhl(
zMztBSYQ$wWfZ0&t*jM9ds<CUqZpQ@~sQsf(a)Y1i_`)p=tg|8(a)eW)7=&$SWLklVe>cM
ztL`z|wYaLs?ABxT?hINpd{!e^Q-VEau5x%JFs+n1JOIk(a)JWg)<K)t3ZT?^<=jan>-
z00oBt3_6Z$*lLxyG-nylXxL_xc<1kBY+pn-M%D5~{E-{$13^E4AxMT-q;VL7ae$=f
z(a)E#^fCtw;rlFq<S_(i&eh*Y0!$IWOV^<gTekp|I;F47QgLl5b3%)<iG^XNxE=^ZS^
zQqsp*hPOyZ#a<Bt+T#up5mD;xjXIPe_84Mx^QIPRL=G#>EV79DhyT>*;eU0y(x^N$
z)Z`i2Aq(a)k^XZ3J7?ou!33S&~NgSm|~Td!^DWtK{s%j_YuEu>jAY1d#E=g0wVnCU-_
z*>`5?q<K0E+nGtt(OE{ggyE_N!gY$rE1a&=oLYINwzlwXrO_+g-YHJ=62pl$jQqII
zYM)m;MG;B9Su6^b)_mcY{zV?~bsO2g$m_L>i(a)aMGzgG|V$iJd7=5)%zqc8l_S7r`U
z-ut!`rK3<}$LcvHtxDI++rrG~1%d6%t}v7Kd6_+6w)(b-wsZzi$+dshTo15A=c2tr
zvG~cmbDU(a)I+Ang<-nCy<Lw(a)lLaf+-vB3<ho;0k$o<U%*%Th}?Vc3GV-*TrM%Qn7Sx
zk$EO*k-jyTyv&@W1<dM{l7PrQd7V(a)8#Ab3T;RbzBp(a)NzG-pa9+rjOZ@MgZh(3w73=
z&rE+jz<%aYB_0q?98kss<k2iwu_xVg>*58~R3<%|S4PW4gHwAqdlTnTemnAL;*EY+
F=3lPT_%r|j
delta 1605
zcmd6n-AmI^7{{OIxVBMSx>;#Cb(^xyx7G(a)K(TgBUB__Q|i4)SB5^_SA*P~XTBqj9n
z6Y`>$UF^b(%J6rQR}o}XxQhY<AqlS{2s3mPLC^V}XKVQn<TDOm&gVSmcb;>;=WJxr
zn)qxTbq9V954Qqd*bi`h;K-qH(}Qa>Uci+JfQGK-=JqxKKoBA8lU5s=oM%U-;vJ}W
zAT~VLC#JE!K>zg?=L+(a)Z1+;C`DpoPIVVb5mwDc;LJHj>_B7iRdU{*Mgme_8WxOOp%
zI}DtkFY%uHSv*7-!+J7}-%4XcAm|4$1}1nxnuJ#{1CaL^W+6rT5<bE_=^QM<chVn-
zNcko!ZbBQW3mxbr-GxQCo%Ar4p_{Y|z33yogaM>NO}DWQ>qrwA#4*xmqEUnagt=FD
z7m0o57}W^>v6!8*8gs9-1>i&{6(hsU{cfZ8w|`D|mkCQ=)oJGWq$Mi1^CB|`X(_WC
z+HsF4iOB<&v5}gShu#|mppcaAh+MvNg;@cqOR)$YvJp8;Md(0t7(g}Wo?*V3bO*J7
z;vy2$zIsHtN8TD4yuC=KE(_0pt=D?RQxx4_w1o<BY+ZTNb5qrxDZb~<n*KdKT}j@=
zZZVe!=T;l*n`E|yln=Y_12gHDn_7t4L6sksc`~G7h0Od00ifFsHOx*jlO}o;i$w<*
z<}4P?6ss7(UjD$Fe?9=PoB40%Y7+qU)Ni78RE_ty(a)Hji!FaKF&SioXjrT%u^R3#=6
zA4(_v+NWv}SXXuqo>v8D>>P})=@00s8u`=`%!^5@)b208V^&1!W43%ZNH49CN9?4<
zYUIi(W-ihYv#ZRul2$THGLv8RGn-|mR?l9LxO`zU)O>&gDqqA~wDBOlw2a^Uvf|?^
Xo%}KEi9gckgUX)KkZ9AELZajkYSh%W
--
2.7.4
March 1, 2018
[PATCH] ntdll: Implement ProcessPriorityClass in NtQueryInformationProcess.
by Zebediah Figura
From: Michael Müller <michael(a)fds-team.de>
Allows Process Hacker to show process priority.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/ntdll/process.c | 29 ++++++++++++++++++++++++++++-
dlls/ntdll/tests/info.c | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 40034b4..835d7e6 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -205,7 +205,6 @@ NTSTATUS WINAPI NtQueryInformationProcess(
UNIMPLEMENTED_INFO_CLASS(ProcessWorkingSetWatch);
UNIMPLEMENTED_INFO_CLASS(ProcessUserModeIOPL);
UNIMPLEMENTED_INFO_CLASS(ProcessEnableAlignmentFaultFixup);
- UNIMPLEMENTED_INFO_CLASS(ProcessPriorityClass);
UNIMPLEMENTED_INFO_CLASS(ProcessWx86Information);
UNIMPLEMENTED_INFO_CLASS(ProcessPriorityBoost);
UNIMPLEMENTED_INFO_CLASS(ProcessDeviceMap);
@@ -545,6 +544,34 @@ NTSTATUS WINAPI NtQueryInformationProcess(
else
ret = STATUS_INFO_LENGTH_MISMATCH;
break;
+ case ProcessPriorityClass:
+ len = sizeof(PROCESS_PRIORITY_CLASS);
+ if (ProcessInformationLength == len)
+ {
+ if (!ProcessInformation)
+ ret = STATUS_ACCESS_VIOLATION;
+ else if (!ProcessHandle)
+ ret = STATUS_INVALID_HANDLE;
+ else
+ {
+ PROCESS_PRIORITY_CLASS *priority = ProcessInformation;
+
+ SERVER_START_REQ(get_process_info)
+ {
+ req->handle = wine_server_obj_handle( ProcessHandle );
+ if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
+ {
+ priority->PriorityClass = reply->priority;
+ /* FIXME: Not yet supported by the wineserver */
+ priority->Foreground = FALSE;
+ }
+ }
+ SERVER_END_REQ;
+ }
+ }
+ else
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ break;
default:
FIXME("(%p,info_class=%d,%p,0x%08x,%p) Unknown information class\n",
ProcessHandle,ProcessInformationClass,
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 1f1c675..54321e5 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -1334,6 +1334,40 @@ static void test_query_process_debug_port(int argc, char **argv)
ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError());
}
+static void test_query_process_priority(void)
+{
+ PROCESS_PRIORITY_CLASS priority[2];
+ ULONG ReturnLength;
+ DWORD orig_priority;
+ NTSTATUS status;
+ BOOL ret;
+
+ status = pNtQueryInformationProcess(NULL, ProcessPriorityClass, NULL, sizeof(priority[0]), NULL);
+ ok(status == STATUS_ACCESS_VIOLATION || broken(status == STATUS_INVALID_HANDLE) /* w2k3 */,
+ "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status);
+
+ status = pNtQueryInformationProcess(NULL, ProcessPriorityClass, &priority, sizeof(priority[0]), NULL);
+ ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status);
+
+ status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessPriorityClass, &priority, 1, &ReturnLength);
+ ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
+
+ status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessPriorityClass, &priority, sizeof(priority), &ReturnLength);
+ ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
+
+ orig_priority = GetPriorityClass(GetCurrentProcess());
+ ret = SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
+ ok(ret, "Failed to set priority class: %u\n", GetLastError());
+
+ status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessPriorityClass, &priority, sizeof(priority[0]), &ReturnLength);
+ ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
+ ok(priority[0].PriorityClass == PROCESS_PRIOCLASS_BELOW_NORMAL,
+ "Expected PROCESS_PRIOCLASS_BELOW_NORMAL, got %u\n", priority[0].PriorityClass);
+
+ ret = SetPriorityClass(GetCurrentProcess(), orig_priority);
+ ok(ret, "Failed to reset priority class: %u\n", GetLastError());
+}
+
static void test_query_process_handlecount(void)
{
NTSTATUS status;
@@ -2192,6 +2226,10 @@ START_TEST(info)
trace("Starting test_process_debug_port()\n");
test_query_process_debug_port(argc, argv);
+ /* 0x12 ProcessPriorityClass */
+ trace("Starting test_query_process_priority()\n");
+ test_query_process_priority();
+
/* 0x14 ProcessHandleCount */
trace("Starting test_query_process_handlecount()\n");
test_query_process_handlecount();
--
2.7.4
March 1, 2018
[PATCH v3 6/6] quartz/tests: Remove some unnecessary error-checking.
by Zebediah Figura
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/tests/filtergraph.c | 60 +++--------------------------------------
1 file changed, 3 insertions(+), 57 deletions(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index 5cf4a4d..94b39cb 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -1824,12 +1824,10 @@ static HRESULT get_connected_filter_name(TestFilterImpl *pFilter, char *FilterNa
hr = IPin_ConnectedTo(pFilter->ppPins[0], &pin);
ok(hr == S_OK, "IPin_ConnectedTo failed with %x\n", hr);
- if (FAILED(hr)) return hr;
hr = IPin_QueryPinInfo(pin, &pinInfo);
ok(hr == S_OK, "IPin_QueryPinInfo failed with %x\n", hr);
IPin_Release(pin);
- if (FAILED(hr)) return hr;
SetLastError(0xdeadbeef);
hr = IBaseFilter_QueryFilterInfo(pinInfo.pFilter, &filterInfo);
@@ -1840,7 +1838,6 @@ static HRESULT get_connected_filter_name(TestFilterImpl *pFilter, char *FilterNa
}
ok(hr == S_OK, "IBaseFilter_QueryFilterInfo failed with %x\n", hr);
IBaseFilter_Release(pinInfo.pFilter);
- if (FAILED(hr)) return hr;
IFilterGraph_Release(filterInfo.pGraph);
@@ -1940,28 +1937,23 @@ static void test_render_filter_priority(void)
* on the order in which filters are added to the graph, thus indicating
* no preference given to exact match. */
pgraph2 = create_graph();
- if (!pgraph2) return;
hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
hr = createtestfilter(&GUID_NULL, PinData3, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
@@ -1972,41 +1964,27 @@ static void test_render_filter_priority(void)
hr = get_connected_filter_name(ptestfilter, ConnectedFilterName1);
IFilterGraph2_Release(pgraph2);
- pgraph2 = NULL;
IBaseFilter_Release(&ptestfilter->IBaseFilter_iface);
- ptestfilter = NULL;
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
-
- if (hr == E_NOTIMPL)
- {
- win_skip("Needed functions are not implemented\n");
- return;
- }
pgraph2 = create_graph();
- if (!pgraph2) goto out;
hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
hr = createtestfilter(&GUID_NULL, PinData3, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
@@ -2022,49 +2000,39 @@ static void test_render_filter_priority(void)
"expected connected filters to be different but got %s both times\n", ConnectedFilterName1);
IFilterGraph2_Release(pgraph2);
- pgraph2 = NULL;
IBaseFilter_Release(&ptestfilter->IBaseFilter_iface);
- ptestfilter = NULL;
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
/* Test if any preference is given to existing renderer which renders the pin directly vs
an existing renderer which renders the pin indirectly, through an additional middle filter,
again trying different orders of creation. Native appears not to give a preference. */
pgraph2 = create_graph();
- if (!pgraph2) goto out;
hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
hr = createtestfilter(&GUID_NULL, PinData4, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
hr = createtestfilter(&GUID_NULL, PinData5, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName4);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
@@ -2077,45 +2045,35 @@ static void test_render_filter_priority(void)
"unexpected connected filter: %s\n", ConnectedFilterName1);
IFilterGraph2_Release(pgraph2);
- pgraph2 = NULL;
IBaseFilter_Release(&ptestfilter->IBaseFilter_iface);
- ptestfilter = NULL;
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
pgraph2 = create_graph();
- if (!pgraph2) goto out;
hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
hr = createtestfilter(&GUID_NULL, PinData4, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName3);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
hr = createtestfilter(&GUID_NULL, PinData5, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName4);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
hr = createtestfilter(&GUID_NULL, PinData2, &ptestfilter2);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->IBaseFilter_iface, wszFilterInstanceName2);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
@@ -2130,23 +2088,17 @@ static void test_render_filter_priority(void)
"expected connected filters to be different but got %s both times\n", ConnectedFilterName1);
IFilterGraph2_Release(pgraph2);
- pgraph2 = NULL;
IBaseFilter_Release(&ptestfilter->IBaseFilter_iface);
- ptestfilter = NULL;
IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- ptestfilter2 = NULL;
/* Test if renderers are tried before non-renderers (intermediary filters). */
pgraph2 = create_graph();
- if (!pgraph2) goto out;
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper2);
ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr);
- if (!pMapper2) goto out;
hr = createtestfilter(&GUID_NULL, PinData1, &ptestfilter);
ok(hr == S_OK, "createtestfilter failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->IBaseFilter_iface, wszFilterInstanceName1);
ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr);
@@ -2156,17 +2108,14 @@ static void test_render_filter_priority(void)
(IUnknown *)&Filter1ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER,
REGCLS_MULTIPLEUSE, &cookie1);
ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = CoRegisterClassObject(Filter2ClassFactory.clsid,
(IUnknown *)&Filter2ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER,
REGCLS_MULTIPLEUSE, &cookie2);
ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
hr = CoRegisterClassObject(Filter3ClassFactory.clsid,
(IUnknown *)&Filter3ClassFactory.IClassFactory_iface, CLSCTX_INPROC_SERVER,
REGCLS_MULTIPLEUSE, &cookie3);
ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr);
- if (FAILED(hr)) goto out;
rgf2.dwVersion = 2;
rgf2.dwMerit = MERIT_UNLIKELY;
@@ -2233,12 +2182,9 @@ static void test_render_filter_priority(void)
ok(hr == S_OK, "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
}
- out:
-
- if (ptestfilter) IBaseFilter_Release(&ptestfilter->IBaseFilter_iface);
- if (ptestfilter2) IBaseFilter_Release(&ptestfilter2->IBaseFilter_iface);
- if (pgraph2) IFilterGraph2_Release(pgraph2);
- if (pMapper2) IFilterMapper2_Release(pMapper2);
+ IBaseFilter_Release(&ptestfilter->IBaseFilter_iface);
+ IFilterGraph2_Release(pgraph2);
+ IFilterMapper2_Release(pMapper2);
hr = CoRevokeClassObject(cookie1);
ok(hr == S_OK, "CoRevokeClassObject failed with %08x\n", hr);
--
2.7.4
March 1, 2018
[PATCH v3 5/6] quartz/tests: Add more tests for IMediaSeeking.
by Zebediah Figura
Also remove uninteresting IMediaControl test.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/tests/filtergraph.c | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index 8444456..5cf4a4d 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -284,12 +284,11 @@ static void test_basic_video(IFilterGraph2 *graph)
IBasicVideo_Release(pbv);
}
-static void test_mediacontrol(IFilterGraph2 *graph)
+static void test_media_seeking(IFilterGraph2 *graph)
{
IMediaSeeking *seeking;
IMediaFilter *filter;
- IMediaControl *control;
- LONGLONG pos;
+ LONGLONG pos, stop, duration;
GUID format;
HRESULT hr;
@@ -300,9 +299,6 @@ static void test_mediacontrol(IFilterGraph2 *graph)
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter);
ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %08x\n", hr);
- hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
- ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %08x\n", hr);
-
format = GUID_NULL;
hr = IMediaSeeking_GetTimeFormat(seeking, &format);
ok(hr == S_OK, "GetTimeFormat failed: %#x\n", hr);
@@ -327,21 +323,31 @@ static void test_mediacontrol(IFilterGraph2 *graph)
ok(hr == S_OK, "GetCurrentPosition failed: %#x\n", hr);
ok(pos == 0, "got %s\n", wine_dbgstr_longlong(pos));
+ hr = IMediaSeeking_GetDuration(seeking, &duration);
+ ok(hr == S_OK, "GetDuration failed: %#x\n", hr);
+ ok(duration > 0, "got %s\n", wine_dbgstr_longlong(duration));
+
+ hr = IMediaSeeking_GetStopPosition(seeking, &stop);
+ ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr);
+ ok(stop == duration || stop == duration + 1, "expected %s, got %s\n",
+ wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop));
+
hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning);
ok(hr == S_OK, "SetPositions failed: %#x\n", hr);
hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime);
ok(hr == S_OK, "SetPositions failed: %#x\n", hr);
+ pos = 0;
+ hr = IMediaSeeking_SetPositions(seeking, &pos, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
+ ok(hr == S_OK, "SetPositions failed: %08x\n", hr);
+
IMediaFilter_SetSyncSource(filter, NULL);
pos = 0xdeadbeef;
hr = IMediaSeeking_GetCurrentPosition(seeking, &pos);
- ok(hr == S_OK, "GetCurrentPosition failed: %#x\n", hr);
- ok(pos == 0, "got %s\n", wine_dbgstr_longlong(pos));
+ ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr);
+ ok(pos == 0, "Position != 0 (%s)\n", wine_dbgstr_longlong(pos));
+ IFilterGraph2_SetDefaultSyncSource(graph);
- hr = IMediaControl_GetState(control, 1000, NULL);
- ok(hr == E_POINTER, "expected E_POINTER, got %#x\n", hr);
-
- IMediaControl_Release(control);
IMediaSeeking_Release(seeking);
IMediaFilter_Release(filter);
}
@@ -487,7 +493,7 @@ todo_wine
static void rungraph(IFilterGraph2 *graph)
{
test_basic_video(graph);
- test_mediacontrol(graph);
+ test_media_seeking(graph);
test_state_change(graph);
test_media_event(graph);
}
--
2.7.4
March 1, 2018