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
November 2008
----- 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
734 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : mshtml: Implement IHTMLStyle get/put posLeft.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: af0aa2832f6aa45ffbff1dd3d0c2120060d79683 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af0aa2832f6aa45ffbff1dd3d…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Nov 5 22:06:45 2008 +1100 mshtml: Implement IHTMLStyle get/put posLeft. --- dlls/mshtml/htmlstyle.c | 67 ++++++++++++++++++++++++++++++++++++++++++++--- dlls/mshtml/tests/dom.c | 30 +++++++++++++++++++++ 2 files changed, 93 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index e90d723..b11c8c2 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -17,6 +17,7 @@ */ #include <stdarg.h> +#include <math.h> #define COBJMACROS @@ -353,6 +354,57 @@ static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR ex return S_OK; } +static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value) +{ + WCHAR szValue[25]; + WCHAR szFormat[] = {'%','.','0','f','p','x',0}; + + value = floor(value); + + sprintfW(szValue, szFormat, value); + + return set_style_attr(This, sid, szValue, 0); +} + +HRESULT get_nsstyle_pos(HTMLStyle *This, styleid_t sid, float *p) +{ + nsAString str_value; + HRESULT hres; + WCHAR pxW[] = {'p','x',0}; + + TRACE("%p %d %p\n", This, sid, p); + + *p = 0.0f; + + nsAString_Init(&str_value, NULL); + + hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value); + if(hres == S_OK) + { + WCHAR *ptr; + const PRUnichar *value; + + nsAString_GetData(&str_value, &value); + if(value) + { + *p = strtolW(value, &ptr, 10); + + if(*ptr && strcmpW(ptr, pxW)) + { + nsAString_Finish(&str_value); + FIXME("only px values are currently supported\n"); + return E_FAIL; + } + } + } + + TRACE("ret %f\n", *p); + + nsAString_Finish(&str_value); + + return hres; +} + #define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyle, HTMLStyle, iface) static HRESULT WINAPI HTMLStyle_QueryInterface(IHTMLStyle *iface, REFIID riid, void **ppv) @@ -1807,15 +1859,22 @@ static HRESULT WINAPI HTMLStyle_get_posTop(IHTMLStyle *iface, float *p) static HRESULT WINAPI HTMLStyle_put_posLeft(IHTMLStyle *iface, float v) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%f)\n", This, v); + + return set_style_pos(This, STYLEID_LEFT, v); } static HRESULT WINAPI HTMLStyle_get_posLeft(IHTMLStyle *iface, float *p) { HTMLStyle *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(!p) + return E_POINTER; + + return get_nsstyle_pos(This, STYLEID_LEFT, p); } static HRESULT WINAPI HTMLStyle_put_posWidth(IHTMLStyle *iface, float v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 7a14c29..e9d138f 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2281,6 +2281,7 @@ static void test_default_style(IHTMLStyle *style) VARIANT v; BSTR str; HRESULT hres; + float f; test_disp((IUnknown*)style, &DIID_DispHTMLStyle); test_ifaces((IUnknown*)style, style_iids); @@ -2382,12 +2383,41 @@ static void test_default_style(IHTMLStyle *style) ok(!V_BSTR(&v), "V_BSTR(v) != NULL\n"); VariantClear(&v); + /* Test posLeft */ + hres = IHTMLStyle_get_posLeft(style, NULL); + ok(hres == E_POINTER, "get_left failed: %08x\n", hres); + + f = 1.0f; + hres = IHTMLStyle_get_posLeft(style, &f); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(f == 0.0, "expected 0.0 got %f\n", f); + + hres = IHTMLStyle_put_posLeft(style, 4.9f); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + + hres = IHTMLStyle_get_posLeft(style, &f); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(f == 4.0, "expected 4.0 got %f\n", f); + + /* Ensure left is updated correctly. */ + V_VT(&v) = VT_EMPTY; + hres = IHTMLStyle_get_left(style, &v); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); + ok(!strcmp_wa(V_BSTR(&v), "4px"), "V_BSTR(v) = %s\n", dbgstr_w(V_BSTR(&v))); + VariantClear(&v); + + /* Test left */ V_VT(&v) = VT_BSTR; V_BSTR(&v) = a2bstr("3px"); hres = IHTMLStyle_put_left(style, v); ok(hres == S_OK, "put_left failed: %08x\n", hres); VariantClear(&v); + hres = IHTMLStyle_get_posLeft(style, &f); + ok(hres == S_OK, "get_left failed: %08x\n", hres); + ok(f == 3.0, "expected 3.0 got %f\n", f); + V_VT(&v) = VT_EMPTY; hres = IHTMLStyle_get_left(style, &v); ok(hres == S_OK, "get_left failed: %08x\n", hres);
1
0
0
0
Alexandre Julliard : ntdll: Don' t call the dll entry point for native modules.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: 2e25b859eaa0d9b479f8a51327ae6bdd0e327f87 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2e25b859eaa0d9b479f8a5132…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 10 13:20:45 2008 +0100 ntdll: Don't call the dll entry point for native modules. --- dlls/ntdll/loader.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 84dd18f..eab7516 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -715,7 +715,8 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) else p = wm->ldr.FullDllName.Buffer; RtlInitUnicodeString( &wm->ldr.BaseDllName, p ); - if (nt->FileHeader.Characteristics & IMAGE_FILE_DLL) + if (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_NATIVE && + (nt->FileHeader.Characteristics & IMAGE_FILE_DLL)) { wm->ldr.Flags |= LDR_IMAGE_IS_DLL; if (nt->OptionalHeader.AddressOfEntryPoint)
1
0
0
0
Reece Dunn : uxtheme: Add stubs for the double buffer drawing API in Vista.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: 6a78ea4d6cbacd63f938ecb69a9f104f9f79d465 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a78ea4d6cbacd63f938ecb69…
Author: Reece Dunn <msclrhd(a)googlemail.com> Date: Mon Nov 10 09:35:59 2008 +0000 uxtheme: Add stubs for the double buffer drawing API in Vista. --- dlls/uxtheme/Makefile.in | 1 + dlls/uxtheme/buffer.c | 77 +++++++++++++++++++++++++++++++++++++++++++++ dlls/uxtheme/uxtheme.spec | 4 ++ include/uxtheme.h | 28 ++++++++++++++++ 4 files changed, 110 insertions(+), 0 deletions(-) diff --git a/dlls/uxtheme/Makefile.in b/dlls/uxtheme/Makefile.in index da6944f..fb1c44d 100644 --- a/dlls/uxtheme/Makefile.in +++ b/dlls/uxtheme/Makefile.in @@ -8,6 +8,7 @@ IMPORTS = user32 gdi32 advapi32 kernel32 DELAYIMPORTS = msimg32 C_SRCS = \ + buffer.c \ draw.c \ main.c \ metric.c \ diff --git a/dlls/uxtheme/buffer.c b/dlls/uxtheme/buffer.c new file mode 100644 index 0000000..af004d0 --- /dev/null +++ b/dlls/uxtheme/buffer.c @@ -0,0 +1,77 @@ +/* + * uxtheme Double-buffered Drawing API + * + * Copyright (C) 2008 Reece H. Dunn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include <stdlib.h> +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "wingdi.h" +#include "vfwmsgs.h" +#include "uxtheme.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(uxtheme); + +/*********************************************************************** + * BufferedPaintInit (UXTHEME.@) + */ +HRESULT WINAPI BufferedPaintInit(VOID) +{ + FIXME("Stub ()\n"); + return S_OK; +} + +/*********************************************************************** + * BufferedPaintUnInit (UXTHEME.@) + */ +HRESULT WINAPI BufferedPaintUnInit(VOID) +{ + FIXME("Stub ()\n"); + return S_OK; +} + +/*********************************************************************** + * BeginBufferedPaint (UXTHEME.@) + */ +HPAINTBUFFER WINAPI BeginBufferedPaint(HDC hdcTarget, + const RECT * prcTarget, + BP_BUFFERFORMAT dwFormat, + BP_PAINTPARAMS *pPaintParams, + HDC *phdc) +{ + FIXME("Stub (%p %p %d %p %p)\n", hdcTarget, prcTarget, dwFormat, + pPaintParams, phdc); + return NULL; +} + + +/*********************************************************************** + * EndBufferedPaint (UXTHEME.@) + */ +HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER hPaintBuffer, BOOL fUpdateTarget) +{ + FIXME("Stub (%p %d)\n", hPaintBuffer, fUpdateTarget); + return S_OK; +} diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index 6b367b5..2646a15 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -43,6 +43,9 @@ 63 stub -noname MarkSelection # Standard functions +@ stdcall BeginBufferedPaint(ptr ptr long ptr ptr) +@ stdcall BufferedPaintInit() +@ stdcall BufferedPaintUnInit() @ stdcall CloseThemeData(ptr) @ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) @ stdcall DrawThemeBackgroundEx(ptr ptr long long ptr ptr) @@ -52,6 +55,7 @@ @ stdcall DrawThemeText(ptr ptr long long wstr long long long ptr) @ stdcall EnableThemeDialogTexture(ptr long) @ stdcall EnableTheming(long) +@ stdcall EndBufferedPaint(ptr long) @ stdcall GetCurrentThemeName(wstr long wstr long wstr long) @ stdcall GetThemeAppProperties() @ stdcall GetThemeBackgroundContentRect(ptr ptr long long ptr ptr) diff --git a/include/uxtheme.h b/include/uxtheme.h index 8ee63b6..ef369dc 100644 --- a/include/uxtheme.h +++ b/include/uxtheme.h @@ -172,4 +172,32 @@ void WINAPI SetThemeAppProperties(DWORD); HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR); +/* Double-buffered Drawing API */ + +typedef HANDLE HPAINTBUFFER; + +HRESULT WINAPI BufferedPaintInit(VOID); +HRESULT WINAPI BufferedPaintUnInit(VOID); + +typedef enum _BP_BUFFERFORMAT +{ + BPBF_COMPATIBLEBITMAP, + BPBF_DIB, + BPBF_TOPDOWNDIB, + BPBF_TOPDOWNMONODIB +} BP_BUFFERFORMAT; + +typedef struct _BP_PAINTPARAMS +{ + DWORD cbSize; + DWORD dwFlags; + const RECT *prcExclude; + const BLENDFUNCTION *pBlendFunction; +} BP_PAINTPARAMS, *PBP_PAINTPARAMS; + +HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT, + BP_PAINTPARAMS *,HDC *); + +HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL); + #endif
1
0
0
0
Roderick Colenbrander : wined3d: Add two missing D3D8/D3D9 capabilities.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: f571ecd23c29cb2bcefe7e4c0c2f6dfb64255998 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f571ecd23c29cb2bcefe7e4c0…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Mon Nov 10 10:42:27 2008 +0100 wined3d: Add two missing D3D8/D3D9 capabilities. --- dlls/wined3d/directx.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index dbfd3f9..effc9eb 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3062,7 +3062,11 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, if(GL_SUPPORT(SGIS_GENERATE_MIPMAP)) { pCaps->Caps2 |= WINED3DCAPS2_CANAUTOGENMIPMAP; } - pCaps->Caps3 = WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD; + + pCaps->Caps3 = WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD | + WINED3DCAPS3_COPY_TO_VIDMEM | + WINED3DCAPS3_COPY_TO_SYSTEMMEM; + pCaps->PresentationIntervals = WINED3DPRESENT_INTERVAL_IMMEDIATE | WINED3DPRESENT_INTERVAL_ONE;
1
0
0
0
Eric Pouech : dbghelp: Fix all forward declaration cases for UDT.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: fe734de8d9a2ee957abb0356df94481d31f9a82a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe734de8d9a2ee957abb0356d…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Nov 10 11:14:45 2008 +0100 dbghelp: Fix all forward declaration cases for UDT. --- dlls/dbghelp/msc.c | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 41 insertions(+), 9 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 2f62fec..564e745 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -914,17 +914,46 @@ static struct symt* codeview_add_type_enum(struct codeview_type_parse* ctp, static struct symt* codeview_add_type_struct(struct codeview_type_parse* ctp, struct symt* existing, - const char* name, int structlen, - enum UdtKind kind) + const char* name, int structlen, + enum UdtKind kind, unsigned property) { struct symt_udt* symt; + /* if we don't have an existing type, try to find one with same name + * FIXME: what to do when several types in different CUs have same name ? + */ + if (!existing) + { + void* ptr; + struct symt_ht* type; + struct hash_table_iter hti; + + hash_table_iter_init(&ctp->module->ht_types, &hti, name); + while ((ptr = hash_table_iter_up(&hti))) + { + type = GET_ENTRY(ptr, struct symt_ht, hash_elt); + + if (type->symt.tag == SymTagUDT && + type->hash_elt.name && !strcmp(type->hash_elt.name, name)) + { + existing = &type->symt; + break; + } + } + } if (existing) { if (!(symt = codeview_cast_symt(existing, SymTagUDT))) return NULL; /* should also check that all fields are the same */ + if (!(property & 0x80)) /* 0x80 = forward declaration */ + { + if (!symt->size) /* likely prior forward declaration, set UDT size */ + symt_set_udt_size(ctp->module, symt, structlen); + else /* different UDT with same name, create a new type */ + existing = NULL; + } } - else symt = symt_new_udt(ctp->module, name, structlen, kind); + if (!existing) symt = symt_new_udt(ctp->module, name, structlen, kind); return &symt->symt; } @@ -1061,7 +1090,8 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, leaf_len = numeric_leaf(&value, &type->struct_v1.structlen); p_name = (const struct p_string*)((const unsigned char*)&type->struct_v1.structlen + leaf_len); symt = codeview_add_type_struct(ctp, existing, terminate_string(p_name), value, - type->generic.id == LF_CLASS_V1 ? UdtClass : UdtStruct); + type->generic.id == LF_CLASS_V1 ? UdtClass : UdtStruct, + type->struct_v1.property); if (details) { codeview_add_type(curr_type, symt); @@ -1075,7 +1105,8 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, leaf_len = numeric_leaf(&value, &type->struct_v2.structlen); p_name = (const struct p_string*)((const unsigned char*)&type->struct_v2.structlen + leaf_len); symt = codeview_add_type_struct(ctp, existing, terminate_string(p_name), value, - type->generic.id == LF_CLASS_V2 ? UdtClass : UdtStruct); + type->generic.id == LF_CLASS_V2 ? UdtClass : UdtStruct, + type->struct_v2.property); if (details) { codeview_add_type(curr_type, symt); @@ -1089,7 +1120,8 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, leaf_len = numeric_leaf(&value, &type->struct_v3.structlen); c_name = (const char*)&type->struct_v3.structlen + leaf_len; symt = codeview_add_type_struct(ctp, existing, c_name, value, - type->generic.id == LF_CLASS_V3 ? UdtClass : UdtStruct); + type->generic.id == LF_CLASS_V3 ? UdtClass : UdtStruct, + type->struct_v3.property); if (details) { codeview_add_type(curr_type, symt); @@ -1102,7 +1134,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, leaf_len = numeric_leaf(&value, &type->union_v1.un_len); p_name = (const struct p_string*)((const unsigned char*)&type->union_v1.un_len + leaf_len); symt = codeview_add_type_struct(ctp, existing, terminate_string(p_name), - value, UdtUnion); + value, UdtUnion, type->union_v1.property); if (details) { codeview_add_type(curr_type, symt); @@ -1115,7 +1147,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, leaf_len = numeric_leaf(&value, &type->union_v2.un_len); p_name = (const struct p_string*)((const unsigned char*)&type->union_v2.un_len + leaf_len); symt = codeview_add_type_struct(ctp, existing, terminate_string(p_name), - value, UdtUnion); + value, UdtUnion, type->union_v2.property); if (details) { codeview_add_type(curr_type, symt); @@ -1128,7 +1160,7 @@ static struct symt* codeview_parse_one_type(struct codeview_type_parse* ctp, leaf_len = numeric_leaf(&value, &type->union_v3.un_len); c_name = (const char*)&type->union_v3.un_len + leaf_len; symt = codeview_add_type_struct(ctp, existing, c_name, - value, UdtUnion); + value, UdtUnion, type->union_v3.property); if (details) { codeview_add_type(curr_type, symt);
1
0
0
0
Eric Pouech : winedump: Print detailed information about class/ struct properties.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: 721b88f60310eab7525d743d012826d553fdd930 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=721b88f60310eab7525d743d0…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Nov 10 11:14:32 2008 +0100 winedump: Print detailed information about class/struct properties. --- tools/winedump/msc.c | 62 +++++++++++++++++++++++++++++++++++-------------- 1 files changed, 44 insertions(+), 18 deletions(-) diff --git a/tools/winedump/msc.c b/tools/winedump/msc.c index 1d9ff77..ff4c71d 100644 --- a/tools/winedump/msc.c +++ b/tools/winedump/msc.c @@ -217,6 +217,31 @@ static const char* get_attr(unsigned attr) return tmp; } +static const char* get_property(unsigned prop) +{ + static char tmp[1024]; + unsigned pos = 0; + + if (!prop) return "none"; +#define X(s) {if (pos) tmp[pos++] = ';'; strcpy(tmp + pos, s); pos += strlen(s);} + if (prop & 0x0001) X("packed"); + if (prop & 0x0002) X("w/{cd}tor"); + if (prop & 0x0004) X("w/overloaded-ops"); + if (prop & 0x0008) X("nested-class"); + if (prop & 0x0010) X("has-nested-classes"); + if (prop & 0x0020) X("w/overloaded-assign"); + if (prop & 0x0040) X("w/casting-methods"); + if (prop & 0x0080) X("forward"); + if (prop & 0x0100) X("scoped"); +#undef X + + if (prop & ~0x01FF) pos += sprintf(tmp, "unk%x", prop & ~0x01FF); + else tmp[pos] = '\0'; + assert(pos < sizeof(tmp)); + + return tmp; +} + static void do_field(const unsigned char* start, const unsigned char* end) { /* @@ -587,10 +612,10 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type case LF_STRUCTURE_V1: case LF_CLASS_V1: leaf_len = numeric_leaf(&value, &type->struct_v1.structlen); - printf("\t%x => %s V1 '%s' elts:%u prop:%u fieldlist-type:%x derived-type:%x vshape:%x size:%u\n", + printf("\t%x => %s V1 '%s' elts:%u property:%s fieldlist-type:%x derived-type:%x vshape:%x size:%u\n", curr_type, type->generic.id == LF_CLASS_V1 ? "Class" : "Struct", p_string(PSTRING(&type->struct_v1.structlen, leaf_len)), - type->struct_v1.n_element, type->struct_v1.property, + type->struct_v1.n_element, get_property(type->struct_v1.property), type->struct_v1.fieldlist, type->struct_v1.derived, type->struct_v1.vshape, value); break; @@ -598,11 +623,11 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type case LF_STRUCTURE_V2: case LF_CLASS_V2: leaf_len = numeric_leaf(&value, &type->struct_v2.structlen); - printf("\t%x => %s V2 '%s' elts:%u prop:%u\n" + printf("\t%x => %s V2 '%s' elts:%u property:%s\n" " fieldlist-type:%x derived-type:%x vshape:%x size:%u\n", curr_type, type->generic.id == LF_CLASS_V2 ? "Class" : "Struct", p_string(PSTRING(&type->struct_v2.structlen, leaf_len)), - type->struct_v2.n_element, type->struct_v2.property, + type->struct_v2.n_element, get_property(type->struct_v2.property), type->struct_v2.fieldlist, type->struct_v2.derived, type->struct_v2.vshape, value); break; @@ -611,63 +636,64 @@ static void codeview_dump_one_type(unsigned curr_type, const union codeview_type case LF_CLASS_V3: leaf_len = numeric_leaf(&value, &type->struct_v3.structlen); str = (const char*)&type->struct_v3.structlen + leaf_len; - printf("\t%x => %s V3 '%s' elts:%u prop:%u\n" + printf("\t%x => %s V3 '%s' elts:%u property:%s\n" " fieldlist-type:%x derived-type:%x vshape:%x size:%u\n", curr_type, type->generic.id == LF_CLASS_V3 ? "Class" : "Struct", - str, type->struct_v3.n_element, type->struct_v3.property, + str, type->struct_v3.n_element, get_property(type->struct_v3.property), type->struct_v3.fieldlist, type->struct_v3.derived, type->struct_v3.vshape, value); break; case LF_UNION_V1: leaf_len = numeric_leaf(&value, &type->union_v1.un_len); - printf("\t%x => Union V1 '%s' count:%u prop:%u fieldlist-type:%x size:%u\n", + printf("\t%x => Union V1 '%s' count:%u property:%s fieldlist-type:%x size:%u\n", curr_type, p_string(PSTRING(&type->union_v1.un_len, leaf_len)), - type->union_v1.count, type->union_v1.property, + type->union_v1.count, get_property(type->union_v1.property), type->union_v1.fieldlist, value); break; case LF_UNION_V2: leaf_len = numeric_leaf(&value, &type->union_v2.un_len); - printf("\t%x => Union V2 '%s' count:%u prop:%u fieldlist-type:%x size:%u\n", + printf("\t%x => Union V2 '%s' count:%u property:%s fieldlist-type:%x size:%u\n", curr_type, p_string(PSTRING(&type->union_v2.un_len, leaf_len)), - type->union_v2.count, type->union_v2.property, + type->union_v2.count, get_property(type->union_v2.property), type->union_v2.fieldlist, value); break; case LF_UNION_V3: leaf_len = numeric_leaf(&value, &type->union_v3.un_len); str = (const char*)&type->union_v3.un_len + leaf_len; - printf("\t%x => Union V3 '%s' count:%u prop:%u fieldlist-type:%x size:%u\n", + printf("\t%x => Union V3 '%s' count:%u property:%s fieldlist-type:%x size:%u\n", curr_type, str, type->union_v3.count, - type->union_v3.property, type->union_v3.fieldlist, value); + get_property(type->union_v3.property), + type->union_v3.fieldlist, value); break; case LF_ENUM_V1: - printf("\t%x => Enum V1 '%s' type:%x field-type:%x count:%u property:%x\n", + printf("\t%x => Enum V1 '%s' type:%x field-type:%x count:%u property:%s\n", curr_type, p_string(&type->enumeration_v1.p_name), type->enumeration_v1.type, type->enumeration_v1.fieldlist, type->enumeration_v1.count, - type->enumeration_v1.property); + get_property(type->enumeration_v1.property)); break; case LF_ENUM_V2: - printf("\t%x => Enum V2 '%s' type:%x field-type:%x count:%u property:%x\n", + printf("\t%x => Enum V2 '%s' type:%x field-type:%x count:%u property:%s\n", curr_type, p_string(&type->enumeration_v2.p_name), type->enumeration_v2.type, type->enumeration_v2.fieldlist, type->enumeration_v2.count, - type->enumeration_v2.property); + get_property(type->enumeration_v2.property)); break; case LF_ENUM_V3: - printf("\t%x => Enum V3 '%s' type:%x field-type:%x count:%u property:%x\n", + printf("\t%x => Enum V3 '%s' type:%x field-type:%x count:%u property:%s\n", curr_type, type->enumeration_v3.name, type->enumeration_v3.type, type->enumeration_v3.fieldlist, type->enumeration_v3.count, - type->enumeration_v3.property); + get_property(type->enumeration_v3.property)); break; case LF_ARGLIST_V1:
1
0
0
0
Alexandre Julliard : ntdll/tests: Fix the atom test on NT4.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: 85df7344539d986494d5161e0bacebb85c15ad8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85df7344539d986494d5161e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 10 11:57:26 2008 +0100 ntdll/tests: Fix the atom test on NT4. --- dlls/ntdll/tests/atom.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/atom.c b/dlls/ntdll/tests/atom.c index bc5fe2a..e86f3cd 100644 --- a/dlls/ntdll/tests/atom.c +++ b/dlls/ntdll/tests/atom.c @@ -54,6 +54,7 @@ static NTSTATUS (WINAPI *pRtlPinAtomInAtomTable)(RTL_ATOM_TABLE,RTL_ATOM); static NTSTATUS (WINAPI *pRtlQueryAtomInAtomTable)(RTL_ATOM_TABLE,RTL_ATOM,PULONG,PULONG,PWSTR,PULONG); static NTSTATUS (WINAPI* pNtAddAtom)(LPCWSTR,ULONG,RTL_ATOM*); +static NTSTATUS (WINAPI* pNtAddAtomNT4)(LPCWSTR,RTL_ATOM*); static NTSTATUS (WINAPI* pNtQueryInformationAtom)(RTL_ATOM,DWORD,void*,ULONG,PULONG); static const WCHAR EmptyAtom[] = {0}; @@ -266,7 +267,8 @@ static void test_NtAtom(void) Len = 0; res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len); ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %x\n", res); - ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len, "Got wrong length %x\n", Len); + ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %x\n", Len); + if (!Len) pNtAddAtomNT4 = (void *)pNtAddAtom; res = pRtlPinAtomInAtomTable(AtomTable, Atom1); ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); @@ -433,7 +435,11 @@ static void test_Global(void) ATOM_BASIC_INFORMATION* abi = (ATOM_BASIC_INFORMATION*)ptr; ULONG ptr_size = sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR); - res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom); + if (pNtAddAtomNT4) + res = pNtAddAtomNT4(testAtom1, &atom); + else + res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom); + ok(!res, "Added atom (%x)\n", res); memset(abi->Name, 0xcc, 255 * sizeof(WCHAR)); @@ -447,7 +453,8 @@ static void test_Global(void) ptr_size = sizeof(ATOM_BASIC_INFORMATION); res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%x)\n", res); - ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "ok string length\n"); + ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR) || broken(abi->NameLength == sizeof(WCHAR)), /* nt4 */ + "string length %u\n",abi->NameLength); memset(abi->Name, 0xcc, lstrlenW(testAtom1) * sizeof(WCHAR)); ptr_size = sizeof(ATOM_BASIC_INFORMATION) + lstrlenW(testAtom1) * sizeof(WCHAR);
1
0
0
0
Paul Chitescu : user32: Unimplemented SystemParametersInfoW actions display fixme only once.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: fb6b40cc605244209effc5ff138a60b2974fae0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb6b40cc605244209effc5ff1…
Author: Paul Chitescu <paulc(a)voip.null.ro> Date: Fri Nov 7 22:16:32 2008 +0200 user32: Unimplemented SystemParametersInfoW actions display fixme only once. --- dlls/user32/sysparams.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 5662db3..5c3bec5 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -1186,7 +1186,14 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, { #define WINE_SPI_FIXME(x) \ case x: \ - FIXME( "Unimplemented action: %u (%s)\n", x, #x ); \ + { \ + static BOOL warn = TRUE; \ + if (warn) \ + { \ + warn = FALSE; \ + FIXME( "Unimplemented action: %u (%s)\n", x, #x ); \ + } \ + } \ SetLastError( ERROR_INVALID_SPI_VALUE ); \ ret = FALSE; \ break
1
0
0
0
Peter Dons Tychsen : winedos: Implement VGA_WritePixel for int10 service in CGA mode.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: 9d15a99a10303edb40c557016d52f9196c8447d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d15a99a10303edb40c557016…
Author: Peter Dons Tychsen <donpedro(a)tdcadsl.dk> Date: Mon Nov 10 03:17:50 2008 +0100 winedos: Implement VGA_WritePixel for int10 service in CGA mode. --- dlls/winedos/int10.c | 9 +++++++-- dlls/winedos/vga.c | 31 +++++++++++++++++++++++++++++++ dlls/winedos/vga.h | 1 + 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/dlls/winedos/int10.c b/dlls/winedos/int10.c index 4132f58..fbe04eb 100644 --- a/dlls/winedos/int10.c +++ b/dlls/winedos/int10.c @@ -1272,8 +1272,13 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context ) break; case 0x0c: /* WRITE GRAPHICS PIXEL */ - /* Not in graphics mode, can ignore w/o error */ - FIXME("Write Graphics Pixel - Not Supported\n"); + + /* Only supported in CGA mode for now */ + if(data->VideoMode >= 4 && data->VideoMode <= 6) + { + VGA_WritePixel(AL_reg(context), BH_reg(context), CX_reg(context), DX_reg(context)); + } + else FIXME("Write pixel not implemented for current mode\n"); break; case 0x0d: /* READ GRAPHICS PIXEL */ diff --git a/dlls/winedos/vga.c b/dlls/winedos/vga.c index f255994..772038c 100644 --- a/dlls/winedos/vga.c +++ b/dlls/winedos/vga.c @@ -1083,6 +1083,37 @@ void VGA_SetPaletteIndex(unsigned index) vga_fb_palette_index = index; } +/********************************************************************** + * VGA_WritePixel + * + * Write data to the framebuffer + * This is a property of the CGA controller, but might be supported + * later by other framebuffer types + */ +void VGA_WritePixel(unsigned color, unsigned page, unsigned col, unsigned row) +{ + int off; + int bits; + int pos; + + /* Calculate CGA byte offset */ + char *data = vga_fb_window_data; + off = row & 1 ? (8 * 1024) : 0; + off += (80 * (row/2)); + off += col/4; + + /* Calculate bits offset */ + pos = 6 - (col%4 * 2); + + /* Clear current data */ + bits = 0x03 << pos; + data[off] &= ~bits; + + /* Set new data */ + bits = color << pos; + data[off] |= bits; +} + /*** TEXT MODE ***/ /* prepare the text mode video memory copy that is used to only diff --git a/dlls/winedos/vga.h b/dlls/winedos/vga.h index 60444a9..10f5c49 100644 --- a/dlls/winedos/vga.h +++ b/dlls/winedos/vga.h @@ -42,6 +42,7 @@ void VGA_ShowMouse(BOOL show); void VGA_UpdatePalette(void); void VGA_SetPaletteIndex(unsigned index); void VGA_SetBright(BOOL bright); +void VGA_WritePixel(unsigned color, unsigned page, unsigned col, unsigned row); /* text mode */ void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
1
0
0
0
Peter Dons Tychsen : winedos: Implement int10 CGA palette control.
by Alexandre Julliard
10 Nov '08
10 Nov '08
Module: wine Branch: master Commit: db0a4b9c9b6fcfc5b7a5aef36ad970fcb011d39b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=db0a4b9c9b6fcfc5b7a5aef36…
Author: Peter Dons Tychsen <donpedro(a)tdcadsl.dk> Date: Mon Nov 10 01:55:59 2008 +0100 winedos: Implement int10 CGA palette control. --- dlls/winedos/int10.c | 22 +++++++++- dlls/winedos/vga.c | 105 +++++++++++++++++++++++++++++++++++++------------ dlls/winedos/vga.h | 3 + 3 files changed, 101 insertions(+), 29 deletions(-) diff --git a/dlls/winedos/int10.c b/dlls/winedos/int10.c index c1ec98b..4132f58 100644 --- a/dlls/winedos/int10.c +++ b/dlls/winedos/int10.c @@ -1242,11 +1242,27 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context ) apparently, the foreground or attribute of the background with this call, so we should check first to see what the foreground already is... FIXME */ - FIXME("Set Background/Border Color: %d/%d\n", - BH_reg(context), BL_reg(context)); + + /* For CGA modes, background color change is the same as writing + to I/O address 0x3d9 bit 4 */ + if(data->VideoMode >= 4 && data->VideoMode <= 6) + { + VGA_SetBright((BL_reg(context) & 0x10) && 1); + VGA_UpdatePalette(); + } + else FIXME("Set Background/Border Color: %d/%d\n", + BH_reg(context), BL_reg(context)); break; case 0x01: /* SET PALETTE */ - FIXME("Set Palette - Not Supported\n"); + + /* For CGA modes, palette color change is the same as writing + to I/O address 0x3d9 bit 5 */ + if(data->VideoMode >= 4 && data->VideoMode <= 6) + { + VGA_SetPaletteIndex(BL_reg(context) & 1); + VGA_UpdatePalette(); + } + else FIXME("Set Palette - Not Supported: %02X\n", BL_reg(context)); break; default: FIXME("INT 10 AH = 0x0b BH = 0x%x - Unknown\n", diff --git a/dlls/winedos/vga.c b/dlls/winedos/vga.c index bc8bc85..f255994 100644 --- a/dlls/winedos/vga.c +++ b/dlls/winedos/vga.c @@ -100,6 +100,8 @@ static int vga_fb_window = 0; static int vga_fb_window_size; static char *vga_fb_window_data; static PALETTEENTRY *vga_fb_palette; +static unsigned vga_fb_palette_index; +static BOOL vga_fb_bright; /* * VGA text mode data. @@ -196,7 +198,7 @@ static PALETTEENTRY cga_palette2[] = { {0x00, 0x00, 0x00}, /* 0 - Black */ {0x00, 0xAA, 0x00}, /* 1 - Green */ {0xAA, 0x00, 0x00}, /* 2 - Red */ - {0xAA, 0x55, 0xFF} /* 3 - Brown */ + {0xAA, 0x55, 0x00} /* 3 - Brown */ }; /* @@ -832,6 +834,8 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth) vga_fb_window_data = CGA_WINDOW_START; vga_fb_window_size = CGA_WINDOW_SIZE; vga_fb_palette = cga_palette1; + vga_fb_palette_index = 0; + vga_fb_bright = 0; } /* Clean the HW buffer */ @@ -1012,6 +1016,73 @@ void VGA_ShowMouse( BOOL show ) MZ_RunInThread( VGA_DoShowMouse, (ULONG_PTR)show ); } + +/********************************************************************** + * VGA_UpdatePalette + * + * Update the current palette + * + * Note: When updating the current CGA palette, palette index 0 + * refers to palette2, and index 1 is palette1 (default palette) + */ +void VGA_UpdatePalette(void) +{ + /* Figure out which palette is used now */ + if(vga_fb_bright == TRUE) + { + if(vga_fb_palette_index == 0) + { + vga_fb_palette = cga_palette2_bright; + } + else if(vga_fb_palette_index == 1) + { + vga_fb_palette = cga_palette1_bright; + } + } + else + { + if(vga_fb_palette_index == 0) + { + vga_fb_palette = cga_palette2; + } + else if(vga_fb_palette_index == 1) + { + vga_fb_palette = cga_palette1; + } + } + + /* Now update the palette */ + VGA_SetPalette(vga_fb_palette,0,4); +} + +/********************************************************************** + * VGA_SetBright + * + * Select if using a "bright" palette or not. + * This is a property of the CGA controller + */ +void VGA_SetBright(BOOL bright) +{ + TRACE("%i\n", bright); + + /* Remember the "bright" value used by the CGA controller */ + vga_fb_bright = bright; +} + +/********************************************************************** + * VGA_SetPaletteIndex + * + * Select the index of the palette which is currently in use + * This is a property of the CGA controller + */ +void VGA_SetPaletteIndex(unsigned index) +{ + TRACE("%i\n", index); + + /* Remember the palette index, which is only used by CGA for now */ + vga_fb_palette_index = index; +} + /*** TEXT MODE ***/ /* prepare the text mode video memory copy that is used to only @@ -1505,32 +1576,14 @@ void VGA_ioport_out( WORD port, BYTE val ) break; /* Colour control register (CGA) */ case 0x3d9: - /* Check for "switch to bright" */ - if(val & 0x10) - { - if(vga_fb_palette == cga_palette1) - { - /* Switch to palette 1 bright version */ - VGA_SetPalette(cga_palette1_bright,0,4); - vga_fb_palette = cga_palette1_bright; - } - else if(vga_fb_palette == cga_palette2) - { - /* Switch to palette 2 bright version */ - VGA_SetPalette(cga_palette2_bright,0,4); - vga_fb_palette = cga_palette2_bright; - } - } + /* Set bright */ + VGA_SetBright((val & 0x10) && 1); - /* Check for "deselect palette1" */ - if(val & 0x20) - { - if(vga_fb_palette == cga_palette1) - { - VGA_SetPalette(cga_palette2,0,4); - vga_fb_palette = cga_palette2; - } - } + /* Set palette index */ + VGA_SetPaletteIndex((val & 0x20) && 1); + + /* Now update the palette */ + VGA_UpdatePalette(); break; default: FIXME("Unsupported VGA register: 0x%04x (value 0x%02x)\n", port, val); diff --git a/dlls/winedos/vga.h b/dlls/winedos/vga.h index e417388..60444a9 100644 --- a/dlls/winedos/vga.h +++ b/dlls/winedos/vga.h @@ -39,6 +39,9 @@ void VGA_SetQuadPalette(RGBQUAD*color,int start,int len); void VGA_SetWindowStart(int start); int VGA_GetWindowStart(void); void VGA_ShowMouse(BOOL show); +void VGA_UpdatePalette(void); +void VGA_SetPaletteIndex(unsigned index); +void VGA_SetBright(BOOL bright); /* text mode */ void VGA_InitAlphaMode(unsigned*Xres,unsigned*Yres);
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
74
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200