Wine-Commits
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
- 1 participants
- 189283 discussions
[Git][wine/wine][master] 9 commits: jscript: Improve invoke_prop_func error handling.
by Alexandre Julliard (@julliard) July 25, 2024
by Alexandre Julliard (@julliard) July 25, 2024
July 25, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
9b345198 by Jacek Caban at 2024-07-25T23:00:24+02:00
jscript: Improve invoke_prop_func error handling.
- - - - -
3291186b by Jacek Caban at 2024-07-25T23:00:25+02:00
mshtml: Explicitly specify case insensitive search in GetIDsOfNames.
- - - - -
7b455865 by Jacek Caban at 2024-07-25T23:00:25+02:00
jscript: Treat external properties as volatile.
- - - - -
63cb963a by Jacek Caban at 2024-07-25T23:00:25+02:00
jscript: Suport deleting host object properties.
- - - - -
9518a147 by Jacek Caban at 2024-07-25T23:00:25+02:00
jscript: Support configuring host properties.
- - - - -
a6a2c992 by Jacek Caban at 2024-07-25T23:00:25+02:00
jscript: Allow host objects to implement fdexNameEnsure.
- - - - -
110dcd68 by Jacek Caban at 2024-07-25T23:00:25+02:00
mshtml: Use host object script bindings for HTMLFormElement.
- - - - -
d330411f by Jacek Caban at 2024-07-25T23:00:25+02:00
mshtml: Use ensure_real_info in dispex_compat_mode.
- - - - -
b2f53eac by Jacek Caban at 2024-07-25T23:00:26+02:00
mshtml: Use host object script bindings for document nodes.
- - - - -
12 changed files:
- dlls/jscript/dispex.c
- dlls/jscript/jscript.h
- dlls/jscript/jsdisp.idl
- dlls/jscript/tests/api.js
- dlls/mshtml/dispex.c
- dlls/mshtml/htmldoc.c
- dlls/mshtml/htmlform.c
- dlls/mshtml/htmlwindow.c
- dlls/mshtml/mshtml_private.h
- dlls/mshtml/tests/documentmode.js
- dlls/mshtml/tests/es5.js
- dlls/mshtml/tests/events.c
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/0c1c8c295b14626c2cb3c2fac65e1…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/0c1c8c295b14626c2cb3c2fac65e1…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] 8 commits: d3dx9/tests: Make some test structures static const.
by Alexandre Julliard (@julliard) July 24, 2024
by Alexandre Julliard (@julliard) July 24, 2024
July 24, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
2b042ca3 by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9/tests: Make some test structures static const.
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
093b2c96 by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9/tests: Reorder test structure members.
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
d714f1b2 by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9/tests: Add more D3DXCreateCubeTextureFromFileInMemory{Ex}() tests.
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
ecb2f3ce by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9: Refactor texture creation and cleanup in D3DXCreateCubeTextureFromFileInMemoryEx().
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
15e9113c by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9: Cleanup texture value argument handling in D3DXCreateCubeTextureFromFileInMemoryEx().
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
416f11ea by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9: Use d3dx_image structure inside of D3DXCreateCubeTextureFromFileInMemoryEx().
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
f023fd35 by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9: Add support for specifying which array layer to get pixel data from to d3dx_image_get_pixels().
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
0c1c8c29 by Connor McAdams at 2024-07-24T20:15:44+02:00
d3dx9: Add support for loading non-square cubemap DDS files into cube textures.
Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com>
- - - - -
7 changed files:
- dlls/d3dx9_36/d3dx9_private.h
- dlls/d3dx9_36/surface.c
- dlls/d3dx9_36/tests/d3dx9_test_images.h
- dlls/d3dx9_36/tests/surface.c
- dlls/d3dx9_36/tests/texture.c
- dlls/d3dx9_36/texture.c
- dlls/d3dx9_36/volume.c
Changes:
=====================================
dlls/d3dx9_36/d3dx9_private.h
=====================================
@@ -106,8 +106,10 @@ struct d3dx_image
struct volume size;
uint32_t mip_levels;
+ uint32_t layer_count;
BYTE *pixels;
+ uint32_t layer_pitch;
/*
* image_buf and palette are pointers to allocated memory used to store
@@ -123,7 +125,8 @@ struct d3dx_image
HRESULT d3dx_image_init(const void *src_data, uint32_t src_data_size, struct d3dx_image *image,
uint32_t starting_mip_level, uint32_t flags);
void d3dx_image_cleanup(struct d3dx_image *image);
-HRESULT d3dx_image_get_pixels(struct d3dx_image *image, uint32_t mip_level, struct d3dx_pixels *pixels);
+HRESULT d3dx_image_get_pixels(struct d3dx_image *image, uint32_t layer, uint32_t mip_level,
+ struct d3dx_pixels *pixels);
void d3dximage_info_from_d3dx_image(D3DXIMAGE_INFO *info, struct d3dx_image *image);
struct d3dx_include_from_file
@@ -172,8 +175,6 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *dst_size,
const struct pixel_format_desc *dst_format, D3DCOLOR color_key, const PALETTEENTRY *palette);
-HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data,
- const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info);
HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock,
IDirect3DSurface9 **temp_surface, BOOL write);
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
=====================================
dlls/d3dx9_36/surface.c
=====================================
@@ -475,6 +475,23 @@ static HRESULT d3dx_calculate_pixels_size(D3DFORMAT format, uint32_t width, uint
return D3D_OK;
}
+static uint32_t d3dx_calculate_layer_pixels_size(D3DFORMAT format, uint32_t width, uint32_t height, uint32_t depth,
+ uint32_t mip_levels)
+{
+ uint32_t layer_size, row_pitch, slice_pitch, i;
+ struct volume dims = { width, height, depth };
+
+ layer_size = 0;
+ for (i = 0; i < mip_levels; ++i)
+ {
+ d3dx_calculate_pixels_size(format, dims.width, dims.height, &row_pitch, &slice_pitch);
+ layer_size += slice_pitch * dims.depth;
+ d3dx_get_next_mip_level_size(&dims);
+ }
+
+ return layer_size;
+}
+
static UINT calculate_dds_file_size(D3DFORMAT format, UINT width, UINT height, UINT depth,
UINT miplevels, UINT faces)
{
@@ -566,65 +583,11 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
return D3D_OK;
}
-HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data,
- const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info)
-{
- HRESULT hr;
- int face;
- UINT mip_level;
- UINT size;
- RECT src_rect;
- UINT src_pitch;
- UINT mip_levels;
- UINT mip_level_size;
- IDirect3DSurface9 *surface;
- const struct dds_header *header = src_data;
- const BYTE *pixels = (BYTE *)(header + 1);
-
- if (src_info->ResourceType != D3DRTYPE_CUBETEXTURE)
- return D3DXERR_INVALIDDATA;
-
- if ((header->caps2 & DDS_CAPS2_CUBEMAP_ALL_FACES) != DDS_CAPS2_CUBEMAP_ALL_FACES)
- {
- WARN("Only full cubemaps are supported\n");
- return D3DXERR_INVALIDDATA;
- }
-
- mip_levels = min(src_info->MipLevels, IDirect3DCubeTexture9_GetLevelCount(cube_texture));
- for (face = D3DCUBEMAP_FACE_POSITIVE_X; face <= D3DCUBEMAP_FACE_NEGATIVE_Z; face++)
- {
- size = src_info->Width;
- for (mip_level = 0; mip_level < src_info->MipLevels; mip_level++)
- {
- hr = d3dx_calculate_pixels_size(src_info->Format, size, size, &src_pitch, &mip_level_size);
- if (FAILED(hr)) return hr;
-
- /* if texture has fewer mip levels than DDS file, skip excessive mip levels */
- if (mip_level < mip_levels)
- {
- SetRect(&src_rect, 0, 0, size, size);
-
- IDirect3DCubeTexture9_GetCubeMapSurface(cube_texture, face, mip_level, &surface);
- hr = D3DXLoadSurfaceFromMemory(surface, palette, NULL, pixels, src_info->Format, src_pitch,
- NULL, &src_rect, filter, color_key);
- IDirect3DSurface9_Release(surface);
- if (FAILED(hr)) return hr;
- }
-
- pixels += mip_level_size;
- size = max(1, size / 2);
- }
- }
-
- return D3D_OK;
-}
-
static HRESULT d3dx_initialize_image_from_dds(const void *src_data, uint32_t src_data_size,
struct d3dx_image *image, uint32_t starting_mip_level)
{
const struct dds_header *header = src_data;
uint32_t expected_src_data_size;
- uint32_t faces = 1;
if (src_data_size < sizeof(*header) || header->pixel_format.size != sizeof(header->pixel_format))
return D3DXERR_INVALIDDATA;
@@ -633,6 +596,7 @@ static HRESULT d3dx_initialize_image_from_dds(const void *src_data, uint32_t src
set_volume_struct(&image->size, header->width, header->height, 1);
image->mip_levels = header->miplevels ? header->miplevels : 1;
image->format = dds_pixel_format_to_d3dformat(&header->pixel_format);
+ image->layer_count = 1;
if (image->format == D3DFMT_UNKNOWN)
return D3DXERR_INVALIDDATA;
@@ -651,14 +615,15 @@ static HRESULT d3dx_initialize_image_from_dds(const void *src_data, uint32_t src
return D3DXERR_INVALIDDATA;
}
- faces = 6;
+ image->layer_count = 6;
image->resource_type = D3DRTYPE_CUBETEXTURE;
}
else
image->resource_type = D3DRTYPE_TEXTURE;
- expected_src_data_size = calculate_dds_file_size(image->format, image->size.width, image->size.height,
- image->size.depth, image->mip_levels, faces);
+ image->layer_pitch = d3dx_calculate_layer_pixels_size(image->format, image->size.width, image->size.height,
+ image->size.depth, image->mip_levels);
+ expected_src_data_size = (image->layer_pitch * image->layer_count) + sizeof(*header);
if (src_data_size < expected_src_data_size)
{
WARN("File is too short %u, expected at least %u bytes.\n", src_data_size, expected_src_data_size);
@@ -1020,6 +985,7 @@ static HRESULT d3dx_initialize_image_from_wic(const void *src_data, uint32_t src
image->size.depth = 1;
image->mip_levels = 1;
+ image->layer_count = 1;
image->resource_type = D3DRTYPE_TEXTURE;
exit:
@@ -1055,7 +1021,8 @@ void d3dx_image_cleanup(struct d3dx_image *image)
free(image->palette);
}
-HRESULT d3dx_image_get_pixels(struct d3dx_image *image, uint32_t mip_level, struct d3dx_pixels *pixels)
+HRESULT d3dx_image_get_pixels(struct d3dx_image *image, uint32_t layer, uint32_t mip_level,
+ struct d3dx_pixels *pixels)
{
struct volume mip_level_size = image->size;
const BYTE *pixels_ptr = image->pixels;
@@ -1069,6 +1036,12 @@ HRESULT d3dx_image_get_pixels(struct d3dx_image *image, uint32_t mip_level, stru
return E_FAIL;
}
+ if (layer >= image->layer_count)
+ {
+ ERR("Tried to retrieve layer %u, but image only has %u layers.\n", layer, image->layer_count);
+ return E_FAIL;
+ }
+
slice_pitch = row_pitch = 0;
for (i = 0; i < image->mip_levels; i++)
{
@@ -1083,6 +1056,7 @@ HRESULT d3dx_image_get_pixels(struct d3dx_image *image, uint32_t mip_level, stru
d3dx_get_next_mip_level_size(&mip_level_size);
}
+ pixels_ptr += (layer * image->layer_pitch);
SetRect(&unaligned_rect, 0, 0, mip_level_size.width, mip_level_size.height);
set_d3dx_pixels(pixels, pixels_ptr, row_pitch, slice_pitch, image->palette, mip_level_size.width,
mip_level_size.height, mip_level_size.depth, &unaligned_rect);
@@ -1294,7 +1268,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface,
else
SetRect(&src_rect, 0, 0, img_info.Width, img_info.Height);
- hr = d3dx_image_get_pixels(&image, 0, &pixels);
+ hr = d3dx_image_get_pixels(&image, 0, 0, &pixels);
if (FAILED(hr))
goto exit;
=====================================
dlls/d3dx9_36/tests/d3dx9_test_images.h
=====================================
@@ -254,6 +254,99 @@ static const uint8_t dds_cube_map[] =
0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x55
};
+/* 4x2 cube map DDS file. */
+static const uint8_t dds_cube_map_4_2[] =
+{
+ 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x0f,0x10,0x00,0x00,0x02,0x00,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x00,
+ 0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,
+ 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,
+ 0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+};
+
+/* 2x4 cube map DDS file. */
+static const uint8_t dds_cube_map_2_4[] =
+{
+ 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x0f,0x10,0x00,0x00,0x04,0x00,0x00,0x00,
+ 0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x00,
+ 0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,
+ 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,
+ 0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+};
+
+/* 4x4 cube map DDS file with 2 mips. */
+static const uint8_t dds_cube_map_4_4[] =
+{
+ 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x0f,0x10,0x02,0x00,0x04,0x00,0x00,0x00,
+ 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x40,0x00,
+ 0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,
+ 0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,
+ 0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
+ 0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,
+ 0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
+ 0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
+ 0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
+ 0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x00,
+};
+
/* 4x4x2 volume map dds, 2 mipmaps */
static const uint8_t dds_volume_map[] =
{
=====================================
dlls/d3dx9_36/tests/surface.c
=====================================
@@ -251,7 +251,7 @@ static void test_dds_header_handling(void)
BYTE data[4096 * 1024];
} *dds;
- struct
+ static const struct
{
struct dds_pixel_format pixel_format;
DWORD flags;
@@ -355,7 +355,7 @@ static void test_dds_header_handling(void)
{ { 32, DDS_PF_RGB, 0, 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000 }, 0, 256, 256, 0, 9, 262146, { D3D_OK, 9 } },
{ { 32, DDS_PF_RGB, 0, 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000 }, 0, 256, 256, 0, 10, 262146, { D3D_OK, 10 } },
};
- struct
+ static const struct
{
uint32_t flags;
uint32_t width;
@@ -375,40 +375,40 @@ static void test_dds_header_handling(void)
D3DRESOURCETYPE resource_type;
}
expected;
+ uint32_t pixel_data_size;
BOOL todo_hr;
BOOL todo_info;
- uint32_t pixel_data_size;
} info_tests[] = {
/* Depth value set to 4, but no caps bits are set. Depth is ignored. */
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT), 4, 4, 4, (4 * 4), 3, 0, 0,
- { D3D_OK, 4, 4, 1, 3, D3DRTYPE_TEXTURE, }, FALSE, FALSE, 292 },
+ { D3D_OK, 4, 4, 1, 3, D3DRTYPE_TEXTURE, }, 292 },
/* The volume texture caps2 field is ignored. */
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT), 4, 4, 4, (4 * 4), 3,
(DDS_CAPS_TEXTURE | DDS_CAPS_COMPLEX), DDS_CAPS2_VOLUME,
- { D3D_OK, 4, 4, 1, 3, D3DRTYPE_TEXTURE, }, FALSE, FALSE, 292 },
+ { D3D_OK, 4, 4, 1, 3, D3DRTYPE_TEXTURE, }, 292 },
/*
* The DDS_DEPTH flag is the only thing checked to determine if a DDS
* file represents a volume texture.
*/
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT | DDS_DEPTH), 4, 4, 4, (4 * 4), 3,
0, 0,
- { D3D_OK, 4, 4, 4, 3, D3DRTYPE_VOLUMETEXTURE, }, FALSE, FALSE, 292 },
+ { D3D_OK, 4, 4, 4, 3, D3DRTYPE_VOLUMETEXTURE, }, 292 },
/* Even if the depth field is set to 0, it's still a volume texture. */
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT | DDS_DEPTH), 4, 4, 0, (4 * 4), 3,
0, 0,
- { D3D_OK, 4, 4, 1, 3, D3DRTYPE_VOLUMETEXTURE, }, FALSE, FALSE, 292 },
+ { D3D_OK, 4, 4, 1, 3, D3DRTYPE_VOLUMETEXTURE, }, 292 },
/* The DDS_DEPTH flag overrides cubemap caps. */
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT | DDS_DEPTH), 4, 4, 4, (4 * 4), 3,
(DDS_CAPS_TEXTURE | DDS_CAPS_COMPLEX), (DDS_CAPS2_CUBEMAP | DDS_CAPS2_CUBEMAP_ALL_FACES),
- { D3D_OK, 4, 4, 4, 3, D3DRTYPE_VOLUMETEXTURE, }, FALSE, FALSE, (292 * 6) },
+ { D3D_OK, 4, 4, 4, 3, D3DRTYPE_VOLUMETEXTURE, }, (292 * 6) },
/* Cubemap where width field does not equal height. */
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT), 4, 5, 1, (4 * 4), 1,
(DDS_CAPS_TEXTURE | DDS_CAPS_COMPLEX), (DDS_CAPS2_CUBEMAP | DDS_CAPS2_CUBEMAP_ALL_FACES),
- { D3D_OK, 4, 5, 1, 1, D3DRTYPE_CUBETEXTURE, }, FALSE, FALSE, (80 * 6) },
+ { D3D_OK, 4, 5, 1, 1, D3DRTYPE_CUBETEXTURE, }, (80 * 6) },
/* Partial cubemaps are not supported. */
{ (DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT), 4, 4, 1, (4 * 4), 1,
(DDS_CAPS_TEXTURE | DDS_CAPS_COMPLEX), (DDS_CAPS2_CUBEMAP | DDS_CAPS2_CUBEMAP_POSITIVEX),
- { D3DXERR_INVALIDDATA, }, FALSE, FALSE, (64 * 6) },
+ { D3DXERR_INVALIDDATA, }, (64 * 6) },
};
dds = calloc(1, sizeof(*dds));
=====================================
dlls/d3dx9_36/tests/texture.c
=====================================
@@ -48,6 +48,38 @@ static inline void expect_vec4_(unsigned int line, const D3DXVECTOR4 *expected,
got->x, got->y, got->z, got->w);
}
+static inline void check_surface_desc(uint32_t line, D3DFORMAT format, uint32_t usage, D3DPOOL pool,
+ D3DMULTISAMPLE_TYPE multi_sample_type, uint32_t multi_sample_quality, uint32_t width, uint32_t height,
+ const D3DSURFACE_DESC *desc, BOOL wine_todo)
+{
+ const D3DSURFACE_DESC expected_desc = { format, D3DRTYPE_SURFACE, usage, pool, multi_sample_type,
+ multi_sample_quality, width, height };
+ BOOL matched;
+
+ matched = !memcmp(&expected_desc, desc, sizeof(*desc));
+ todo_wine_if(wine_todo) ok_(__FILE__, line)(matched, "Got unexpected surface desc values.\n");
+ if (matched)
+ return;
+
+ todo_wine_if(wine_todo && desc->Format != format)
+ ok_(__FILE__, line)(desc->Format == format, "Expected surface format %d, got %d.\n", format, desc->Format);
+ ok_(__FILE__, line)(desc->Type == D3DRTYPE_SURFACE, "Expected D3DRTYPE_SURFACE, got %d.\n", desc->Type);
+ todo_wine_if(wine_todo && desc->Usage != usage)
+ ok_(__FILE__, line)(desc->Usage == usage, "Expected usage %u, got %lu.\n", usage, desc->Usage);
+ todo_wine_if(wine_todo && desc->Pool != pool)
+ ok_(__FILE__, line)(desc->Pool == pool, "Expected pool %d, got %d.\n", pool, desc->Pool);
+ todo_wine_if(wine_todo && desc->MultiSampleType != multi_sample_type)
+ ok_(__FILE__, line)(desc->MultiSampleType == multi_sample_type, "Expected multi sample type %d, got %d.\n",
+ multi_sample_type, desc->MultiSampleType);
+ todo_wine_if(wine_todo && desc->MultiSampleQuality != multi_sample_quality)
+ ok_(__FILE__, line)(desc->MultiSampleQuality == multi_sample_quality, "Expected multi sample quality %u, got %lu.\n",
+ multi_sample_quality, desc->MultiSampleQuality);
+ todo_wine_if(wine_todo && desc->Width != width)
+ ok_(__FILE__, line)(desc->Width == width, "Expected width %d, got %d.\n", width, desc->Width);
+ todo_wine_if(wine_todo && desc->Height != height)
+ ok_(__FILE__, line)(desc->Height == height, "Expected height %d, got %d.\n", height, desc->Height);
+}
+
#define check_texture_level_desc(tex, level, format, usage, pool, multi_sample_type, multi_sample_quality, width, \
height, wine_todo) \
check_texture_level_desc_(__LINE__, tex, level, format, usage, pool, multi_sample_type, multi_sample_quality, \
@@ -56,10 +88,7 @@ static inline void check_texture_level_desc_(uint32_t line, IDirect3DTexture9 *t
uint32_t usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multi_sample_type,
uint32_t multi_sample_quality, uint32_t width, uint32_t height, BOOL wine_todo)
{
- const D3DSURFACE_DESC expected_desc = { format, D3DRTYPE_SURFACE, usage, pool, multi_sample_type,
- multi_sample_quality, width, height };
D3DSURFACE_DESC desc;
- BOOL matched;
HRESULT hr;
hr = IDirect3DTexture9_GetLevelDesc(tex, level, &desc);
@@ -68,28 +97,28 @@ static inline void check_texture_level_desc_(uint32_t line, IDirect3DTexture9 *t
if (FAILED(hr))
return;
- matched = !memcmp(&expected_desc, &desc, sizeof(desc));
- todo_wine_if(wine_todo) ok_(__FILE__, line)(matched, "Got unexpected surface desc values.\n");
- if (matched)
+ check_surface_desc(line, format, usage, pool, multi_sample_type, multi_sample_quality, width, height, &desc,
+ wine_todo);
+}
+
+#define check_cube_texture_level_desc(tex, level, format, usage, pool, multi_sample_type, multi_sample_quality, size, \
+ wine_todo) \
+ check_cube_texture_level_desc_(__LINE__, tex, level, format, usage, pool, multi_sample_type, multi_sample_quality, \
+ size, wine_todo)
+static inline void check_cube_texture_level_desc_(uint32_t line, IDirect3DCubeTexture9 *tex, uint32_t level,
+ D3DFORMAT format, uint32_t usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multi_sample_type,
+ uint32_t multi_sample_quality, uint32_t size, BOOL wine_todo)
+{
+ D3DSURFACE_DESC desc;
+ HRESULT hr;
+
+ hr = IDirect3DCubeTexture9_GetLevelDesc(tex, level, &desc);
+ todo_wine_if(wine_todo && FAILED(hr))
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get cube texture level desc with hr %#lx.\n", hr);
+ if (FAILED(hr))
return;
- todo_wine_if(wine_todo && desc.Format != format)
- ok_(__FILE__, line)(desc.Format == format, "Expected surface format %d, got %d.\n", format, desc.Format);
- ok_(__FILE__, line)(desc.Type == D3DRTYPE_SURFACE, "Expected D3DRTYPE_SURFACE, got %d.\n", desc.Type);
- todo_wine_if(wine_todo && desc.Usage != usage)
- ok_(__FILE__, line)(desc.Usage == usage, "Expected usage %u, got %lu.\n", usage, desc.Usage);
- todo_wine_if(wine_todo && desc.Pool != pool)
- ok_(__FILE__, line)(desc.Pool == pool, "Expected pool %d, got %d.\n", pool, desc.Pool);
- todo_wine_if(wine_todo && desc.MultiSampleType != multi_sample_type)
- ok_(__FILE__, line)(desc.MultiSampleType == multi_sample_type, "Expected multi sample type %d, got %d.\n",
- multi_sample_type, desc.MultiSampleType);
- todo_wine_if(wine_todo && desc.MultiSampleQuality != multi_sample_quality)
- ok_(__FILE__, line)(desc.MultiSampleQuality == multi_sample_quality, "Expected multi sample quality %u, got %lu.\n",
- multi_sample_quality, desc.MultiSampleQuality);
- todo_wine_if(wine_todo && desc.Width != width)
- ok_(__FILE__, line)(desc.Width == width, "Expected width %u, got %u.\n", width, desc.Width);
- todo_wine_if(wine_todo && desc.Height != height)
- ok_(__FILE__, line)(desc.Height == height, "Expected height %u, got %u.\n", height, desc.Height);
+ check_surface_desc(line, format, usage, pool, multi_sample_type, multi_sample_quality, size, size, &desc, wine_todo);
}
#define check_volume_texture_level_desc(tex, level, format, usage, pool, width, height, depth, wine_todo) \
@@ -177,21 +206,11 @@ static void release_surface_readback(struct surface_readback *rb)
IDirect3DSurface9_Release(rb->surface);
}
-static void get_texture_surface_readback(IDirect3DDevice9 *device, IDirect3DTexture9 *texture, uint32_t mip_level,
- struct surface_readback *rb)
+static void get_surface_readback(IDirect3DDevice9 *device, IDirect3DSurface9 *surface, struct surface_readback *rb)
{
- IDirect3DSurface9 *surface;
D3DSURFACE_DESC desc;
HRESULT hr;
- memset(rb, 0, sizeof(*rb));
- hr = IDirect3DTexture9_GetSurfaceLevel(texture, mip_level, &surface);
- if (FAILED(hr))
- {
- trace("Failed to get surface for mip level %d, hr %#lx.\n", mip_level, hr);
- return;
- }
-
hr = IDirect3DSurface9_GetDesc(surface, &desc);
if (FAILED(hr))
{
@@ -219,7 +238,6 @@ static void get_texture_surface_readback(IDirect3DDevice9 *device, IDirect3DText
trace("Can't lock the readback surface, hr %#lx.\n", hr);
exit:
- IDirect3DSurface9_Release(surface);
if (FAILED(hr))
{
if (rb->surface)
@@ -228,6 +246,42 @@ exit:
}
}
+static void get_texture_surface_readback(IDirect3DDevice9 *device, IDirect3DTexture9 *texture, uint32_t mip_level,
+ struct surface_readback *rb)
+{
+ IDirect3DSurface9 *surface;
+ HRESULT hr;
+
+ memset(rb, 0, sizeof(*rb));
+ hr = IDirect3DTexture9_GetSurfaceLevel(texture, mip_level, &surface);
+ if (FAILED(hr))
+ {
+ trace("Failed to get surface for mip level %d, hr %#lx.\n", mip_level, hr);
+ return;
+ }
+
+ get_surface_readback(device, surface, rb);
+ IDirect3DSurface9_Release(surface);
+}
+
+static void get_cube_texture_surface_readback(IDirect3DDevice9 *device, IDirect3DCubeTexture9 *texture, uint32_t face,
+ uint32_t mip_level, struct surface_readback *rb)
+{
+ IDirect3DSurface9 *surface;
+ HRESULT hr;
+
+ memset(rb, 0, sizeof(*rb));
+ hr = IDirect3DCubeTexture9_GetCubeMapSurface(texture, face, mip_level, &surface);
+ if (FAILED(hr))
+ {
+ trace("Failed to get surface for face %d mip level %d, hr %#lx.\n", face, mip_level, hr);
+ return;
+ }
+
+ get_surface_readback(device, surface, rb);
+ IDirect3DSurface9_Release(surface);
+}
+
#define check_readback_pixel_4bpp(rb, x, y, color, todo) _check_readback_pixel_4bpp(__LINE__, rb, x, y, color, todo)
static inline void _check_readback_pixel_4bpp(uint32_t line, struct surface_readback *rb, uint32_t x,
uint32_t y, uint32_t expected_color, BOOL todo)
@@ -2367,6 +2421,12 @@ static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device)
hr = D3DXCreateCubeTextureFromFileInMemory(device, dds_cube_map, sizeof(dds_cube_map), NULL);
ok(hr == D3DERR_INVALIDCALL, "D3DXCreateCubeTextureFromFileInMemory returned %#lx, expected %#lx\n", hr, D3DERR_INVALIDCALL);
+ hr = D3DXCreateCubeTextureFromFileInMemory(device, dds_24bit, sizeof(dds_24bit), &cube_texture);
+ ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
+
+ hr = D3DXCreateCubeTextureFromFileInMemory(device, bmp_32bpp_4_4_argb, sizeof(bmp_32bpp_4_4_argb), &cube_texture);
+ ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
+
hr = D3DXCreateCubeTextureFromFileInMemory(device, dds_cube_map, sizeof(dds_cube_map), &cube_texture);
if (SUCCEEDED(hr))
{
@@ -2385,7 +2445,20 @@ static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device)
static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device)
{
+ static const uint32_t dds_cube_map_non_square_expected[] =
+ {
+ 0xffff0000, 0xff00ff00, 0xff0000ff, 0xffffff00, 0xffff00ff, 0xff000000,
+ };
+ static const uint32_t dds_cube_map_4_4_expected[] =
+ {
+ 0xffff0000, 0xff00ff00, 0xff0000ff, 0xffffff00, 0xffff00ff, 0xff00ffff,
+ 0xffffffff, 0xff000000, 0xff800000, 0xff008000, 0xff000080, 0xff808000
+ };
IDirect3DCubeTexture9 *cube_texture;
+ struct surface_readback surface_rb;
+ D3DSURFACE_DESC desc;
+ D3DXIMAGE_INFO info;
+ uint32_t i, x, y;
HRESULT hr;
hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT,
@@ -2405,6 +2478,176 @@ static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic
D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &cube_texture);
ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
IDirect3DCubeTexture9_Release(cube_texture);
+
+ /*
+ * Cubemap file with a width of 4 and a height of 2. The largest value is
+ * used for the size of the created cubemap.
+ */
+ hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map_4_2, sizeof(dds_cube_map_4_2), D3DX_DEFAULT, 1,
+ D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_DEFAULT, 0, &info, NULL, &cube_texture);
+ ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
+
+ check_texture_mip_levels(cube_texture, 1, FALSE);
+ check_image_info(&info, 4, 2, 1, 1, D3DFMT_X8R8G8B8, D3DRTYPE_CUBETEXTURE, D3DXIFF_DDS, FALSE);
+ check_cube_texture_level_desc(cube_texture, 0, D3DFMT_X8R8G8B8, D3DUSAGE_DYNAMIC, D3DPOOL_DEFAULT, 0, 0, 4, FALSE);
+
+ IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 0, &desc);
+ for (i = 0; i < 6; ++i)
+ {
+ const uint32_t expected_color = dds_cube_map_non_square_expected[i];
+
+ winetest_push_context("Face %u", i);
+ get_cube_texture_surface_readback(device, cube_texture, i, 0, &surface_rb);
+ for (y = 0; y < desc.Height; ++y)
+ {
+ for (x = 0; x < desc.Width; ++x)
+ {
+ if (y < info.Height)
+ check_readback_pixel_4bpp(&surface_rb, x, y, expected_color, FALSE);
+ else
+ check_readback_pixel_4bpp(&surface_rb, x, y, 0xff000000, FALSE);
+ }
+ }
+ release_surface_readback(&surface_rb);
+ winetest_pop_context();
+ }
+ IDirect3DCubeTexture9_Release(cube_texture);
+
+ /*
+ * Load the same cubemap, but this time with a point filter. Source image
+ * is scaled to cover the entire 4x4 cubemap texture faces.
+ */
+ hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map_4_2, sizeof(dds_cube_map_4_2), D3DX_DEFAULT, 1,
+ D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_FILTER_POINT, D3DX_DEFAULT, 0, &info, NULL, &cube_texture);
+ ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
+
+ check_texture_mip_levels(cube_texture, 1, FALSE);
+ check_image_info(&info, 4, 2, 1, 1, D3DFMT_X8R8G8B8, D3DRTYPE_CUBETEXTURE, D3DXIFF_DDS, FALSE);
+ check_cube_texture_level_desc(cube_texture, 0, D3DFMT_X8R8G8B8, D3DUSAGE_DYNAMIC, D3DPOOL_DEFAULT, 0, 0, 4, FALSE);
+
+ IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 0, &desc);
+ for (i = 0; i < 6; ++i)
+ {
+ const uint32_t expected_color = dds_cube_map_non_square_expected[i];
+
+ winetest_push_context("Face %u", i);
+ get_cube_texture_surface_readback(device, cube_texture, i, 0, &surface_rb);
+ for (y = 0; y < desc.Height; ++y)
+ {
+ for (x = 0; x < desc.Width; ++x)
+ {
+ check_readback_pixel_4bpp(&surface_rb, x, y, expected_color, FALSE);
+ }
+ }
+ release_surface_readback(&surface_rb);
+ winetest_pop_context();
+ }
+ IDirect3DCubeTexture9_Release(cube_texture);
+
+ /*
+ * Cubemap file with a width of 2 and a height of 4.
+ */
+ hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map_2_4, sizeof(dds_cube_map_2_4), D3DX_DEFAULT, 1,
+ D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_DEFAULT, 0, &info, NULL, &cube_texture);
+ ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
+
+ check_texture_mip_levels(cube_texture, 1, FALSE);
+ check_image_info(&info, 2, 4, 1, 1, D3DFMT_X8R8G8B8, D3DRTYPE_CUBETEXTURE, D3DXIFF_DDS, FALSE);
+ check_cube_texture_level_desc(cube_texture, 0, D3DFMT_X8R8G8B8, D3DUSAGE_DYNAMIC, D3DPOOL_DEFAULT, 0, 0, 4, FALSE);
+
+ IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 0, &desc);
+ for (i = 0; i < 6; ++i)
+ {
+ const uint32_t expected_color = dds_cube_map_non_square_expected[i];
+
+ winetest_push_context("Face %u", i);
+ get_cube_texture_surface_readback(device, cube_texture, i, 0, &surface_rb);
+ for (y = 0; y < desc.Height; ++y)
+ {
+ for (x = 0; x < desc.Width; ++x)
+ {
+ if (x < info.Width)
+ check_readback_pixel_4bpp(&surface_rb, x, y, expected_color, FALSE);
+ else
+ check_readback_pixel_4bpp(&surface_rb, x, y, 0xff000000, FALSE);
+ }
+ }
+ release_surface_readback(&surface_rb);
+ winetest_pop_context();
+ }
+ IDirect3DCubeTexture9_Release(cube_texture);
+
+ /* Multi-mip cubemap DDS file. */
+ hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map_4_4, sizeof(dds_cube_map_4_4), D3DX_DEFAULT, D3DX_FROM_FILE,
+ D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, &info, NULL, &cube_texture);
+ ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
+
+ check_texture_mip_levels(cube_texture, 2, FALSE);
+ check_image_info(&info, 4, 4, 1, 2, D3DFMT_X8R8G8B8, D3DRTYPE_CUBETEXTURE, D3DXIFF_DDS, FALSE);
+ check_cube_texture_level_desc(cube_texture, 0, D3DFMT_X8R8G8B8, D3DUSAGE_DYNAMIC, D3DPOOL_DEFAULT, 0, 0, 4, FALSE);
+ check_cube_texture_level_desc(cube_texture, 1, D3DFMT_X8R8G8B8, D3DUSAGE_DYNAMIC, D3DPOOL_DEFAULT, 0, 0, 2, FALSE);
+
+ for (i = 0; i < 6; ++i)
+ {
+ uint32_t mip_level;
+
+ for (mip_level = 0; mip_level < 2; ++mip_level)
+ {
+ const uint32_t expected_color = dds_cube_map_4_4_expected[(i * 2) + mip_level];
+
+ winetest_push_context("Face %u, mip level %u", i, mip_level);
+ IDirect3DCubeTexture9_GetLevelDesc(cube_texture, mip_level, &desc);
+ get_cube_texture_surface_readback(device, cube_texture, i, mip_level, &surface_rb);
+ for (y = 0; y < desc.Height; ++y)
+ {
+ for (x = 0; x < desc.Width; ++x)
+ {
+ check_readback_pixel_4bpp(&surface_rb, x, y, expected_color, FALSE);
+ }
+ }
+ release_surface_readback(&surface_rb);
+ winetest_pop_context();
+ }
+ }
+ IDirect3DCubeTexture9_Release(cube_texture);
+
+ /* Skip level bits are bits 30-26. Bit 31 needs to be ignored. */
+ hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map_4_4, sizeof(dds_cube_map_4_4), D3DX_DEFAULT,
+ D3DX_FROM_FILE, D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT,
+ D3DX_FILTER_POINT | (0x20u << D3DX_SKIP_DDS_MIP_LEVELS_SHIFT), 0, &info, NULL, &cube_texture);
+ ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
+
+ check_image_info(&info, 4, 4, 1, 2, D3DFMT_X8R8G8B8, D3DRTYPE_CUBETEXTURE, D3DXIFF_DDS, FALSE);
+ IDirect3DCubeTexture9_Release(cube_texture);
+
+ /* Multi-mip cubemap DDS file with mip skipping. */
+ hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map_4_4, sizeof(dds_cube_map_4_4), D3DX_DEFAULT,
+ D3DX_FROM_FILE, D3DUSAGE_DYNAMIC, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT,
+ D3DX_SKIP_DDS_MIP_LEVELS(1, D3DX_DEFAULT), 0, &info, NULL, &cube_texture);
+ ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
+
+ check_texture_mip_levels(cube_texture, 1, FALSE);
+ check_image_info(&info, 2, 2, 1, 1, D3DFMT_X8R8G8B8, D3DRTYPE_CUBETEXTURE, D3DXIFF_DDS, FALSE);
+ check_cube_texture_level_desc(cube_texture, 0, D3DFMT_X8R8G8B8, D3DUSAGE_DYNAMIC, D3DPOOL_DEFAULT, 0, 0, 2, FALSE);
+
+ for (i = 0; i < 6; ++i)
+ {
+ const uint32_t expected_color = dds_cube_map_4_4_expected[(i * 2) + 1];
+
+ winetest_push_context("Face %u", i);
+ IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 0, &desc);
+ get_cube_texture_surface_readback(device, cube_texture, i, 0, &surface_rb);
+ for (y = 0; y < desc.Height; ++y)
+ {
+ for (x = 0; x < desc.Width; ++x)
+ {
+ check_readback_pixel_4bpp(&surface_rb, x, y, expected_color, FALSE);
+ }
+ }
+ release_surface_readback(&surface_rb);
+ winetest_pop_context();
+ }
+ IDirect3DCubeTexture9_Release(cube_texture);
}
static void test_D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device)
=====================================
dlls/d3dx9_36/texture.c
=====================================
@@ -656,7 +656,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *devi
D3DLOCKED_RECT dst_locked_rect;
RECT dst_rect;
- hr = d3dx_image_get_pixels(&image, i, &src_pixels);
+ hr = d3dx_image_get_pixels(&image, 0, i, &src_pixels);
if (FAILED(hr))
break;
@@ -1185,7 +1185,7 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic
D3DLOCKED_BOX dst_locked_box;
RECT dst_rect;
- hr = d3dx_image_get_pixels(&image, i, &src_pixels);
+ hr = d3dx_image_get_pixels(&image, 0, i, &src_pixels);
if (FAILED(hr))
break;
@@ -1378,15 +1378,14 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info,
PALETTEENTRY *palette, IDirect3DCubeTexture9 **cube_texture)
{
- HRESULT hr;
- D3DCAPS9 caps;
- UINT loaded_miplevels;
+ const struct pixel_format_desc *src_fmt_desc, *dst_fmt_desc;
+ BOOL dynamic_texture, format_specified = FALSE;
+ uint32_t loaded_miplevels, skip_levels, i;
+ IDirect3DCubeTexture9 *tex, *staging_tex;
+ struct d3dx_image image;
D3DXIMAGE_INFO img_info;
- BOOL dynamic_texture;
- BOOL file_size = FALSE;
- BOOL file_format = FALSE;
- BOOL file_mip_levels = FALSE;
- IDirect3DCubeTexture9 *tex, *buftex;
+ D3DCAPS9 caps;
+ HRESULT hr;
TRACE("device %p, src_data %p, src_data_size %u, size %u, mip_levels %u, usage %#lx, "
"format %#x, pool %#x, filter %#lx, mip_filter %#lx, color_key 0x%08lx, src_info %p, "
@@ -1397,102 +1396,145 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
if (!device || !cube_texture || !src_data || !src_data_size)
return D3DERR_INVALIDCALL;
- hr = D3DXGetImageInfoFromFileInMemory(src_data, src_data_size, &img_info);
+ staging_tex = tex = *cube_texture = NULL;
+ skip_levels = mip_filter != D3DX_DEFAULT ? mip_filter >> D3DX_SKIP_DDS_MIP_LEVELS_SHIFT : 0;
+ skip_levels &= D3DX_SKIP_DDS_MIP_LEVELS_MASK;
+ hr = d3dx_image_init(src_data, src_data_size, &image, skip_levels, 0);
if (FAILED(hr))
- return hr;
-
- if (img_info.ImageFileFormat != D3DXIFF_DDS)
- return D3DXERR_INVALIDDATA;
-
- if (img_info.Width != img_info.Height)
- return D3DXERR_INVALIDDATA;
-
- if (size == 0 || size == D3DX_DEFAULT_NONPOW2)
- size = img_info.Width;
- if (size == D3DX_DEFAULT)
- size = make_pow2(img_info.Width);
-
- if (format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT)
- format = img_info.Format;
-
- if (size == D3DX_FROM_FILE)
{
- file_size = TRUE;
- size = img_info.Width;
+ FIXME("Unrecognized file format, returning failure.\n");
+ return hr;
}
- if (format == D3DFMT_FROM_FILE)
+ d3dximage_info_from_d3dx_image(&img_info, &image);
+ if (img_info.ResourceType != D3DRTYPE_CUBETEXTURE)
{
- file_format = TRUE;
- format = img_info.Format;
+ hr = E_FAIL;
+ goto err;
}
- if (mip_levels == D3DX_FROM_FILE)
- {
- file_mip_levels = TRUE;
- mip_levels = img_info.MipLevels;
- }
+ /* Handle default values. */
+ if (!size || size == D3DX_DEFAULT_NONPOW2 || size == D3DX_FROM_FILE)
+ size = max(img_info.Width, img_info.Height);
+ else if (size == D3DX_DEFAULT)
+ size = make_pow2(max(img_info.Width, img_info.Height));
+
+ format_specified = (format != D3DFMT_UNKNOWN && format != D3DX_DEFAULT);
+ if (format == D3DFMT_FROM_FILE || format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT)
+ format = img_info.Format;
+ mip_levels = (mip_levels == D3DX_FROM_FILE) ? img_info.MipLevels : mip_levels;
hr = D3DXCheckCubeTextureRequirements(device, &size, &mip_levels, usage, &format, pool);
if (FAILED(hr))
- return hr;
+ {
+ FIXME("Couldn't find suitable texture parameters.\n");
+ goto err;
+ }
- if ((file_size && size != img_info.Width)
- || (file_format && format != img_info.Format)
- || (file_mip_levels && mip_levels != img_info.MipLevels))
- return D3DERR_NOTAVAILABLE;
+ if (color_key && !format_specified)
+ format = get_alpha_replacement_format(format);
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
if (FAILED(hr))
- return D3DERR_INVALIDCALL;
+ {
+ hr = D3DERR_INVALIDCALL;
+ goto err;
+ }
dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC);
if (pool == D3DPOOL_DEFAULT && !dynamic_texture)
{
- hr = D3DXCreateCubeTexture(device, size, mip_levels, 0, format, D3DPOOL_SYSTEMMEM, &buftex);
- tex = buftex;
+ TRACE("Creating staging texture.\n");
+ hr = D3DXCreateCubeTexture(device, size, mip_levels, 0, format, D3DPOOL_SYSTEMMEM, &staging_tex);
+ tex = staging_tex;
}
else
{
hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, pool, &tex);
- buftex = NULL;
}
+
if (FAILED(hr))
- return hr;
+ {
+ FIXME("Texture creation failed.\n");
+ goto err;
+ }
+
+ TRACE("Texture created correctly. Now loading the texture data into it.\n");
+ dst_fmt_desc = get_format_info(format);
+ src_fmt_desc = get_format_info(img_info.Format);
+ loaded_miplevels = min(img_info.MipLevels, IDirect3DCubeTexture9_GetLevelCount(tex));
+ for (i = 0; i < loaded_miplevels; ++i)
+ {
+ struct d3dx_pixels src_pixels, dst_pixels;
+ D3DSURFACE_DESC dst_surface_desc;
+ D3DLOCKED_RECT dst_locked_rect;
+ RECT dst_rect;
+ uint32_t face;
+
+ IDirect3DCubeTexture9_GetLevelDesc(tex, i, &dst_surface_desc);
+ SetRect(&dst_rect, 0, 0, dst_surface_desc.Width, dst_surface_desc.Height);
+ for (face = D3DCUBEMAP_FACE_POSITIVE_X; face <= D3DCUBEMAP_FACE_NEGATIVE_Z; ++face)
+ {
+ hr = d3dx_image_get_pixels(&image, face, i, &src_pixels);
+ if (FAILED(hr))
+ break;
+
+ hr = IDirect3DCubeTexture9_LockRect(tex, face, i, &dst_locked_rect, NULL, 0);
+ if (FAILED(hr))
+ break;
+
+ set_d3dx_pixels(&dst_pixels, dst_locked_rect.pBits, dst_locked_rect.Pitch, 0, palette,
+ dst_surface_desc.Width, dst_surface_desc.Height, 1, &dst_rect);
+
+ hr = d3dx_load_pixels_from_pixels(&dst_pixels, dst_fmt_desc, &src_pixels, src_fmt_desc, filter, color_key);
+ IDirect3DCubeTexture9_UnlockRect(tex, face, i);
+ if (FAILED(hr))
+ break;
+ }
+
+ if (FAILED(hr))
+ break;
+ }
- hr = load_cube_texture_from_dds(tex, src_data, palette, filter, color_key, &img_info);
if (FAILED(hr))
{
- IDirect3DCubeTexture9_Release(tex);
- return hr;
+ FIXME("Texture loading failed.\n");
+ goto err;
}
- loaded_miplevels = min(IDirect3DCubeTexture9_GetLevelCount(tex), img_info.MipLevels);
hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, palette, loaded_miplevels - 1, mip_filter);
if (FAILED(hr))
{
- IDirect3DCubeTexture9_Release(tex);
- return hr;
+ FIXME("Texture filtering failed.\n");
+ goto err;
}
- if (buftex)
+ if (staging_tex)
{
- hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, pool, &tex);
+ hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, pool, cube_texture);
if (FAILED(hr))
- {
- IDirect3DCubeTexture9_Release(buftex);
- return hr;
- }
+ goto err;
- IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)buftex, (IDirect3DBaseTexture9 *)tex);
- IDirect3DCubeTexture9_Release(buftex);
+ IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)staging_tex, (IDirect3DBaseTexture9 *)(*cube_texture));
+ IDirect3DCubeTexture9_Release(staging_tex);
+ }
+ else
+ {
+ *cube_texture = tex;
}
+ d3dx_image_cleanup(&image);
if (src_info)
*src_info = img_info;
- *cube_texture = tex;
- return D3D_OK;
+ return hr;
+
+err:
+ d3dx_image_cleanup(&image);
+ if (tex)
+ IDirect3DCubeTexture9_Release(tex);
+
+ return hr;
}
=====================================
dlls/d3dx9_36/volume.c
=====================================
@@ -202,7 +202,7 @@ HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, cons
set_d3dbox(&box, 0, 0, image_info.Width, image_info.Height, 0, image_info.Depth);
}
- hr = d3dx_image_get_pixels(&image, 0, &pixels);
+ hr = d3dx_image_get_pixels(&image, 0, 0, &pixels);
if (FAILED(hr))
goto exit;
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/b3aac0e5562c8e29c30b2e2a5c7f2…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/b3aac0e5562c8e29c30b2e2a5c7f2…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] wineboot: Downgrade the wineprefix update message to a trace.
by Alexandre Julliard (@julliard) July 24, 2024
by Alexandre Julliard (@julliard) July 24, 2024
July 24, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
b3aac0e5 by François Gouget at 2024-07-24T20:15:30+02:00
wineboot: Downgrade the wineprefix update message to a trace.
There is no reason for Wine to unconditionally pollute stderr.
- - - - -
1 changed file:
- programs/wineboot/wineboot.c
Changes:
=====================================
programs/wineboot/wineboot.c
=====================================
@@ -1612,7 +1612,7 @@ static void update_wineprefix( BOOL force )
install_root_pnp_devices();
update_user_profile();
- WINE_MESSAGE( "wine: configuration in %s has been updated.\n", debugstr_w(prettyprint_configdir()) );
+ TRACE( "wine: configuration in %s has been updated.\n", debugstr_w(prettyprint_configdir()) );
}
done:
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/b3aac0e5562c8e29c30b2e2a5c7f2f…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/b3aac0e5562c8e29c30b2e2a5c7f2f…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] 6 commits: mshtml: Use dispex_get_id in JSDispatchHost_LookupProperty.
by Alexandre Julliard (@julliard) July 24, 2024
by Alexandre Julliard (@julliard) July 24, 2024
July 24, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
a76b5021 by Jacek Caban at 2024-07-24T20:14:45+02:00
mshtml: Use dispex_get_id in JSDispatchHost_LookupProperty.
- - - - -
0ca77e91 by Jacek Caban at 2024-07-24T20:14:47+02:00
mshtml: Introduce get_prop_desc call.
And use it in HTMLRectCollection instead of get_name.
- - - - -
7c2b85a6 by Jacek Caban at 2024-07-24T20:14:49+02:00
mshtml: Use host object script bindings for HTMLRectCollection.
- - - - -
a0319211 by Jacek Caban at 2024-07-24T20:14:49+02:00
jscript: Make sure to use the right name for a prototype reference in find_prop_name_prot.
It may have a different name for case insensitive searches.
- - - - -
99189c31 by Jacek Caban at 2024-07-24T20:14:50+02:00
jscript: Fixup prototype references as part of lookup.
Instead of using fix_protref_prot.
- - - - -
262ad357 by Jacek Caban at 2024-07-24T20:14:51+02:00
jscript: Use a dedicated jsclass_t entry for host objects.
To avoid falling into JSCLASS_OBJECT special-case in disp_call_value_with_caller.
- - - - -
8 changed files:
- dlls/jscript/dispex.c
- dlls/jscript/jscript.h
- dlls/jscript/object.c
- dlls/mshtml/dispex.c
- dlls/mshtml/htmlelem.c
- dlls/mshtml/mshtml_private.h
- dlls/mshtml/tests/documentmode.js
- dlls/mshtml/tests/dom.js
Changes:
=====================================
dlls/jscript/dispex.c
=====================================
@@ -318,13 +318,14 @@ static HRESULT find_external_prop(jsdisp_t *This, const WCHAR *name, BOOL case_i
return S_OK;
}
-static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const WCHAR *name, BOOL case_insens, dispex_prop_t **ret)
+static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const WCHAR *name, BOOL case_insens,
+ dispex_prop_t *prop, dispex_prop_t **ret)
{
const builtin_prop_t *builtin;
- dispex_prop_t *prop;
HRESULT hres;
- prop = lookup_dispex_prop(This, hash, name, case_insens);
+ if(!prop)
+ prop = lookup_dispex_prop(This, hash, name, case_insens);
if(prop && prop->type != PROP_DELETED) {
*ret = prop;
return S_OK;
@@ -367,43 +368,52 @@ static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const WCHAR *name,
return hres;
}
-static HRESULT find_prop_name_prot(jsdisp_t *This, unsigned hash, const WCHAR *name, BOOL case_insens, dispex_prop_t **ret)
+static HRESULT find_prop_name_prot(jsdisp_t *This, unsigned hash, const WCHAR *name, BOOL case_insens,
+ dispex_prop_t *own_prop, dispex_prop_t **ret)
{
- dispex_prop_t *prop, *del=NULL;
+ dispex_prop_t *prot_prop = NULL;
HRESULT hres;
- hres = find_prop_name(This, hash, name, case_insens, &prop);
+ hres = find_prop_name(This, hash, name, case_insens, own_prop, &own_prop);
if(FAILED(hres))
return hres;
- if(prop && prop->type==PROP_DELETED) {
- del = prop;
- } else if(prop) {
- fix_protref_prop(This, prop);
- *ret = prop;
- return S_OK;
+ if(own_prop) {
+ if(own_prop->type == PROP_PROTREF) {
+ prot_prop = &This->prototype->props[own_prop->u.ref];
+ }else if(own_prop->type != PROP_DELETED) {
+ *ret = own_prop;
+ return S_OK;
+ }
}
if(This->prototype) {
- hres = find_prop_name_prot(This->prototype, hash, name, case_insens, &prop);
+ hres = find_prop_name_prot(This->prototype, hash, name, case_insens, prot_prop, &prot_prop);
if(FAILED(hres))
return hres;
- if(prop && prop->type != PROP_DELETED) {
- if(del) {
- del->type = PROP_PROTREF;
- del->u.ref = prop - This->prototype->props;
- prop = del;
+ if(prot_prop && prot_prop->type != PROP_DELETED) {
+ if(own_prop && case_insens && wcscmp(prot_prop->name, own_prop->name)) {
+ hres = find_prop_name(This, prot_prop->hash, prot_prop->name, FALSE, NULL, &own_prop);
+ if(FAILED(hres))
+ return hres;
+ if(own_prop && own_prop->type != PROP_DELETED) {
+ *ret = own_prop;
+ return S_OK;
+ }
+ }
+ if(own_prop) {
+ own_prop->type = PROP_PROTREF;
+ own_prop->u.ref = prot_prop - This->prototype->props;
}else {
- prop = alloc_protref(This, prop->name, prop - This->prototype->props);
- if(!prop)
+ own_prop = alloc_protref(This, prot_prop->name, prot_prop - This->prototype->props);
+ if(!own_prop)
return E_OUTOFMEMORY;
}
-
- *ret = prop;
- return S_OK;
+ }else if(own_prop) {
+ own_prop->type = PROP_DELETED;
}
}
- *ret = del;
+ *ret = own_prop;
return S_OK;
}
@@ -412,7 +422,7 @@ static HRESULT ensure_prop_name(jsdisp_t *This, const WCHAR *name, DWORD create_
dispex_prop_t *prop;
HRESULT hres;
- hres = find_prop_name_prot(This, string_hash(name), name, case_insens, &prop);
+ hres = find_prop_name_prot(This, string_hash(name), name, case_insens, NULL, &prop);
if(SUCCEEDED(hres) && (!prop || prop->type == PROP_DELETED)) {
TRACE("creating prop %s flags %lx\n", debugstr_w(name), create_flags);
@@ -742,7 +752,7 @@ static HRESULT fill_protrefs(jsdisp_t *This)
return hres;
for(iter = This->prototype->props; iter < This->prototype->props+This->prototype->prop_cnt; iter++) {
- hres = find_prop_name(This, iter->hash, iter->name, FALSE, &prop);
+ hres = find_prop_name(This, iter->hash, iter->name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
if(!prop || prop->type==PROP_DELETED) {
@@ -2230,7 +2240,7 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByName(IWineJSDispatch *iface, BSTR
if(grfdex & ~(fdexNameCaseSensitive|fdexNameCaseInsensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK))
FIXME("Unsupported grfdex %lx\n", grfdex);
- hres = find_prop_name(This, string_hash(bstrName), bstrName, grfdex & fdexNameCaseInsensitive, &prop);
+ hres = find_prop_name(This, string_hash(bstrName), bstrName, grfdex & fdexNameCaseInsensitive, NULL, &prop);
if(FAILED(hres))
return hres;
if(!prop) {
@@ -2420,7 +2430,7 @@ HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const built
dispex_prop_t *prop;
HRESULT hres;
- hres = find_prop_name_prot(constr, string_hash(L"prototype"), L"prototype", FALSE, &prop);
+ hres = find_prop_name_prot(constr, string_hash(L"prototype"), L"prototype", FALSE, NULL, &prop);
if(SUCCEEDED(hres) && prop && prop->type!=PROP_DELETED) {
jsval_t val;
@@ -2461,7 +2471,7 @@ HRESULT jsdisp_get_id(jsdisp_t *jsdisp, const WCHAR *name, DWORD flags, DISPID *
hres = ensure_prop_name(jsdisp, name, PROPF_ENUMERABLE | PROPF_CONFIGURABLE | PROPF_WRITABLE,
flags & fdexNameCaseInsensitive, &prop);
else
- hres = find_prop_name_prot(jsdisp, string_hash(name), name, flags & fdexNameCaseInsensitive, &prop);
+ hres = find_prop_name_prot(jsdisp, string_hash(name), name, flags & fdexNameCaseInsensitive, NULL, &prop);
if(FAILED(hres))
return hres;
@@ -2522,7 +2532,7 @@ HRESULT jsdisp_call_name(jsdisp_t *disp, const WCHAR *name, WORD flags, unsigned
dispex_prop_t *prop;
HRESULT hres;
- hres = find_prop_name_prot(disp, string_hash(name), name, FALSE, &prop);
+ hres = find_prop_name_prot(disp, string_hash(name), name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
@@ -2752,7 +2762,7 @@ HRESULT jsdisp_propput(jsdisp_t *obj, const WCHAR *name, DWORD flags, BOOL throw
if(obj->extensible)
hres = ensure_prop_name(obj, name, flags, FALSE, &prop);
else
- hres = find_prop_name(obj, string_hash(name), name, FALSE, &prop);
+ hres = find_prop_name(obj, string_hash(name), name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
if(!prop || (prop->type == PROP_DELETED && !obj->extensible))
@@ -2853,7 +2863,7 @@ HRESULT jsdisp_propget_name(jsdisp_t *obj, const WCHAR *name, jsval_t *val)
dispex_prop_t *prop;
HRESULT hres;
- hres = find_prop_name_prot(obj, string_hash(name), name, FALSE, &prop);
+ hres = find_prop_name_prot(obj, string_hash(name), name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
@@ -2873,7 +2883,7 @@ HRESULT jsdisp_get_idx(jsdisp_t *obj, DWORD idx, jsval_t *r)
swprintf(name, ARRAY_SIZE(name), L"%d", idx);
- hres = find_prop_name_prot(obj, string_hash(name), name, FALSE, &prop);
+ hres = find_prop_name_prot(obj, string_hash(name), name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
@@ -2930,7 +2940,7 @@ HRESULT jsdisp_delete_idx(jsdisp_t *obj, DWORD idx)
swprintf(buf, ARRAY_SIZE(buf), L"%d", idx);
- hres = find_prop_name(obj, string_hash(buf), buf, FALSE, &prop);
+ hres = find_prop_name(obj, string_hash(buf), buf, FALSE, NULL, &prop);
if(FAILED(hres) || !prop)
return hres;
@@ -3026,7 +3036,7 @@ HRESULT disp_delete_name(script_ctx_t *ctx, IDispatch *disp, jsstr_t *name, BOOL
return E_OUTOFMEMORY;
}
- hres = find_prop_name(jsdisp, string_hash(ptr), ptr, FALSE, &prop);
+ hres = find_prop_name(jsdisp, string_hash(ptr), ptr, FALSE, NULL, &prop);
if(prop) {
hres = delete_prop(prop, ret);
}else {
@@ -3073,7 +3083,7 @@ HRESULT jsdisp_get_own_property(jsdisp_t *obj, const WCHAR *name, BOOL flags_onl
dispex_prop_t *prop;
HRESULT hres;
- hres = find_prop_name(obj, string_hash(name), name, FALSE, &prop);
+ hres = find_prop_name(obj, string_hash(name), name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
@@ -3117,7 +3127,7 @@ HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t
dispex_prop_t *prop;
HRESULT hres;
- hres = find_prop_name(obj, string_hash(name), name, FALSE, &prop);
+ hres = find_prop_name(obj, string_hash(name), name, FALSE, NULL, &prop);
if(FAILED(hres))
return hres;
@@ -3408,7 +3418,7 @@ static HRESULT HostObject_to_string(jsdisp_t *jsdisp, jsstr_t **ret)
}
static const builtin_info_t HostObject_info = {
- .class = JSCLASS_OBJECT,
+ .class = JSCLASS_HOST,
.addref = HostObject_addref,
.release = HostObject_release,
.lookup_prop = HostObject_lookup_prop,
=====================================
dlls/jscript/jscript.h
=====================================
@@ -119,6 +119,7 @@ typedef enum {
JSCLASS_MAP,
JSCLASS_SET,
JSCLASS_WEAKMAP,
+ JSCLASS_HOST,
} jsclass_t;
jsdisp_t *iface_to_jsdisp(IDispatch*);
=====================================
dlls/jscript/object.c
=====================================
@@ -55,7 +55,8 @@ static HRESULT Object_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, uns
L"[object Object]",
L"[object Object]",
L"[object Object]",
- L"[object Object]"
+ L"[object Object]",
+ NULL
};
TRACE("\n");
=====================================
dlls/mshtml/dispex.c
=====================================
@@ -2169,6 +2169,20 @@ HRESULT dispex_prop_name(DispatchEx *dispex, DISPID id, BSTR *ret)
HRESULT hres;
if(is_custom_dispid(id)) {
+ if(dispex->info->desc->vtbl->get_prop_desc) {
+ struct property_info desc;
+ WCHAR buf[12];
+
+ hres = dispex->info->desc->vtbl->get_prop_desc(dispex, id, &desc);
+ if(FAILED(hres))
+ return hres;
+ if(!desc.name) {
+ swprintf(buf, ARRAYSIZE(buf), L"%u", desc.index);
+ desc.name = buf;
+ }
+ *ret = SysAllocString(desc.name);
+ return *ret ? S_OK : E_OUTOFMEMORY;
+ }
if(dispex->info->desc->vtbl->get_name)
return dispex->info->desc->vtbl->get_name(dispex, id, ret);
return DISP_E_MEMBERNOTFOUND;
@@ -2299,33 +2313,67 @@ static HRESULT WINAPI JSDispatchHost_GetJSDispatch(IWineJSDispatchHost *iface, I
return S_OK;
}
+HRESULT dispex_index_prop_desc(DispatchEx *dispex, DISPID id, struct property_info *desc)
+{
+ desc->id = id;
+ desc->flags = PROPF_WRITABLE | PROPF_CONFIGURABLE;
+ if(dispex->info->desc->vtbl->next_dispid)
+ desc->flags |= PROPF_ENUMERABLE;
+ desc->name = NULL;
+ desc->index = id - MSHTML_DISPID_CUSTOM_MIN;
+ desc->func_iid = 0;
+ return S_OK;
+}
+
+static HRESULT get_host_property_descriptor(DispatchEx *This, DISPID id, struct property_info *desc)
+{
+ HRESULT hres;
+
+ desc->id = id;
+
+ switch(get_dispid_type(id)) {
+ case DISPEXPROP_BUILTIN: {
+ func_info_t *func;
+
+ hres = get_builtin_func(This->info, id, &func);
+ if(FAILED(hres))
+ return hres;
+ desc->flags = PROPF_WRITABLE | PROPF_CONFIGURABLE;
+ desc->name = func->name;
+ if(func->func_disp_idx < 0) {
+ desc->flags |= PROPF_ENUMERABLE;
+ desc->func_iid = 0;
+ }else {
+ desc->func_iid = func->tid;
+ }
+ break;
+ }
+ case DISPEXPROP_DYNAMIC:
+ desc->flags = PROPF_WRITABLE | PROPF_CONFIGURABLE | PROPF_ENUMERABLE;
+ desc->name = This->dynamic_data->props[id - DISPID_DYNPROP_0].name;
+ desc->func_iid = 0;
+ break;
+ case DISPEXPROP_CUSTOM:
+ return This->info->desc->vtbl->get_prop_desc(This, id, desc);
+ }
+
+ return S_OK;
+}
+
static HRESULT WINAPI JSDispatchHost_LookupProperty(IWineJSDispatchHost *iface, const WCHAR *name, DWORD flags,
struct property_info *desc)
{
DispatchEx *This = impl_from_IWineJSDispatchHost(iface);
- func_info_t *func;
DISPID id;
HRESULT hres;
TRACE("%s (%p)->(%s)\n", This->info->desc->name, This, debugstr_w(name));
- hres = get_builtin_id(This, name, flags, &id);
+ hres = dispex_get_id(This, name, flags, &id);
if(FAILED(hres))
return hres;
- hres = get_builtin_func(This->info, id, &func);
- if(FAILED(hres))
- return hres;
- desc->id = id;
- desc->flags = PROPF_WRITABLE | PROPF_CONFIGURABLE;
- if(func->func_disp_idx < 0) {
- desc->flags |= PROPF_ENUMERABLE;
- desc->func_iid = 0;
- }else {
- desc->func_iid = func->tid;
- }
- desc->name = func->name;
- return S_OK;
+ return get_host_property_descriptor(This, id, desc);
}
static HRESULT WINAPI JSDispatchHost_NextProperty(IWineJSDispatchHost *iface, DISPID id, struct property_info *desc)
=====================================
dlls/mshtml/htmlelem.c
=====================================
@@ -1073,21 +1073,6 @@ static HRESULT HTMLRectCollection_get_dispid(DispatchEx *dispex, const WCHAR *na
return S_OK;
}
-static HRESULT HTMLRectCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
-{
- HTMLRectCollection *This = HTMLRectCollection_from_DispatchEx(dispex);
- DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
- UINT32 len = 0;
- WCHAR buf[11];
-
- nsIDOMClientRectList_GetLength(This->rect_list, &len);
- if(idx >= len)
- return DISP_E_MEMBERNOTFOUND;
-
- len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
- return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
-}
-
static HRESULT HTMLRectCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
@@ -1132,7 +1117,7 @@ static const dispex_static_data_vtbl_t HTMLRectCollection_dispex_vtbl = {
.traverse = HTMLRectCollection_traverse,
.unlink = HTMLRectCollection_unlink,
.get_dispid = HTMLRectCollection_get_dispid,
- .get_name = HTMLRectCollection_get_name,
+ .get_prop_desc = dispex_index_prop_desc,
.invoke = HTMLRectCollection_invoke,
};
static const tid_t HTMLRectCollection_iface_tids[] = {
@@ -3053,7 +3038,7 @@ static HRESULT WINAPI HTMLElement2_getClientRects(IHTMLElement2 *iface, IHTMLRec
rects->IHTMLRectCollection_iface.lpVtbl = &HTMLRectCollectionVtbl;
rects->rect_list = rect_list;
- init_dispatch(&rects->dispex, &HTMLRectCollection_dispex, NULL,
+ init_dispatch(&rects->dispex, &HTMLRectCollection_dispex, This->node.doc->script_global,
dispex_compat_mode(&This->node.event_target.dispex));
*pRectCol = &rects->IHTMLRectCollection_iface;
=====================================
dlls/mshtml/mshtml_private.h
=====================================
@@ -392,6 +392,7 @@ typedef struct {
HRESULT (*invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*delete)(DispatchEx*,DISPID);
HRESULT (*next_dispid)(DispatchEx*,DISPID,DISPID*);
+ HRESULT (*get_prop_desc)(DispatchEx*,DISPID,struct property_info*);
/* Similar to invoke, but allows overriding all dispids */
HRESULT (*disp_invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
@@ -515,6 +516,7 @@ HRESULT dispex_prop_put(DispatchEx *dispex, DISPID id, LCID lcid, VARIANT *v, EX
HRESULT dispex_get_id(DispatchEx *dispex, const WCHAR *name, DWORD flags, DISPID *pid);
HRESULT dispex_next_id(DispatchEx *dispex, DISPID id, DISPID *ret);
HRESULT dispex_prop_name(DispatchEx *dispex, DISPID id, BSTR *ret);
+HRESULT dispex_index_prop_desc(DispatchEx*,DISPID,struct property_info*);
typedef enum {
DISPEXPROP_CUSTOM,
=====================================
dlls/mshtml/tests/documentmode.js
=====================================
@@ -294,7 +294,7 @@ sync_test("builtin_toString", function() {
if(false /* todo_wine */) test("attributes", e.attributes, "NamedNodeMap");
test("childNodes", document.body.childNodes, "NodeList", null, true);
if(clientRects) test("clientRect", clientRects[0], "ClientRect", null, true);
- if(clientRects) test("clientRects", clientRects, "ClientRectList", null, true);
+ if(clientRects) test("clientRects", clientRects, "ClientRectList");
if(currentStyle) test("currentStyle", currentStyle, "MSCurrentStyleCSSProperties", null, true);
if(v >= 11 /* todo_wine */) test("document", document, v < 11 ? "Document" : "HTMLDocument", null, true);
test("elements", document.getElementsByTagName("body"), "HTMLCollection", null, true);
=====================================
dlls/mshtml/tests/dom.js
=====================================
@@ -331,6 +331,18 @@ sync_test("rects", function() {
ok(rects.length === 1, "rect.length = " + rects.length);
ok(rects[0].top === rect.top, "rects[0].top = " + rects[0].top + " rect.top = " + rect.top);
ok(rects[0].bottom === rect.bottom, "rects[0].bottom = " + rects[0].bottom + " rect.bottom = " + rect.bottom);
+
+ ok("" + rects[0] === "[object ClientRect]", "rects[0] = " + rects[0]);
+ ok(rects.hasOwnProperty("0"), 'rects.hasOwnProperty("0") = ' + rects.hasOwnProperty("0"));
+ todo_wine.
+ ok(rects.hasOwnProperty("1"), 'rects.hasOwnProperty("1") = ' + rects.hasOwnProperty("1"));
+ var desc = Object.getOwnPropertyDescriptor(rects, "0");
+ ok(desc.writable === true, "writable = " + desc.writable);
+ todo_wine.
+ ok(desc.enumerable === true, "enumerable = " + desc.enumerable);
+ ok(desc.configurable === true, "configurable = " + desc.configurable);
+ ok("" + desc.value === "[object ClientRect]", "desc.value = " + desc.value);
+
ok(rect.height === rect.bottom - rect.top, "rect.height = " + rect.height + " rect.bottom = " + rect.bottom + " rect.top = " + rect.top);
ok(rect.width === rect.right - rect.left, "rect.width = " + rect.width + " rect.right = " + rect.right + " rect.left = " + rect.left);
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/1d3515481436c867b532110634502…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/1d3515481436c867b532110634502…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] ntdll: Stub NtQueryInformationToken(TokenUIAccess).
by Alexandre Julliard (@julliard) July 23, 2024
by Alexandre Julliard (@julliard) July 23, 2024
July 23, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
1d351548 by Elizabeth Figura at 2024-07-23T21:31:01+02:00
ntdll: Stub NtQueryInformationToken(TokenUIAccess).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42424
- - - - -
2 changed files:
- dlls/ntdll/unix/security.c
- dlls/wow64/security.c
Changes:
=====================================
dlls/ntdll/unix/security.c
=====================================
@@ -293,7 +293,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
0, /* TokenVirtualizationAllowed */
sizeof(DWORD), /* TokenVirtualizationEnabled */
sizeof(TOKEN_MANDATORY_LABEL) + sizeof(SID), /* TokenIntegrityLevel [sizeof(SID) includes one SubAuthority] */
- 0, /* TokenUIAccess */
+ sizeof(DWORD), /* TokenUIAccess */
0, /* TokenMandatoryPolicy */
0, /* TokenLogonSid */
sizeof(DWORD), /* TokenIsAppContainer */
@@ -565,6 +565,11 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
}
break;
+ case TokenUIAccess:
+ *(DWORD *)info = 1;
+ FIXME("TokenUIAccess stub!\n");
+ break;
+
case TokenAppContainerSid:
{
TOKEN_APPCONTAINER_INFORMATION *container = info;
=====================================
dlls/wow64/security.c
=====================================
@@ -376,6 +376,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationToken( UINT *args )
case TokenElevation: /* TOKEN_ELEVATION */
case TokenSessionId: /* ULONG */
case TokenVirtualizationEnabled: /* ULONG */
+ case TokenUIAccess: /* ULONG */
case TokenIsAppContainer: /* ULONG */
/* nothing to map */
return NtQueryInformationToken( handle, class, info, len, retlen );
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/1d3515481436c867b5321106345022…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/1d3515481436c867b5321106345022…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] wine.inf: Don't register wineqtdecoder.dll.
by Alexandre Julliard (@julliard) July 23, 2024
by Alexandre Julliard (@julliard) July 23, 2024
July 23, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
62d37671 by Brendan Shanks at 2024-07-23T21:30:48+02:00
wine.inf: Don't register wineqtdecoder.dll.
wineqtdecoder was removed in 34289e749f44703997e8d904aaf12ac20b691b24.
- - - - -
1 changed file:
- loader/wine.inf.in
Changes:
=====================================
loader/wine.inf.in
=====================================
@@ -2116,7 +2116,6 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,windowscodecs.dll,1
11,,winegstreamer.dll,1
55,,wineps.drv,1
-11,,wineqtdecoder.dll,1
11,,winevulkan.dll,1
55,,winprint.dll,1
11,,wintrust.dll,1
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/62d37671616393284f31a0cca8931f…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/62d37671616393284f31a0cca8931f…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] 5 commits: include: Add encoder codec type guids.
by Alexandre Julliard (@julliard) July 23, 2024
by Alexandre Julliard (@julliard) July 23, 2024
July 23, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
29431ce6 by Ziqing Hui at 2024-07-23T21:30:20+02:00
include: Add encoder codec type guids.
- - - - -
66ea8a91 by Ziqing Hui at 2024-07-23T21:30:24+02:00
include: Add encoder common format guids.
- - - - -
2e7870d9 by Ziqing Hui at 2024-07-23T21:30:26+02:00
include: Add encoder common attribute defines.
- - - - -
b14cef5f by Ziqing Hui at 2024-07-23T21:30:29+02:00
include: Add H264 encoder attribute guids.
- - - - -
d27e6d58 by Ziqing Hui at 2024-07-23T21:30:32+02:00
include: Add video encoder output frame rate defines.
- - - - -
1 changed file:
- include/codecapi.h
Changes:
=====================================
include/codecapi.h
=====================================
@@ -61,6 +61,90 @@ enum eAVEncH264VLevel
eAVEncH264VLevel5_2 = 52
};
+enum eAVEncCommonRateControlMode
+{
+ eAVEncCommonRateControlMode_CBR = 0,
+ eAVEncCommonRateControlMode_PeakConstrainedVBR = 1,
+ eAVEncCommonRateControlMode_UnconstrainedVBR = 2,
+ eAVEncCommonRateControlMode_Quality = 3,
+ eAVEncCommonRateControlMode_LowDelayVBR = 4,
+ eAVEncCommonRateControlMode_GlobalVBR = 5,
+ eAVEncCommonRateControlMode_GlobalLowDelayVBR = 6,
+};
+
+enum eAVEncCommonStreamEndHandling
+{
+ eAVEncCommonStreamEndHandling_DiscardPartial = 0,
+ eAVEncCommonStreamEndHandling_EnsureComplete = 1,
+};
+
+enum eAVEncVideoOutputFrameRateConversion
+{
+ eAVEncVideoOutputFrameRateConversion_Disable = 0,
+ eAVEncVideoOutputFrameRateConversion_Enable = 1,
+ eAVEncVideoOutputFrameRateConversion_Alias = 2
+};
+
DEFINE_GUID(AVDecVideoAcceleration_H264, 0xf7db8a2f, 0x4f48, 0x4ee8, 0xae, 0x31, 0x8b, 0x6e, 0xbe, 0x55, 0x8a, 0xe2);
+DEFINE_GUID(CODECAPI_AVEncCodecType, 0x08af4ac1, 0xf3f2, 0x4c74, 0x9d, 0xcf, 0x37, 0xf2, 0xec, 0x79, 0xf8, 0x26);
+DEFINE_GUID(CODECAPI_GUID_AVEncMPEG1Video, 0xc8dafefe, 0xda1e, 0x4774, 0xb2, 0x7d, 0x11, 0x83, 0x0c, 0x16, 0xb1, 0xfe);
+DEFINE_GUID(CODECAPI_GUID_AVEncMPEG2Video, 0x046dc19a, 0x6677, 0x4aaa, 0xa3, 0x1d, 0xc1, 0xab, 0x71, 0x6f, 0x45, 0x60);
+DEFINE_GUID(CODECAPI_GUID_AVEncMPEG1Audio, 0xd4dd1362, 0xcd4a, 0x4cd6, 0x81, 0x38, 0xb9, 0x4d, 0xb4, 0x54, 0x2b, 0x04);
+DEFINE_GUID(CODECAPI_GUID_AVEncMPEG2Audio, 0xee4cbb1f, 0x9c3f, 0x4770, 0x92, 0xb5, 0xfc, 0xb7, 0xc2, 0xa8, 0xd3, 0x81);
+DEFINE_GUID(CODECAPI_GUID_AVEncWMV, 0x4e0fef9b, 0x1d43, 0x41bd, 0xb8, 0xbd, 0x4d, 0x7b, 0xf7, 0x45, 0x7a, 0x2a);
+DEFINE_GUID(CODECAPI_GUID_AVEndMPEG4Video, 0xdd37b12a, 0x9503, 0x4f8b, 0xb8, 0xd0, 0x32, 0x4a, 0x00, 0xc0, 0xa1, 0xcf);
+DEFINE_GUID(CODECAPI_GUID_AVEncH264Video, 0x95044eab, 0x31b3, 0x47de, 0x8e, 0x75, 0x38, 0xa4, 0x2b, 0xb0, 0x3e, 0x28);
+DEFINE_GUID(CODECAPI_GUID_AVEncDV, 0x09b769c7, 0x3329, 0x44fb, 0x89, 0x54, 0xfa, 0x30, 0x93, 0x7d, 0x3d, 0x5a);
+DEFINE_GUID(CODECAPI_GUID_AVEncWMAPro, 0x1955f90c, 0x33f7, 0x4a68, 0xab, 0x81, 0x53, 0xf5, 0x65, 0x71, 0x25, 0xc4);
+DEFINE_GUID(CODECAPI_GUID_AVEncWMALossless, 0x55ca7265, 0x23d8, 0x4761, 0x90, 0x31, 0xb7, 0x4f, 0xbe, 0x12, 0xf4, 0xc1);
+DEFINE_GUID(CODECAPI_GUID_AVEncWMAVoice, 0x13ed18cb, 0x50e8, 0x4276, 0xa2, 0x88, 0xa6, 0xaa, 0x22, 0x83, 0x82, 0xd9);
+DEFINE_GUID(CODECAPI_GUID_AVEncDolbyDigitalPro, 0xf5be76cc, 0x0ff8, 0x40eb, 0x9c, 0xb1, 0xbb, 0xa9, 0x40, 0x04, 0xd4, 0x4f);
+DEFINE_GUID(CODECAPI_GUID_AVEncDolbyDigitalConsumer, 0xc1a7bf6c, 0x0059, 0x4bfa, 0x94, 0xef, 0xef, 0x74, 0x7a, 0x76, 0x8d, 0x52);
+DEFINE_GUID(CODECAPI_GUID_AVEncDolbyDigitalPlus, 0x698d1b80, 0xf7dd, 0x415c, 0x97, 0x1c, 0x42, 0x49, 0x2a, 0x20, 0x56, 0xc6);
+DEFINE_GUID(CODECAPI_GUID_AVEncDTSHD, 0x2052e630, 0x469d, 0x4bfb, 0x80, 0xca, 0x1d, 0x65, 0x6e, 0x7e, 0x91, 0x8f);
+DEFINE_GUID(CODECAPI_GUID_AVEncDTS, 0x45fbcaa2, 0x5e6e, 0x4ab0, 0x88, 0x93, 0x59, 0x03, 0xbe, 0xe9, 0x3a, 0xcf);
+DEFINE_GUID(CODECAPI_GUID_AVEncMLP, 0x05f73e29, 0xf0d1, 0x431e, 0xa4, 0x1c, 0xa4, 0x74, 0x32, 0xec, 0x5a, 0x66);
+DEFINE_GUID(CODECAPI_GUID_AVEncPCM, 0x844be7f4, 0x26cf, 0x4779, 0xb3, 0x86, 0xcc, 0x05, 0xd1, 0x87, 0x99, 0x0c);
+DEFINE_GUID(CODECAPI_GUID_AVEncSDDS, 0x1dc1b82f, 0x11c8, 0x4c71, 0xb7, 0xb6, 0xee, 0x3e, 0xb9, 0xbc, 0x2b, 0x94);
+
+DEFINE_GUID(CODECAPI_AVEncCommonFormatConstraint, 0x57cbb9b8, 0x116f, 0x4951, 0xb4, 0x0c, 0xc2, 0xa0, 0x35, 0xed, 0x8f, 0x17);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatUnSpecified, 0xaf46a35a, 0x6024, 0x4525, 0xa4, 0x8a, 0x09, 0x4b, 0x97, 0xf5, 0xb3, 0xc2);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatDVD_V, 0xcc9598c4, 0xe7fe, 0x451d, 0xb1, 0xca, 0x76, 0x1b, 0xc8, 0x40, 0xb7, 0xf3);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatDVD_DashVR, 0xe55199d6, 0x044c, 0x4dae, 0xa4, 0x88, 0x53, 0x1e, 0xd3, 0x06, 0x23, 0x5b);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatDVD_PlusVR, 0xe74c6f2e, 0xec37, 0x478d, 0x9a, 0xf4, 0xa5, 0xe1, 0x35, 0xb6, 0x27, 0x1c);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatVCD, 0x95035bf7, 0x9d90, 0x40ff, 0xad, 0x5c, 0x5c, 0xf8, 0xcf, 0x71, 0xca, 0x1d);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatSVCD, 0x51d85818, 0x8220, 0x448c, 0x80, 0x66, 0xd6, 0x9b, 0xed, 0x16, 0xc9, 0xad);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatATSC, 0x8d7b897c, 0xa019, 0x4670, 0xaa, 0x76, 0x2e, 0xdc, 0xac, 0x7a, 0xc2, 0x96);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatDVB, 0x71830d8f, 0x6c33, 0x430d, 0x84, 0x4b, 0xc2, 0x70, 0x5b, 0xaa, 0xe6, 0xdb);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatMP3, 0x349733cd, 0xeb08, 0x4dc2, 0x81, 0x97, 0xe4, 0x98, 0x35, 0xef, 0x82, 0x8b);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatHighMAT, 0x1eabe760, 0xfb2b, 0x4928, 0x90, 0xd1, 0x78, 0xdb, 0x88, 0xee, 0xe8, 0x89);
+DEFINE_GUID(CODECAPI_GUID_AVEncCommonFormatHighMPV, 0xa2d25db8, 0xb8f9, 0x42c2, 0x8b, 0xc7, 0x0b, 0x93, 0xcf, 0x60, 0x47, 0x88);
+
+DEFINE_GUID(CODECAPI_AVEncCommonRateControlMode, 0x1c0608e9, 0x370c, 0x4710, 0x8a, 0x58, 0xcb, 0x61, 0x81, 0xc4, 0x24, 0x23);
+DEFINE_GUID(CODECAPI_AVEncCommonLowLatency, 0x9d3ecd55, 0x89e8, 0x490a, 0x97, 0x0a, 0x0c, 0x95, 0x48, 0xd5, 0xa5, 0x6e);
+DEFINE_GUID(CODECAPI_AVEncCommonMultipassMode, 0x22533d4c, 0x47e1, 0x41b5, 0x93, 0x52, 0xa2, 0xb7, 0x78, 0x0e, 0x7a, 0xc4);
+DEFINE_GUID(CODECAPI_AVEncCommonPassStart, 0x6a67739f, 0x4eb5, 0x4385, 0x99, 0x28, 0xf2, 0x76, 0xa9, 0x39, 0xef, 0x95);
+DEFINE_GUID(CODECAPI_AVEncCommonPassEnd, 0x0e3d01bc, 0xc85c, 0x467d, 0x8b, 0x60, 0xc4, 0x10, 0x12, 0xee, 0x3b, 0xf6);
+DEFINE_GUID(CODECAPI_AVEncCommonRealTime, 0x143a0ff6, 0xa131, 0x43da, 0xb8, 0x1e, 0x98, 0xfb, 0xb8, 0xec, 0x37, 0x8e);
+DEFINE_GUID(CODECAPI_AVEncCommonQuality, 0xfcbf57a3, 0x7ea5, 0x4b0c, 0x96, 0x44, 0x69, 0xb4, 0x0c, 0x39, 0xc3, 0x91);
+DEFINE_GUID(CODECAPI_AVEncCommonQualityVsSpeed, 0x98332df8, 0x03cd, 0x476b, 0x89, 0xfa, 0x3f, 0x9e, 0x44, 0x2d, 0xec, 0x9f);
+DEFINE_GUID(CODECAPI_AVEncCommonTranscodeEncodingProfile, 0x6947787C, 0xF508, 0x4EA9, 0xB1, 0xE9, 0xA1, 0xFE, 0x3A, 0x49, 0xFB, 0xC9);
+DEFINE_GUID(CODECAPI_AVEncCommonMeanBitRate, 0xf7222374, 0x2144, 0x4815, 0xb5, 0x50, 0xa3, 0x7f, 0x8e, 0x12, 0xee, 0x52);
+DEFINE_GUID(CODECAPI_AVEncCommonMeanBitRateInterval, 0xbfaa2f0c, 0xcb82, 0x4bc0, 0x84, 0x74, 0xf0, 0x6a, 0x8a, 0x0d, 0x02, 0x58);
+DEFINE_GUID(CODECAPI_AVEncCommonMaxBitRate, 0x9651eae4, 0x39b9, 0x4ebf, 0x85, 0xef, 0xd7, 0xf4, 0x44, 0xec, 0x74, 0x65);
+DEFINE_GUID(CODECAPI_AVEncCommonMinBitRate, 0x101405b2, 0x2083, 0x4034, 0xa8, 0x06, 0xef, 0xbe, 0xdd, 0xd7, 0xc9, 0xff);
+DEFINE_GUID(CODECAPI_AVEncCommonBufferSize, 0x0db96574, 0xb6a4, 0x4c8b, 0x81, 0x06, 0x37, 0x73, 0xde, 0x03, 0x10, 0xcd);
+DEFINE_GUID(CODECAPI_AVEncCommonBufferInLevel, 0xd9c5c8db, 0xfc74, 0x4064, 0x94, 0xe9, 0xcd, 0x19, 0xf9, 0x47, 0xed, 0x45);
+DEFINE_GUID(CODECAPI_AVEncCommonBufferOutLevel, 0xccae7f49, 0xd0bc, 0x4e3d, 0xa5, 0x7e, 0xfb, 0x57, 0x40, 0x14, 0x00, 0x69);
+DEFINE_GUID(CODECAPI_AVEncCommonStreamEndHandling, 0x6aad30af, 0x6ba8, 0x4ccc, 0x8f, 0xca, 0x18, 0xd1, 0x9b, 0xea, 0xeb, 0x1c);
+DEFINE_GUID(CODECAPI_AVEncStatCommonCompletedPasses, 0x3e5de533, 0x9df7, 0x438c, 0x85, 0x4f, 0x9f, 0x7d, 0xd3, 0x68, 0x3d, 0x34);
+
+DEFINE_GUID(CODECAPI_AVEncH264CABACEnable, 0xee6cad62, 0xd305, 0x4248, 0xa5, 0xe, 0xe1, 0xb2, 0x55, 0xf7, 0xca, 0xf8);
+DEFINE_GUID(CODECAPI_AVEncH264SPSID, 0x50f38f51, 0x2b79, 0x40e3, 0xb3, 0x9c, 0x7e, 0x9f, 0xa0, 0x77, 0x5, 0x1);
+DEFINE_GUID(CODECAPI_AVEncH264PPSID, 0xbfe29ec2, 0x56c, 0x4d68, 0xa3, 0x8d, 0xae, 0x59, 0x44, 0xc8, 0x58, 0x2e);
+
+DEFINE_GUID(CODECAPI_AVEncVideoOutputFrameRate, 0xea85e7c3, 0x9567, 0x4d99, 0x87, 0xc4, 0x02, 0xc1, 0xc2, 0x78, 0xca, 0x7c);
+DEFINE_GUID(CODECAPI_AVEncVideoOutputFrameRateConversion, 0x8c068bf4, 0x369a, 0x4ba3, 0x82, 0xfd, 0xb2, 0x51, 0x8f, 0xb3, 0x39, 0x6e);
+
#endif /* __CODECAPI_H */
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/91317caeea289b0e40b6a021caa2c…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/91317caeea289b0e40b6a021caa2c…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] 9 commits: mshtml: Implement event.cancelBubble.
by Alexandre Julliard (@julliard) July 23, 2024
by Alexandre Julliard (@julliard) July 23, 2024
July 23, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
72651751 by Gabriel Ivăncescu at 2024-07-23T21:29:24+02:00
mshtml: Implement event.cancelBubble.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
63de479c by Gabriel Ivăncescu at 2024-07-23T21:29:24+02:00
mshtml: Implement HTMLEventObj's cancelBubble on top of the underlying event's cancelBubble.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
fa668a15 by Gabriel Ivăncescu at 2024-07-23T21:29:29+02:00
mshtml: Fix special case between stopImmediatePropagation and setting cancelBubble to false.
This implements same buggy style as native, where cancelBubble = false
does not affect the immediate propagation flag, while it does affect normal
propagation flag.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
285e8f0d by Gabriel Ivăncescu at 2024-07-23T21:29:33+02:00
mshtml: Use bitfields for the event BOOL fields.
Since there's a lot of them.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
483412bf by Gabriel Ivăncescu at 2024-07-23T21:29:34+02:00
mshtml: Don't use -moz prefix for box-sizing CSS property.
It was already pretty much broken because the table must be sorted, and
'-' comes first, and IE uses unprefixed version anyway.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
03547558 by Gabriel Ivăncescu at 2024-07-23T21:29:36+02:00
mshtml/tests: Add more tests with invalid CSS props for (get|set)PropertyValue.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
226217c5 by Gabriel Ivăncescu at 2024-07-23T21:29:40+02:00
mshtml: Compactify the style_props expose tests for each style object into a single function.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
4eddb711 by Gabriel Ivăncescu at 2024-07-23T21:29:44+02:00
mshtml: Implement style msTransition.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
91317cae by Gabriel Ivăncescu at 2024-07-23T21:29:44+02:00
mshtml: Implement style msTransform.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
- - - - -
7 changed files:
- dlls/mshtml/htmlevent.c
- dlls/mshtml/htmlevent.h
- dlls/mshtml/htmlstyle.c
- dlls/mshtml/htmlstyle.h
- dlls/mshtml/tests/documentmode.js
- dlls/mshtml/tests/dom.js
- dlls/mshtml/tests/events.js
Changes:
=====================================
dlls/mshtml/htmlevent.c
=====================================
@@ -504,7 +504,7 @@ static HRESULT WINAPI HTMLEventObj_put_cancelBubble(IHTMLEventObj *iface, VARIAN
TRACE("(%p)->(%x)\n", This, v);
if(This->event)
- IDOMEvent_stopPropagation(&This->event->IDOMEvent_iface);
+ IDOMEvent_put_cancelBubble(&This->event->IDOMEvent_iface, v);
return S_OK;
}
@@ -514,8 +514,7 @@ static HRESULT WINAPI HTMLEventObj_get_cancelBubble(IHTMLEventObj *iface, VARIAN
TRACE("(%p)->(%p)\n", This, p);
- *p = variant_bool(This->event && This->event->stop_propagation);
- return S_OK;
+ return IDOMEvent_get_cancelBubble(&This->event->IDOMEvent_iface, p);
}
static HRESULT WINAPI HTMLEventObj_get_fromElement(IHTMLEventObj *iface, IHTMLElement **p)
@@ -2013,7 +2012,6 @@ static HRESULT WINAPI DOMEvent_stopPropagation(IDOMEvent *iface)
TRACE("(%p)\n", This);
This->stop_propagation = TRUE;
- nsIDOMEvent_StopPropagation(This->nsevent);
return S_OK;
}
@@ -2041,15 +2039,25 @@ static HRESULT WINAPI DOMEvent_get_isTrusted(IDOMEvent *iface, VARIANT_BOOL *p)
static HRESULT WINAPI DOMEvent_put_cancelBubble(IDOMEvent *iface, VARIANT_BOOL v)
{
DOMEvent *This = impl_from_IDOMEvent(iface);
- FIXME("(%p)->(%x)\n", This, v);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%x)\n", This, v);
+
+ if(This->phase < 2)
+ return S_OK;
+
+ /* stop_immediate_propagation is not able to be interrupted, but native has a weird behavior. */
+ This->stop_propagation = (v != VARIANT_FALSE);
+ return S_OK;
}
static HRESULT WINAPI DOMEvent_get_cancelBubble(IDOMEvent *iface, VARIANT_BOOL *p)
{
DOMEvent *This = impl_from_IDOMEvent(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ *p = variant_bool(This->stop_propagation);
+ return S_OK;
}
static HRESULT WINAPI DOMEvent_get_srcElement(IDOMEvent *iface, IHTMLElement **p)
@@ -4257,8 +4265,7 @@ static void call_event_handlers(EventTarget *event_target, DOMEvent *event, disp
}
}
- for(listener = listeners; !event->stop_immediate_propagation
- && listener < listeners + listeners_cnt; listener++) {
+ for(listener = listeners; listener < listeners + listeners_cnt; listener++) {
if(listener->type != LISTENER_TYPE_ATTACHED) {
DISPID named_arg = DISPID_THIS;
VARIANTARG args[2];
@@ -4321,6 +4328,9 @@ static void call_event_handlers(EventTarget *event_target, DOMEvent *event, disp
WARN("%p %s attached <<< %08lx\n", event_target, debugstr_w(event->type), hres);
}
}
+
+ if(event->stop_immediate_propagation)
+ break;
}
for(listener = listeners; listener < listeners + listeners_cnt; listener++)
@@ -4469,6 +4479,9 @@ static HRESULT dispatch_event_object(EventTarget *event_target, DOMEvent *event,
call_event_handlers(target_chain[i], event, dispatch_mode);
}
+ if(event->stop_propagation)
+ nsIDOMEvent_StopPropagation(event->nsevent);
+
if(r)
*r = variant_bool(!event->prevent_default);
=====================================
dlls/mshtml/htmlevent.h
=====================================
@@ -83,16 +83,16 @@ typedef struct DOMEvent {
EventTarget *target;
EventTarget *current_target;
ULONGLONG time_stamp;
- BOOL bubbles;
- BOOL cancelable;
- BOOL prevent_default;
- BOOL stop_propagation;
- BOOL stop_immediate_propagation;
- BOOL trusted;
+ unsigned bubbles : 1;
+ unsigned cancelable : 1;
+ unsigned prevent_default : 1;
+ unsigned stop_propagation : 1;
+ unsigned stop_immediate_propagation : 1;
+ unsigned trusted : 1;
+ unsigned no_event_obj : 1;
DOM_EVENT_PHASE phase;
IHTMLEventObj *event_obj;
- BOOL no_event_obj;
} DOMEvent;
const WCHAR *get_event_name(eventid_t);
=====================================
dlls/mshtml/htmlstyle.c
=====================================
@@ -119,6 +119,17 @@ typedef struct {
} style_tbl_entry_t;
static const style_tbl_entry_t style_tbl[] = {
+ {
+ L"-ms-transform",
+ DISPID_IHTMLCSSSTYLEDECLARATION_MSTRANSFORM,
+ DISPID_UNKNOWN
+ },
+ {
+ L"-ms-transition",
+ DISPID_IHTMLCSSSTYLEDECLARATION2_MSTRANSITION,
+ DISPID_UNKNOWN,
+ ATTR_COMPAT_IE10
+ },
{
L"animation",
DISPID_IHTMLCSSSTYLEDECLARATION2_ANIMATION,
@@ -318,7 +329,7 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_FIX_PX
},
{
- L"-moz-box-sizing",
+ L"box-sizing",
DISPID_IHTMLCSSSTYLEDECLARATION_BOXSIZING,
DISPID_A_BOXSIZING
},
@@ -702,6 +713,18 @@ static const style_tbl_entry_t style_tbl[] = {
C_ASSERT(ARRAY_SIZE(style_tbl) == STYLEID_MAX_VALUE);
+static const WCHAR *get_style_nsname(const style_tbl_entry_t *style_entry)
+{
+ if(style_entry->name[0] == '-')
+ return style_entry->name + sizeof("-ms-")-1;
+ return style_entry->name;
+}
+
+static const WCHAR *get_style_prop_nsname(const style_tbl_entry_t *style_entry, const WCHAR *orig_name)
+{
+ return style_entry ? get_style_nsname(style_entry) : orig_name;
+}
+
static const style_tbl_entry_t *lookup_style_tbl(CSSStyle *style, const WCHAR *name)
{
int c, i, min = 0, max = ARRAY_SIZE(style_tbl)-1;
@@ -788,7 +811,7 @@ static HRESULT set_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_
nsAString str_name, str_empty;
nsresult nsres;
- nsAString_InitDepend(&str_name, style_tbl[sid].name);
+ nsAString_InitDepend(&str_name, get_style_nsname(&style_tbl[sid]));
nsAString_InitDepend(&str_empty, L"");
nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, value, &str_empty);
nsAString_Finish(&str_name);
@@ -867,7 +890,7 @@ static HRESULT get_nsstyle_attr_nsval(nsIDOMCSSStyleDeclaration *nsstyle, stylei
nsAString str_name;
nsresult nsres;
- nsAString_InitDepend(&str_name, style_tbl[sid].name);
+ nsAString_InitDepend(&str_name, get_style_nsname(&style_tbl[sid]));
nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(nsstyle, &str_name, value);
nsAString_Finish(&str_name);
if(NS_FAILED(nsres))
@@ -2946,7 +2969,7 @@ static HRESULT WINAPI HTMLStyle_removeAttribute(IHTMLStyle *iface, BSTR strAttri
return S_OK;
}
- nsAString_InitDepend(&name_str, style_entry->name);
+ nsAString_InitDepend(&name_str, get_style_nsname(style_entry));
nsAString_Init(&ret_str, NULL);
nsres = nsIDOMCSSStyleDeclaration_RemoveProperty(This->css_style.nsstyle, &name_str, &ret_str);
if(NS_SUCCEEDED(nsres)) {
@@ -4443,7 +4466,7 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_getPropertyValue(IHTMLCSSStyleDecl
TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), value);
style_entry = lookup_style_tbl(This, name);
- nsAString_InitDepend(&name_str, style_entry ? style_entry->name : name);
+ nsAString_InitDepend(&name_str, get_style_prop_nsname(style_entry, name));
nsAString_InitDepend(&value_str, NULL);
nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(This->nsstyle, &name_str, &value_str);
nsAString_Finish(&name_str);
@@ -4467,7 +4490,7 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_removeProperty(IHTMLCSSStyleDeclar
TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrPropertyName), pbstrPropertyValue);
style_entry = lookup_style_tbl(This, bstrPropertyName);
- nsAString_InitDepend(&name_str, style_entry ? style_entry->name : bstrPropertyName);
+ nsAString_InitDepend(&name_str, get_style_prop_nsname(style_entry, bstrPropertyName));
nsAString_Init(&ret_str, NULL);
nsres = nsIDOMCSSStyleDeclaration_RemoveProperty(This->nsstyle, &name_str, &ret_str);
nsAString_Finish(&name_str);
@@ -4500,7 +4523,7 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_setProperty(IHTMLCSSStyleDeclarati
nsAString_InitDepend(&priority_str, NULL);
}
- nsAString_InitDepend(&name_str, style_entry ? style_entry->name : name);
+ nsAString_InitDepend(&name_str, get_style_prop_nsname(style_entry, name));
nsres = nsIDOMCSSStyleDeclaration_SetProperty(This->nsstyle, &name_str, &value_str, &priority_str);
nsAString_Finish(&name_str);
nsAString_Finish(&value_str);
@@ -7262,15 +7285,19 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_boxShadow(IHTMLCSSStyleDeclara
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_msTransform(IHTMLCSSStyleDeclaration *iface, BSTR v)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ return set_style_property(This, STYLEID_MSTRANSFORM, v);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_get_msTransform(IHTMLCSSStyleDeclaration *iface, BSTR *p)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_style_property(This, STYLEID_MSTRANSFORM, p);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_put_msTransformOrigin(IHTMLCSSStyleDeclaration *iface, BSTR v)
@@ -8760,15 +8787,19 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_msTransitionDelay(IHTMLCSSSty
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_msTransition(IHTMLCSSStyleDeclaration2 *iface, BSTR v)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ return set_style_property(This, STYLEID_MSTRANSITION, v);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_msTransition(IHTMLCSSStyleDeclaration2 *iface, BSTR *p)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_style_property(This, STYLEID_MSTRANSITION, p);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_msTouchAction(IHTMLCSSStyleDeclaration2 *iface, BSTR v)
=====================================
dlls/mshtml/htmlstyle.h
=====================================
@@ -40,6 +40,8 @@ struct HTMLStyle {
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */
typedef enum {
+ STYLEID_MSTRANSFORM,
+ STYLEID_MSTRANSITION,
STYLEID_ANIMATION,
STYLEID_ANIMATION_NAME,
STYLEID_BACKGROUND,
=====================================
dlls/mshtml/tests/documentmode.js
=====================================
@@ -660,60 +660,42 @@ sync_test("xhr open", function() {
});
sync_test("style_props", function() {
- var style = document.body.style;
+ var style = document.body.style, currentStyle = document.body.currentStyle, computedStyle = window.getComputedStyle ? window.getComputedStyle(document.body) : undefined;
- function test_exposed(prop, expect) {
- if(expect)
+ function test_exposed(prop, expect_style, expect_currentStyle, expect_computedStyle) {
+ if(expect_style)
ok(prop in style, prop + " not found in style object.");
else
ok(!(prop in style), prop + " found in style object.");
+ if(expect_currentStyle)
+ ok(prop in currentStyle, prop + " not found in currentStyle object.");
+ else
+ ok(!(prop in currentStyle), prop + " found in currentStyle object.");
+ if(computedStyle) {
+ if(expect_computedStyle)
+ ok(prop in computedStyle, prop + " not found in computedStyle object.");
+ else
+ ok(!(prop in computedStyle), prop + " found in computedStyle object.");
+ }
}
var v = document.documentMode;
- test_exposed("removeAttribute", true);
- test_exposed("zIndex", true);
- test_exposed("z-index", true);
- test_exposed("filter", true);
- test_exposed("pixelTop", true);
- test_exposed("float", true);
- test_exposed("css-float", false);
- test_exposed("style-float", false);
- test_exposed("setProperty", v >= 9);
- test_exposed("removeProperty", v >= 9);
- test_exposed("background-clip", v >= 9);
- test_exposed("msTransform", v >= 9);
- test_exposed("transform", v >= 10);
-
- style = document.body.currentStyle;
-
- test_exposed("zIndex", true);
- test_exposed("z-index", true);
- test_exposed("filter", true);
- test_exposed("pixelTop", false);
- test_exposed("float", true);
- test_exposed("css-float", false);
- test_exposed("style-float", false);
- test_exposed("setProperty", v >= 9);
- test_exposed("removeProperty", v >= 9);
- test_exposed("background-clip", v >= 9);
- test_exposed("transform", v >= 10);
-
- if(window.getComputedStyle) {
- style = window.getComputedStyle(document.body);
-
- test_exposed("removeAttribute", false);
- test_exposed("zIndex", true);
- test_exposed("z-index", true);
- test_exposed("pixelTop", false);
- test_exposed("float", true);
- test_exposed("css-float", false);
- test_exposed("style-float", false);
- test_exposed("setProperty", v >= 9);
- test_exposed("removeProperty", v >= 9);
- test_exposed("background-clip", v >= 9);
- test_exposed("transform", v >= 10);
- }
+ test_exposed("removeAttribute", true, broken(true) ? v >= 9 : false /* todo_wine */, false);
+ test_exposed("zIndex", true, true, true);
+ test_exposed("z-index", true, true, true);
+ test_exposed("filter", true, true, broken(true) ? v >= 10 : v >= 9 /* todo_wine */);
+ test_exposed("pixelTop", true, false, false);
+ test_exposed("float", true, true, true);
+ test_exposed("css-float", false, false, false);
+ test_exposed("style-float", false, false, false);
+ test_exposed("setProperty", v >= 9, v >= 9, v >= 9);
+ test_exposed("removeProperty", v >= 9, v >= 9, v >= 9);
+ test_exposed("background-clip", v >= 9, v >= 9, v >= 9);
+ test_exposed("msTransform", v >= 9, v >= 9, v >= 9);
+ test_exposed("msTransition", v >= 10, v >= 10, v >= 10);
+ test_exposed("transform", v >= 10, v >= 10, v >= 10);
+ test_exposed("transition", v >= 10, v >= 10, v >= 10);
});
sync_test("createElement_inline_attr", function() {
=====================================
dlls/mshtml/tests/dom.js
=====================================
@@ -399,6 +399,20 @@ sync_test("style_properties", function() {
ok(val === "", "removeProperty() returned " + val);
ok(style.testVal === "test", "testVal = " + style.testVal);
+ val = style.getPropertyValue("testVal");
+ ok(val === "", 'style.getPropertyValue("testVal") = ' + val);
+ ok(style.testVal === "test", "testVal = " + style.testVal);
+
+ style.setProperty("testVal", "1px");
+ val = style.getPropertyValue("testVal");
+ ok(val === "", 'style.getPropertyValue("testVal") = ' + val);
+ ok(style.testVal === "test", "testVal = " + style.testVal);
+
+ style.setProperty("test", "1px");
+ val = style.getPropertyValue("test");
+ ok(val === "", 'style.getPropertyValue("test") = ' + val);
+ ok(!("test" in style), "test in style");
+
style["z-index"] = 1;
ok(style.zIndex === 1, "zIndex = " + style.zIndex);
ok(style["z-index"] === 1, "z-index = " + style["z-index"]);
@@ -458,6 +472,21 @@ sync_test("style_properties", function() {
ok(computed_style.zIndex === 4, "computed_style.zIndex = " + computed_style.zIndex);
window.getComputedStyle(elem, null);
+
+ /* ms* prefixed styles alias */
+ var list = [
+ [ "transform", "translate(5px, 5px)" ],
+ [ "transition", "background-color 0.5s linear 0.1s" ]
+ ];
+ for(var i = 0; i < list.length; i++) {
+ var s = list[i][0], v = list[i][1], ms = "ms" + s[0].toUpperCase() + s.substring(1);
+ style[s] = v;
+ ok(style[s] === v, "style." + s + " = " + style[s] + ", expected " + v);
+ ok(style[ms] === v, "style." + ms + " = " + style[ms] + ", expected " + v);
+ elem.style[ms] = v;
+ ok(elem.style[s] === v, "elem.style." + s + " = " + elem.style[s] + ", expected " + v);
+ ok(elem.style[ms] === v, "elem.style." + ms + " = " + elem.style[ms] + ", expected " + v);
+ }
});
sync_test("stylesheets", function() {
=====================================
dlls/mshtml/tests/events.js
=====================================
@@ -255,63 +255,150 @@ sync_test("stop_propagation", function() {
function stop_propagation(e) {
calls += "stop,";
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble before stopPropagation = " + e.cancelBubble);
e.stopPropagation();
+ e.cancelBubble_winetest = true;
+ ok(e.cancelBubble === true, "cancelBubble after stopPropagation = " + e.cancelBubble);
ok(e.bubbles === true, "bubbles = " + e.bubbles);
ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
}
function stop_immediate_propagation(e) {
calls += "immediateStop,";
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble before stopImmediatePropagation = " + e.cancelBubble);
e.stopImmediatePropagation();
+ e.cancelBubble_winetest = true;
+ ok(e.cancelBubble === true, "cancelBubble after stopImmediatePropagation = " + e.cancelBubble);
ok(e.bubbles === true, "bubbles = " + e.bubbles);
ok(e.cancelable === true, "cancelable = " + e.cancelable);
ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
}
- div1.addEventListener("click", stop_immediate_propagation, true);
+ function stop_immediate_propagation_cancel_bubble_false(e) {
+ calls += "immediateStop and cancelBubble(false),";
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble before stopImmediatePropagation = " + e.cancelBubble);
+ e.stopImmediatePropagation();
+ e.cancelBubble = false;
+ e.cancelBubble_winetest = e.eventPhase < 2 ? true : false;
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble after stopImmediatePropagation and setting cancelBubble to false = " + e.cancelBubble);
+ ok(e.bubbles === true, "bubbles = " + e.bubbles);
+ ok(e.cancelable === true, "cancelable = " + e.cancelable);
+ ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
+ }
+
+ function cancel_bubble_impl(i) {
+ return function(e) {
+ calls += "cancelBubble["+i+"],";
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble before setting cancelBubble = " + e.cancelBubble);
+ e.cancelBubble = true;
+ if(e.eventPhase < 2)
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble after setting cancelBubble during capture phase = " + e.cancelBubble);
+ else
+ ok(e.cancelBubble === true, "cancelBubble after setting cancelBubble during bubble phase = " + e.cancelBubble);
+ e.cancelBubble_winetest = e.cancelBubble;
+ ok(e.bubbles === true, "bubbles = " + e.bubbles);
+ ok(e.cancelable === true, "cancelable = " + e.cancelable);
+ ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
+ }
+ }
+
+ var cancel_bubble = [];
+ for(var i = 0; i < 4; i++)
+ cancel_bubble.push(cancel_bubble_impl(i));
+
+ function cancel_bubble_false(e) {
+ calls += "cancelBubble(false),";
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble before setting cancelBubble to false = " + e.cancelBubble);
+ e.cancelBubble = false;
+ if(e.cancelBubble_winetest && e.eventPhase !== 1)
+ delete e.cancelBubble_winetest;
+ ok(e.cancelBubble === (e.cancelBubble_winetest ? true : false), "cancelBubble after setting cancelBubble to false = " + e.cancelBubble);
+ ok(e.bubbles === true, "bubbles = " + e.bubbles);
+ ok(e.cancelable === true, "cancelable = " + e.cancelable);
+ ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
+ }
+
+ div1.addEventListener("click", stop_immediate_propagation_cancel_bubble_false, true);
div1.addEventListener("click", stop_propagation, true);
+ div1.addEventListener("click", cancel_bubble[0], true);
+ div1.addEventListener("click", cancel_bubble_false, true);
div1.addEventListener("click", record_call("div1.click(capture)"), true);
div2.addEventListener("click", stop_immediate_propagation, true);
+ div2.addEventListener("click", cancel_bubble[1], true);
div2.addEventListener("click", stop_propagation, true);
div2.addEventListener("click", record_call("div2.click(capture)"), true);
+ div1.addEventListener("click", cancel_bubble[2], false);
+ div1.addEventListener("click", cancel_bubble_false, false);
div1.addEventListener("click", stop_propagation, false);
div1.addEventListener("click", record_call("div1.click(bubble)"), false);
+ div2.addEventListener("click", stop_immediate_propagation_cancel_bubble_false, false);
div2.addEventListener("click", stop_propagation, false);
+ div2.addEventListener("click", cancel_bubble[3], false);
+ div2.addEventListener("click", cancel_bubble_false, false);
div2.addEventListener("click", record_call("div2.click(bubble)"), false);
calls = "";
div2.click();
- ok(calls === "immediateStop,", "calls = " + calls);
+ ok(calls === "immediateStop and cancelBubble(false),", "calls = " + calls);
- div1.removeEventListener("click", stop_immediate_propagation, true);
+ div1.removeEventListener("click", stop_immediate_propagation_cancel_bubble_false, true);
calls = "";
div2.click();
- ok(calls === "stop,div1.click(capture),", "calls = " + calls);
+ ok(calls === "stop,cancelBubble[0],cancelBubble(false),div1.click(capture),", "calls = " + calls);
div1.removeEventListener("click", stop_propagation, true);
calls = "";
div2.click();
- ok(calls === "div1.click(capture),immediateStop,", "calls = " + calls);
+ ok(calls === "cancelBubble[0],cancelBubble(false),div1.click(capture),immediateStop,", "calls = " + calls);
+
+ div1.removeEventListener("click", cancel_bubble[0], true);
+ calls = "";
+ div2.click();
+ ok(calls === "cancelBubble(false),div1.click(capture),immediateStop,", "calls = " + calls);
div2.removeEventListener("click", stop_immediate_propagation, true);
calls = "";
div2.click();
- ok(calls === "div1.click(capture),stop,div2.click(capture),stop,div2.click(bubble),",
+ ok(calls === "cancelBubble(false),div1.click(capture),cancelBubble[1],stop,div2.click(capture),immediateStop and cancelBubble(false),cancelBubble[2],", // weird native behavior
+ "calls = " + calls);
+
+ div2.removeEventListener("click", stop_immediate_propagation_cancel_bubble_false, false);
+ calls = "";
+ div2.click();
+ ok(calls === "cancelBubble(false),div1.click(capture),cancelBubble[1],stop,div2.click(capture),stop,cancelBubble[3],cancelBubble(false),div2.click(bubble),cancelBubble[2],cancelBubble(false),stop,div1.click(bubble),",
+ "calls = " + calls);
+
+ div2.removeEventListener("click", cancel_bubble_false, false);
+ calls = "";
+ div2.click();
+ ok(calls === "cancelBubble(false),div1.click(capture),cancelBubble[1],stop,div2.click(capture),stop,cancelBubble[3],div2.click(bubble),",
+ "calls = " + calls);
+
+ div2.removeEventListener("click", cancel_bubble[1], true);
+ calls = "";
+ div2.click();
+ ok(calls === "cancelBubble(false),div1.click(capture),stop,div2.click(capture),stop,cancelBubble[3],div2.click(bubble),",
"calls = " + calls);
div2.removeEventListener("click", stop_propagation, true);
calls = "";
div2.click();
- ok(calls === "div1.click(capture),div2.click(capture),stop,div2.click(bubble),",
+ ok(calls === "cancelBubble(false),div1.click(capture),div2.click(capture),stop,cancelBubble[3],div2.click(bubble),",
"calls = " + calls);
div2.removeEventListener("click", stop_propagation, false);
calls = "";
div2.click();
- ok(calls === "div1.click(capture),div2.click(capture),div2.click(bubble),stop,div1.click(bubble),",
+ ok(calls === "cancelBubble(false),div1.click(capture),div2.click(capture),cancelBubble[3],div2.click(bubble),",
+ "calls = " + calls);
+
+ div2.removeEventListener("click", cancel_bubble[3], false);
+ calls = "";
+ div2.click();
+ ok(calls === "cancelBubble(false),div1.click(capture),div2.click(capture),div2.click(bubble),cancelBubble[2],cancelBubble(false),stop,div1.click(bubble),",
"calls = " + calls);
});
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/6d0f2f67a5d7c57d1d32262c66f97…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/6d0f2f67a5d7c57d1d32262c66f97…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
[Git][wine/wine][master] win32u: Fix incorrect comparison in add_virtual_modes.
by Alexandre Julliard (@julliard) July 23, 2024
by Alexandre Julliard (@julliard) July 23, 2024
July 23, 2024
Alexandre Julliard pushed to branch master at wine / wine
Commits:
6d0f2f67 by Fan WenJie at 2024-07-23T21:29:16+02:00
win32u: Fix incorrect comparison in add_virtual_modes.
Fixes: 60eb5cb5d252e400abe91a8fc8f53ea4841d50f9
- - - - -
1 changed file:
- dlls/win32u/sysparams.c
Changes:
=====================================
dlls/win32u/sysparams.c
=====================================
@@ -1914,8 +1914,8 @@ static void add_virtual_modes( struct device_manager_ctx *ctx, const DEVMODEW *c
mode.dmPelsWidth = screen_sizes[j].width;
mode.dmPelsHeight = screen_sizes[j].height;
- if (mode.dmPelsWidth > maximum->dmPelsWidth || mode.dmPelsHeight > maximum->dmPelsWidth) continue;
- if (mode.dmPelsWidth == maximum->dmPelsWidth && mode.dmPelsHeight == maximum->dmPelsWidth) continue;
+ if (mode.dmPelsWidth > maximum->dmPelsWidth || mode.dmPelsHeight > maximum->dmPelsHeight) continue;
+ if (mode.dmPelsWidth == maximum->dmPelsWidth && mode.dmPelsHeight == maximum->dmPelsHeight) continue;
if (mode.dmPelsWidth == initial->dmPelsWidth && mode.dmPelsHeight == initial->dmPelsHeight) continue;
modes[modes_count++] = mode;
}
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/6d0f2f67a5d7c57d1d32262c66f97b…
--
View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/6d0f2f67a5d7c57d1d32262c66f97b…
You're receiving this email because of your account on gitlab.winehq.org.
1
0
Giovanni Mascellani : vkd3d: Document how to install "Graphics Tools" to use the Agility SDK.
by Alexandre Julliard July 17, 2024
by Alexandre Julliard July 17, 2024
July 17, 2024
Module: vkd3d
Branch: master
Commit: 7eb63a7c0d23a83bbdfcfa5ed83b943437051138
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/7eb63a7c0d23a83bbdfcfa5ed83b9…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Date: Wed Jul 17 15:14:26 2024 +0200
vkd3d: Document how to install "Graphics Tools" to use the Agility SDK.
This is a required step, otherwise the debug layer will not work.
---
README | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README b/README
index 86a2bf2e..f6ded1cd 100644
--- a/README
+++ b/README
@@ -134,6 +134,10 @@ these steps:
[1] https://devblogs.microsoft.com/directx/directx12agility/
+ * You also need to enable the "Graphics Tools" optional feature in Windows.
+ Open the "Settings" applications, then look for "Apps", "Optional features",
+ "View features" and install "Graphics Tools".
+
* Configure vkd3d with something like:
'CROSSCC64="x86_64-w64-mingw32-gcc -DVKD3D_AGILITY_SDK_VERSION=<version>"',
as well as the equivalent CROSSCC32 variable for the 32-bit
1
0