winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
July 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
519 discussions
Start a n
N
ew thread
Connor McAdams : d3dx9/tests: Add more tests for D3DXCreateVolumeTextureFromFileInMemoryEx().
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: ab512adc1e57e8a70c481adec8183856680fdf9f URL:
https://gitlab.winehq.org/wine/wine/-/commit/ab512adc1e57e8a70c481adec81838…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Jun 19 09:15:55 2024 -0400 d3dx9/tests: Add more tests for D3DXCreateVolumeTextureFromFileInMemoryEx(). Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/d3dx9_36/tests/d3dx9_test_images.h | 102 ++++++++++++++++++++ dlls/d3dx9_36/tests/texture.c | 166 +++++++++++++++++++++++++++++++- dlls/d3dx9_36/tests/volume.c | 100 ------------------- 3 files changed, 267 insertions(+), 101 deletions(-)
1
0
0
0
Connor McAdams : d3dx9: Use shared code in D3DXLoadVolumeFromFileInMemory().
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: de286c6b65491ac142a7a65375915e80e7113f7a URL:
https://gitlab.winehq.org/wine/wine/-/commit/de286c6b65491ac142a7a65375915e…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Jun 19 08:52:59 2024 -0400 d3dx9: Use shared code in D3DXLoadVolumeFromFileInMemory(). Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/d3dx9_36/d3dx9_private.h | 3 --- dlls/d3dx9_36/surface.c | 18 -------------- dlls/d3dx9_36/tests/volume.c | 56 +++++++++++++++++++------------------------ dlls/d3dx9_36/volume.c | 43 ++++++++++++++++----------------- 4 files changed, 46 insertions(+), 74 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h index 701afffd046..26e4a1560d6 100644 --- a/dlls/d3dx9_36/d3dx9_private.h +++ b/dlls/d3dx9_36/d3dx9_private.h @@ -174,9 +174,6 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic 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 load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, - const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, - const D3DXIMAGE_INFO *src_info); HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info); HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 3e0b880eec4..a97112a3562 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -566,24 +566,6 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur return D3D_OK; } -HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, - const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, - const D3DXIMAGE_INFO *src_info) -{ - UINT row_pitch, slice_pitch; - const struct dds_header *header = src_data; - const BYTE *pixels = (BYTE *)(header + 1); - - if (src_info->ResourceType != D3DRTYPE_VOLUMETEXTURE) - return D3DXERR_INVALIDDATA; - - if (FAILED(d3dx_calculate_pixels_size(src_info->Format, src_info->Width, src_info->Height, &row_pitch, &slice_pitch))) - return E_NOTIMPL; - - return D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box, pixels, src_info->Format, - row_pitch, slice_pitch, NULL, src_box, filter, color_key); -} - 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) { diff --git a/dlls/d3dx9_36/tests/volume.c b/dlls/d3dx9_36/tests/volume.c index 83d832b08c7..9ffc487078c 100644 --- a/dlls/d3dx9_36/tests/volume.c +++ b/dlls/d3dx9_36/tests/volume.c @@ -362,25 +362,22 @@ static void test_D3DXLoadVolumeFromFileInMemory(IDirect3DDevice9 *device) IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, 0, &volume); hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, dds_24bit_8_8, sizeof(dds_24bit_8_8), NULL, D3DX_FILTER_POINT, 0, &img_info); - todo_wine ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - { - check_image_info(&img_info, 8, 8, 1, 4, D3DFMT_R8G8B8, D3DRTYPE_TEXTURE, D3DXIFF_DDS, FALSE); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); + check_image_info(&img_info, 8, 8, 1, 4, D3DFMT_R8G8B8, D3DRTYPE_TEXTURE, D3DXIFF_DDS, FALSE); - IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, 0, &desc); - get_texture_volume_readback(device, volume_texture, 0, &volume_rb); - for (z = 0; z < desc.Depth; ++z) + IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, 0, &desc); + get_texture_volume_readback(device, volume_texture, 0, &volume_rb); + for (z = 0; z < desc.Depth; ++z) + { + for (y = 0; y < desc.Height; ++y) { - for (y = 0; y < desc.Height; ++y) + for (x = 0; x < desc.Width; ++x) { - for (x = 0; x < desc.Width; ++x) - { - check_volume_readback_pixel_4bpp(&volume_rb, x, y, z, 0xffff0000, FALSE); - } + check_volume_readback_pixel_4bpp(&volume_rb, x, y, z, 0xffff0000, FALSE); } } - release_volume_readback(&volume_rb); } + release_volume_readback(&volume_rb); IDirect3DVolume9_Release(volume); IDirect3DVolumeTexture9_Release(volume_texture); @@ -393,30 +390,27 @@ static void test_D3DXLoadVolumeFromFileInMemory(IDirect3DDevice9 *device) IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, 0, &volume); hr = D3DXLoadVolumeFromFileInMemory(volume, NULL, NULL, bmp_32bpp_4_4_argb, sizeof(bmp_32bpp_4_4_argb), NULL, D3DX_FILTER_POINT, 0, &img_info); - todo_wine ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); - if (SUCCEEDED(hr)) - { - check_image_info(&img_info, 4, 4, 1, 1, D3DFMT_A8R8G8B8, D3DRTYPE_TEXTURE, D3DXIFF_BMP, FALSE); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); + check_image_info(&img_info, 4, 4, 1, 1, D3DFMT_A8R8G8B8, D3DRTYPE_TEXTURE, D3DXIFF_BMP, FALSE); - IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, 0, &desc); - get_texture_volume_readback(device, volume_texture, 0, &volume_rb); - for (z = 0; z < desc.Depth; ++z) + IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, 0, &desc); + get_texture_volume_readback(device, volume_texture, 0, &volume_rb); + for (z = 0; z < desc.Depth; ++z) + { + for (y = 0; y < desc.Height; ++y) { - for (y = 0; y < desc.Height; ++y) + const uint32_t *expected_color = &bmp_32bpp_4_4_argb_expected[(y < (desc.Height / 2)) ? 0 : 2]; + + for (x = 0; x < desc.Width; ++x) { - const uint32_t *expected_color = &bmp_32bpp_4_4_argb_expected[(y < (desc.Height / 2)) ? 0 : 2]; - - for (x = 0; x < desc.Width; ++x) - { - if (x < (desc.Width / 2)) - check_volume_readback_pixel_4bpp(&volume_rb, x, y, z, expected_color[0], FALSE); - else - check_volume_readback_pixel_4bpp(&volume_rb, x, y, z, expected_color[1], FALSE); - } + if (x < (desc.Width / 2)) + check_volume_readback_pixel_4bpp(&volume_rb, x, y, z, expected_color[0], FALSE); + else + check_volume_readback_pixel_4bpp(&volume_rb, x, y, z, expected_color[1], FALSE); } } - release_volume_readback(&volume_rb); } + release_volume_readback(&volume_rb); IDirect3DVolume9_Release(volume); IDirect3DVolumeTexture9_Release(volume_texture); diff --git a/dlls/d3dx9_36/volume.c b/dlls/d3dx9_36/volume.c index 0006a521532..06cae72c51e 100644 --- a/dlls/d3dx9_36/volume.c +++ b/dlls/d3dx9_36/volume.c @@ -168,6 +168,8 @@ HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, cons { HRESULT hr; D3DBOX box; + struct d3dx_image image; + struct d3dx_pixels pixels; D3DXIMAGE_INFO image_info; TRACE("dst_volume %p, dst_palette %p, dst_box %p, src_data %p, src_data_size %u, src_box %p, " @@ -175,46 +177,43 @@ HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, cons dst_volume, dst_palette, dst_box, src_data, src_data_size, src_box, filter, color_key, src_info); - if (!dst_volume || !src_data) + if (!dst_volume || !src_data || !src_data_size) return D3DERR_INVALIDCALL; - if (FAILED(hr = D3DXGetImageInfoFromFileInMemory(src_data, src_data_size, &image_info))) - return hr; + hr = d3dx_image_init(src_data, src_data_size, &image, 0, 0); + if (FAILED(hr)) + return D3DXERR_INVALIDDATA; + d3dximage_info_from_d3dx_image(&image_info, &image); if (src_box) { if (src_box->Right > image_info.Width || src_box->Bottom > image_info.Height || src_box->Back > image_info.Depth) - return D3DERR_INVALIDCALL; + { + hr = D3DERR_INVALIDCALL; + goto exit; + } box = *src_box; } else { - box.Left = 0; - box.Top = 0; - box.Right = image_info.Width; - box.Bottom = image_info.Height; - box.Front = 0; - box.Back = image_info.Depth; - - } - - if (image_info.ImageFileFormat != D3DXIFF_DDS) - { - FIXME("File format %#x is not supported yet\n", image_info.ImageFileFormat); - return E_NOTIMPL; + set_d3dbox(&box, 0, 0, image_info.Width, image_info.Height, 0, image_info.Depth); } - hr = load_volume_from_dds(dst_volume, dst_palette, dst_box, src_data, &box, - filter, color_key, &image_info); - if (FAILED(hr)) return hr; + hr = d3dx_image_get_pixels(&image, 0, &pixels); + if (FAILED(hr)) + goto exit; - if (src_info) + hr = D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box, pixels.data, image_info.Format, + pixels.row_pitch, pixels.slice_pitch, pixels.palette, &box, filter, color_key); + if (SUCCEEDED(hr) && src_info) *src_info = image_info; - return D3D_OK; +exit: + d3dx_image_cleanup(&image); + return FAILED(hr) ? hr : D3D_OK; } HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette,
1
0
0
0
Connor McAdams : d3dx9/tests: Add more D3DXLoadVolumeFromFileInMemory() tests.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: 83ba4c0955227eb25129381e87ca29244e505858 URL:
https://gitlab.winehq.org/wine/wine/-/commit/83ba4c0955227eb25129381e87ca29…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Jun 19 08:08:30 2024 -0400 d3dx9/tests: Add more D3DXLoadVolumeFromFileInMemory() tests. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/d3dx9_36/tests/d3dx9_test_images.h | 56 +++++++++- dlls/d3dx9_36/tests/texture.c | 31 ------ dlls/d3dx9_36/tests/volume.c | 175 ++++++++++++++++++++++++++++++++ 3 files changed, 230 insertions(+), 32 deletions(-)
1
0
0
0
Connor McAdams : d3dx9/tests: Move the images used across multiple test files into a shared header.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: d4090df3f4806034060ded3e819f90197334f08a URL:
https://gitlab.winehq.org/wine/wine/-/commit/d4090df3f4806034060ded3e819f90…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri Jun 7 09:07:37 2024 -0400 d3dx9/tests: Move the images used across multiple test files into a shared header. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/d3dx9_36/tests/d3dx9_test_images.h | 381 ++++++++++++++++++++++++++++++++ dlls/d3dx9_36/tests/surface.c | 267 +--------------------- dlls/d3dx9_36/tests/texture.c | 186 +--------------- dlls/d3dx9_36/tests/volume.c | 18 +- 4 files changed, 384 insertions(+), 468 deletions(-)
1
0
0
0
Shaun Ren : dinput: Call handle_foreground_lost() synchronously in cbt_hook_proc().
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: 90020391014b34dc06b382d9d5c97f474221deb6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/90020391014b34dc06b382d9d5c97f…
Author: Shaun Ren <sren(a)codeweavers.com> Date: Fri Jun 28 19:50:11 2024 -0400 dinput: Call handle_foreground_lost() synchronously in cbt_hook_proc(). mouse_unacquire() needs to be called on the same thread as mouse_acquire(), otherwise the cursor hidden by mouse_unacquire() will not be restored. --- dlls/dinput/dinput_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index b27339901e5..8f22b6c3057 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -48,7 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); #define INPUT_THREAD_NOTIFY (WM_USER + 0x10) #define NOTIFY_THREAD_STOP 0 #define NOTIFY_REFRESH_DEVICES 1 -#define NOTIFY_FOREGROUND_LOST 2 struct input_thread_state { @@ -174,8 +173,8 @@ static LRESULT CALLBACK cbt_hook_proc( int code, WPARAM wparam, LPARAM lparam ) if (code == HCBT_ACTIVATE && di_em_win) { CBTACTIVATESTRUCT *data = (CBTACTIVATESTRUCT *)lparam; - SendMessageW( di_em_win, INPUT_THREAD_NOTIFY, NOTIFY_FOREGROUND_LOST, - (LPARAM)data->hWndActive ); + handle_foreground_lost( data->hWndActive ); + SendMessageW( di_em_win, INPUT_THREAD_NOTIFY, NOTIFY_REFRESH_DEVICES, 0 ); } return CallNextHookEx( 0, code, wparam, lparam ); @@ -334,9 +333,6 @@ static LRESULT WINAPI di_em_win_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR case NOTIFY_THREAD_STOP: state->running = FALSE; break; - case NOTIFY_FOREGROUND_LOST: - handle_foreground_lost( (HWND)lparam ); - /* fallthrough */ case NOTIFY_REFRESH_DEVICES: while (state->devices_count--) dinput_device_internal_release( state->devices[state->devices_count] ); input_thread_update_device_list( state );
1
0
0
0
Zhiyi Zhang : winemac.drv: Remove the clear OpenGL views to black hack.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: 1581af4793f83260f4754af885ef997b8e2bf537 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1581af4793f83260f4754af885ef99…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Jun 26 14:30:11 2024 +0800 winemac.drv: Remove the clear OpenGL views to black hack. Fix black screen issues for Active Trader Pro and Assetto Corsa. This reverts commit 4124478b. For Active Trader Pro, the hack ends up clearing a context that was previously drawn to to black, possibly because multiple OpenGL contexts are involved according to Henri's investigation. Assetto Corsa creates a D3D device for a window but doesn't actually do any rendering with it. After ceefcca7, having an OpenGL context for a window clears its OpenGL surface to black after its view becomes visible. The OpenGL surface is on top of other layers for the window so the window becomes black after that. The blackness is originally from glDrawBuffer(GL_FRONT_AND_BACK), which presumably prepares a zero-initialized OpenGL front draw buffer. This also suggests that 4124478b is no longer necessary. I could delay the clearToBlackIfNeeded() call so it uses the behavior before ceefcca7, but now that it seems the hack is no longer necessary and might cause more errors. CrossOver has disabled the hack for a while and it seems fine. I think it's time to remove the hack. --- dlls/winemac.drv/cocoa_opengl.h | 2 -- dlls/winemac.drv/cocoa_opengl.m | 58 +---------------------------------------- dlls/winemac.drv/cocoa_window.m | 11 -------- 3 files changed, 1 insertion(+), 70 deletions(-) diff --git a/dlls/winemac.drv/cocoa_opengl.h b/dlls/winemac.drv/cocoa_opengl.h index bcd257f139b..c90d814931d 100644 --- a/dlls/winemac.drv/cocoa_opengl.h +++ b/dlls/winemac.drv/cocoa_opengl.h @@ -26,13 +26,11 @@ NSView* latentView; BOOL needsUpdate; BOOL needsReattach; - BOOL shouldClearToBlack; GLint backing_size[2]; } @property BOOL needsUpdate; @property BOOL needsReattach; -@property BOOL shouldClearToBlack; @end diff --git a/dlls/winemac.drv/cocoa_opengl.m b/dlls/winemac.drv/cocoa_opengl.m index fa69be7d927..5e3ad03a8b2 100644 --- a/dlls/winemac.drv/cocoa_opengl.m +++ b/dlls/winemac.drv/cocoa_opengl.m @@ -39,7 +39,7 @@ @implementation WineOpenGLContext -@synthesize latentView, needsUpdate, needsReattach, shouldClearToBlack; +@synthesize latentView, needsUpdate, needsReattach; - (void) dealloc { @@ -92,7 +92,6 @@ [super clearDrawable]; [super setView:save]; }); - shouldClearToBlack = TRUE; } } @@ -168,57 +167,6 @@ [self clearDrawable]; } - - (void) clearToBlackIfNeeded - { - if (shouldClearToBlack) - { - NSOpenGLContext* origContext = [NSOpenGLContext currentContext]; - const char *gl_version; - unsigned int major; - GLint draw_framebuffer_binding, draw_buffer; - GLboolean scissor_test, color_mask[4]; - GLfloat clear_color[4]; - - [self makeCurrentContext]; - - gl_version = (const char *)glGetString(GL_VERSION); - major = gl_version[0] - '0'; - /* FIXME: Should check for GL_ARB_framebuffer_object and GL_EXT_framebuffer_object - * for older GL versions. */ - if (major >= 3) - { - glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &draw_framebuffer_binding); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - } - glGetIntegerv(GL_DRAW_BUFFER, &draw_buffer); - scissor_test = glIsEnabled(GL_SCISSOR_TEST); - glGetBooleanv(GL_COLOR_WRITEMASK, color_mask); - glGetFloatv(GL_COLOR_CLEAR_VALUE, clear_color); - glDrawBuffer(GL_FRONT_AND_BACK); - glDisable(GL_SCISSOR_TEST); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glClearColor(0, 0, 0, gl_surface_mode == GL_SURFACE_IN_FRONT_TRANSPARENT ? 0 : 1); - - glClear(GL_COLOR_BUFFER_BIT); - - glClearColor(clear_color[0], clear_color[1], clear_color[2], clear_color[3]); - glColorMask(color_mask[0], color_mask[1], color_mask[2], color_mask[3]); - if (scissor_test) - glEnable(GL_SCISSOR_TEST); - glDrawBuffer(draw_buffer); - if (major >= 3) - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_framebuffer_binding); - glFlush(); - - if (origContext) - [origContext makeCurrentContext]; - else - [NSOpenGLContext clearCurrentContext]; - - shouldClearToBlack = FALSE; - } - } - - (void) removeFromViews:(BOOL)removeViews { if ([self view]) @@ -319,9 +267,6 @@ void macdrv_make_context_current(macdrv_opengl_context c, macdrv_view v, CGRect } [context makeCurrentContext]; - - if ([context view]) - [context clearToBlackIfNeeded]; } else { @@ -360,7 +305,6 @@ void macdrv_update_opengl_context(macdrv_opengl_context c) context.latentView = nil; [context resetSurfaceIfBackingSizeChanged]; - [context clearToBlackIfNeeded]; } else { diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index a56dbbc4614..bae2e21fb48 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -373,7 +373,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi BOOL _everHadGLContext; BOOL _cachedHasGLDescendant; BOOL _cachedHasGLDescendantValid; - BOOL clearedGlSurface; NSMutableAttributedString* markedText; NSRange markedTextSelection; @@ -587,11 +586,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi for (WineOpenGLContext* context in pendingGlContexts) { - if (!clearedGlSurface) - { - context.shouldClearToBlack = TRUE; - clearedGlSurface = TRUE; - } context.needsUpdate = TRUE; macdrv_update_opengl_context((macdrv_opengl_context)context); } @@ -610,11 +604,6 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi if ([[self window] windowNumber] > 0 && !NSIsEmptyRect([self visibleRect])) { [glContexts addObject:context]; - if (!clearedGlSurface) - { - context.shouldClearToBlack = TRUE; - clearedGlSurface = TRUE; - } context.needsUpdate = TRUE; } else
1
0
0
0
Eric Pouech : cmd: Don't set ERRORLEVEL in case of redirection error.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: 9e770440ccff88165e39c61b995e637b95dc98a7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9e770440ccff88165e39c61b995e63…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed Jul 3 10:43:44 2024 +0200 cmd: Don't set ERRORLEVEL in case of redirection error. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/tests/test_builtins.cmd.exp | 2 +- programs/cmd/wcmdmain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 6a25fb3aab9..c7119858d85 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -456,7 +456,7 @@ FAILURE 33 foo@space@ SUCCESS 666 FAILURE 1 -@todo_wine@ERRORLEVEL 666 +ERRORLEVEL 666 SUCCESS 666 SUCCESS 666 FAILURE 33 diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index f5610a5934b..ce48b16d7ec 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -3691,7 +3691,7 @@ RETURN_CODE node_execute(CMD_NODE *node) { WCMD_print_error(); /* FIXME potentially leaking here (if first redir created ok, and second failed */ - return errorlevel = ERROR_INVALID_FUNCTION; + return ERROR_INVALID_FUNCTION; } switch (node->op) {
1
0
0
0
Eric Pouech : cmd: Set success/failure return code for RMDIR/RD command.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: 2fe271ef814b6bd12e13cd45a39d91b62f5f4c03 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2fe271ef814b6bd12e13cd45a39d91…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Fri May 24 15:01:01 2024 +0200 cmd: Set success/failure return code for RMDIR/RD command. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/builtins.c | 19 ++++++++++++------- programs/cmd/tests/test_builtins.cmd.exp | 12 ++++++------ programs/cmd/wcmd.h | 2 +- programs/cmd/wcmdmain.c | 2 +- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 9771511322c..febf6ba94b6 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2100,11 +2100,11 @@ void WCMD_pause (void) * Delete a directory. */ -void WCMD_remove_dir (WCHAR *args) { - +RETURN_CODE WCMD_remove_dir(WCHAR *args) +{ int argno = 0; int argsProcessed = 0; - WCHAR *argN = args; + WCHAR *argN = args; /* Loop through all args */ while (argN) { @@ -2117,7 +2117,12 @@ void WCMD_remove_dir (WCHAR *args) { /* If subdirectory search not supplied, just try to remove and report error if it fails (eg if it contains a file) */ if (wcsstr(quals, L"/S") == NULL) { - if (!RemoveDirectoryW(thisArg)) WCMD_print_error (); + if (!RemoveDirectoryW(thisArg)) + { + RETURN_CODE return_code = GetLastError(); + WCMD_print_error(); + return return_code; + } /* Otherwise use ShFileOp to recursively remove a directory */ } else { @@ -2134,7 +2139,7 @@ void WCMD_remove_dir (WCHAR *args) { ok = WCMD_ask_confirm(question, TRUE, NULL); /* Abort if answer is 'N' */ - if (!ok) return; + if (!ok) return ERROR_INVALID_FUNCTION; } /* Do the delete */ @@ -2155,9 +2160,9 @@ void WCMD_remove_dir (WCHAR *args) { /* Handle no valid args */ if (argsProcessed == 0) { WCMD_output_stderr(WCMD_LoadMessage(WCMD_NOARG)); - return; + return ERROR_INVALID_FUNCTION; } - + return NO_ERROR; } /**************************************************************************** diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 501b27af725..6a25fb3aab9 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -523,19 +523,19 @@ SUCCESS 0 FAILURE 1 SUCCESS 0 --- success/failure for RMDIR/RD command -@todo_wine@FAILURE 1 -@todo_wine@FAILURE 145 -@todo_wine@FAILURE 267 +FAILURE 1 +FAILURE 145 +FAILURE 267 SUCCESS 666 -@todo_wine@FAILURE 2 -@todo_wine@FAILURE 3 +FAILURE 2 +FAILURE 3 ERRORLEVEL 666 ERRORLEVEL 666 ERRORLEVEL 666 ERRORLEVEL 666 ERRORLEVEL 666 ERRORLEVEL 666 -@todo_wine@--- +--- ------------ Testing 'set' ------------ 1 0 diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index 9e10069cdac..5f51a4e1f3a 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -189,7 +189,7 @@ void WCMD_pause (void); RETURN_CODE WCMD_popd(void); void WCMD_print_error (void); RETURN_CODE WCMD_pushd(const WCHAR *args); -void WCMD_remove_dir (WCHAR *command); +RETURN_CODE WCMD_remove_dir(WCHAR *command); RETURN_CODE WCMD_rename(void); void WCMD_run_program (WCHAR *command, BOOL called); void WCMD_setlocal (const WCHAR *args); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 2a814cfe7b0..f5610a5934b 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1875,7 +1875,7 @@ static RETURN_CODE execute_single_command(const WCHAR *command) break; case WCMD_RD: case WCMD_RMDIR: - WCMD_remove_dir (parms_start); + return_code = WCMD_remove_dir(parms_start); break; case WCMD_SETLOCAL: WCMD_setlocal(parms_start);
1
0
0
0
Eric Pouech : cmd: Set success/failure return_code for POPD command.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: bec2a9fa340b6ae0410ec8ce89405684514057d2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/bec2a9fa340b6ae0410ec8ce894056…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Sat Jun 29 13:09:08 2024 +0200 cmd: Set success/failure return_code for POPD command. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/builtins.c | 6 ++++-- programs/cmd/tests/test_builtins.cmd.exp | 2 +- programs/cmd/wcmd.h | 2 +- programs/cmd/wcmdmain.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 6e0a7830900..9771511322c 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1929,17 +1929,19 @@ RETURN_CODE WCMD_pushd(const WCHAR *args) * Pop a directory from the stack */ -void WCMD_popd (void) { +RETURN_CODE WCMD_popd(void) +{ struct env_stack *temp = pushd_directories; if (!pushd_directories) - return; + return ERROR_INVALID_FUNCTION; /* pop the old environment from the stack, and make it the current dir */ pushd_directories = temp->next; SetCurrentDirectoryW(temp->strings); LocalFree (temp->strings); LocalFree (temp); + return NO_ERROR; } /**************************************************************************** diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index dc2288742da..501b27af725 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -513,7 +513,7 @@ SUCCESS 0 SUCCESS 0 FAILURE 1 SUCCESS 666 -@todo_wine@FAILURE 1 +FAILURE 1 ERRORLEVEL 666 --- success/failure for DIR command FAILURE 1 diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index f79645495b3..9e10069cdac 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -186,7 +186,7 @@ void WINAPIV WCMD_output_stderr (const WCHAR *format, ...); void WCMD_output_asis (const WCHAR *message); void WCMD_output_asis_stderr (const WCHAR *message); void WCMD_pause (void); -void WCMD_popd (void); +RETURN_CODE WCMD_popd(void); void WCMD_print_error (void); RETURN_CODE WCMD_pushd(const WCHAR *args); void WCMD_remove_dir (WCHAR *command); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 0f4c3ae8e3f..2a814cfe7b0 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1916,7 +1916,7 @@ static RETURN_CODE execute_single_command(const WCHAR *command) return_code = WCMD_pushd(parms_start); break; case WCMD_POPD: - WCMD_popd(); + return_code = WCMD_popd(); break; case WCMD_ASSOC: WCMD_assoc(parms_start, TRUE);
1
0
0
0
Eric Pouech : cmd: Improve return code / errorlevel handling.
by Alexandre Julliard
04 Jul '24
04 Jul '24
Module: wine Branch: master Commit: 61a1b87b85e74618242b6f066d1ffd05630cb453 URL:
https://gitlab.winehq.org/wine/wine/-/commit/61a1b87b85e74618242b6f066d1ffd…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Fri May 31 10:40:34 2024 +0200 cmd: Improve return code / errorlevel handling. Mainly for commands not setting ERRORLEVEL in case of failure. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/batch.c | 21 +++++++++++++-------- programs/cmd/wcmd.h | 2 +- programs/cmd/wcmdmain.c | 10 ++++++++-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c index f350779a0db..17ef569dc3f 100644 --- a/programs/cmd/batch.c +++ b/programs/cmd/batch.c @@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd); * a label to goto once opened. */ -void WCMD_batch (WCHAR *file, WCHAR *command, WCHAR *startLabel, HANDLE pgmHandle) +RETURN_CODE WCMD_batch(const WCHAR *file, WCHAR *command, const WCHAR *startLabel, HANDLE pgmHandle) { HANDLE h = INVALID_HANDLE_VALUE; BATCH_CONTEXT *prev_context; @@ -54,7 +54,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, WCHAR *startLabel, HANDLE pgmHandl if (h == INVALID_HANDLE_VALUE) { SetLastError (ERROR_FILE_NOT_FOUND); WCMD_print_error (); - return; + return ERROR_INVALID_FUNCTION; } } else { DuplicateHandle(GetCurrentProcess(), pgmHandle, @@ -106,9 +106,6 @@ void WCMD_batch (WCHAR *file, WCHAR *command, WCHAR *startLabel, HANDLE pgmHandl } CloseHandle (h); - if (return_code != RETURN_CODE_ABORTED && return_code != RETURN_CODE_OLD_CHAINING) - errorlevel = return_code; - /* * If there are outstanding setlocal's to the current context, unwind them. */ @@ -124,6 +121,8 @@ void WCMD_batch (WCHAR *file, WCHAR *command, WCHAR *startLabel, HANDLE pgmHandl free(context->batchfileW); LocalFree(context); context = prev_context; + + return return_code; } /******************************************************************* @@ -658,6 +657,7 @@ extern void WCMD_expand(const WCHAR *, WCHAR *); */ RETURN_CODE WCMD_call(WCHAR *command) { + RETURN_CODE return_code; WCHAR buffer[MAXSTRING]; WCMD_expand(command, buffer); @@ -666,7 +666,9 @@ RETURN_CODE WCMD_call(WCHAR *command) { WCMD_run_program(buffer, TRUE); /* If the thing we try to run does not exist, call returns 1 */ - if (errorlevel) errorlevel = ERROR_INVALID_FUNCTION; + if (errorlevel == RETURN_CODE_CANT_LAUNCH) + errorlevel = ERROR_INVALID_FUNCTION; + return_code = errorlevel; } else if (context) { @@ -685,11 +687,14 @@ RETURN_CODE WCMD_call(WCHAR *command) li.u.LowPart = SetFilePointer(context->h, li.u.LowPart, &li.u.HighPart, FILE_CURRENT); WCMD_batch(context->batchfileW, buffer, gotoLabel, context->h); + return_code = errorlevel; SetFilePointer(context->h, li.u.LowPart, &li.u.HighPart, FILE_BEGIN); /* Restore the for loop context */ WCMD_restore_for_loop_context(); - } else + } else { WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_CALLINSCRIPT)); - return errorlevel ? ERROR_INVALID_FUNCTION : NO_ERROR; + return_code = ERROR_INVALID_FUNCTION; + } + return return_code; } diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index c778e6bae5b..f79645495b3 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -160,7 +160,7 @@ typedef int RETURN_CODE; #define RETURN_CODE_OLD_CHAINING (-999998) void WCMD_assoc (const WCHAR *, BOOL); -void WCMD_batch(WCHAR *, WCHAR *, WCHAR *, HANDLE); +RETURN_CODE WCMD_batch(const WCHAR *, WCHAR *, const WCHAR *, HANDLE); RETURN_CODE WCMD_call(WCHAR *command); void WCMD_change_tty (void); void WCMD_choice (const WCHAR *); diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 7c19011f664..0f4c3ae8e3f 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1592,14 +1592,18 @@ void WCMD_run_program (WCHAR *command, BOOL called) /* Special case BAT and CMD */ if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) { + RETURN_CODE return_code; BOOL oldinteractive = interactive; + interactive = FALSE; - WCMD_batch(thisDir, command, NULL, INVALID_HANDLE_VALUE); + return_code = WCMD_batch(thisDir, command, NULL, INVALID_HANDLE_VALUE); interactive = oldinteractive; if (context && !called) { TRACE("Batch completed, but was not 'called' so skipping outer batch too\n"); context->skip_rest = TRUE; } + if (return_code != RETURN_CODE_ABORTED && return_code != RETURN_CODE_OLD_CHAINING) + errorlevel = return_code; return; } else { DWORD exit_code; @@ -3713,8 +3717,10 @@ RETURN_CODE node_execute(CMD_NODE *node) case CMD_ONFAILURE: return_code = node_execute(node->left); return_code = temp_fixup_return_code(node->left, return_code, ERROR_INVALID_FUNCTION); - if (return_code != NO_ERROR) + if (return_code != NO_ERROR && return_code != RETURN_CODE_ABORTED) { + /* that's needed for commands (POPD, RMDIR) that don't set errorlevel in case of failure. */ + errorlevel = return_code; return_code = node_execute(node->right); temp_fixup_return_code(node->right, return_code, 0 /* not used */); }
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
52
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Results per page:
10
25
50
100
200