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 2007
----- 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
3 participants
957 discussions
Start a n
N
ew thread
Michael Stefaniuc : ntdll: Remove a break after a break. Found by Smatch.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: b8880e16400d8ab5503d9bfba9060176f15e5ca3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8880e16400d8ab5503d9bfba…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jul 25 23:22:21 2007 +0200 ntdll: Remove a break after a break. Found by Smatch. --- dlls/ntdll/serial.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/serial.c b/dlls/ntdll/serial.c index 6b2e764..bd6f9ca 100644 --- a/dlls/ntdll/serial.c +++ b/dlls/ntdll/serial.c @@ -259,7 +259,6 @@ static NTSTATUS get_line_control(int fd, SERIAL_LINE_CONTROL* slc) #ifdef CMSPAR case PARENB|CMSPAR: slc->Parity = MARKPARITY; break; case PARENB|PARODD|CMSPAR: slc->Parity = SPACEPARITY; break; - break; #endif } switch (port.c_cflag & CSIZE)
1
0
0
0
Michael Stefaniuc : winefile: Change choose_font() and init_output() to the W form.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 863921b40d6e48bb921635b20e9d8c61b30ccc55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=863921b40d6e48bb921635b20…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jul 25 23:22:08 2007 +0200 winefile: Change choose_font() and init_output() to the W form. --- programs/winefile/winefile.c | 39 +++++++++++++++++++-------------------- 1 files changed, 19 insertions(+), 20 deletions(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index 6160903..0574c37 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -187,7 +187,7 @@ static int last_split; /* some common string constants */ static const TCHAR sEmpty[] = {'\0'}; -static const TCHAR sSpace[] = {' ', '\0'}; +static const WCHAR sSpace[] = {' ', '\0'}; static const TCHAR sNumFmt[] = {'%','d','\0'}; static const TCHAR sQMarks[] = {'?','?','?','\0'}; @@ -271,9 +271,9 @@ static inline INT set_check(HWND hwnd, INT id, BOOL on) static inline void choose_font(HWND hwnd) { - TCHAR dlg_name[BUFFER_LEN], dlg_info[BUFFER_LEN]; - CHOOSEFONT chFont; - LOGFONT lFont; + WCHAR dlg_name[BUFFER_LEN], dlg_info[BUFFER_LEN]; + CHOOSEFONTW chFont; + LOGFONTW lFont; HDC hdc = GetDC(hwnd); chFont.lStructSize = sizeof(CHOOSEFONT); @@ -291,22 +291,22 @@ static inline void choose_font(HWND hwnd) chFont.nSizeMin = 0; chFont.nSizeMax = 24; - if (ChooseFont(&chFont)) { + if (ChooseFontW(&chFont)) { HWND childWnd; HFONT hFontOld; DeleteObject(Globals.hfont); - Globals.hfont = CreateFontIndirect(&lFont); + Globals.hfont = CreateFontIndirectW(&lFont); hFontOld = SelectObject(hdc, Globals.hfont); - GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize); + GetTextExtentPoint32W(hdc, sSpace, 1, &Globals.spaceSize); /* change font in all open child windows */ for(childWnd=GetWindow(Globals.hmdiclient,GW_CHILD); childWnd; childWnd=GetNextWindow(childWnd,GW_HWNDNEXT)) { - ChildWnd* child = (ChildWnd*) GetWindowLongPtr(childWnd, GWLP_USERDATA); - SendMessage(child->left.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); - SendMessage(child->right.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); - SendMessage(child->left.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); - SendMessage(child->right.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); + ChildWnd* child = (ChildWnd*) GetWindowLongPtrW(childWnd, GWLP_USERDATA); + SendMessageW(child->left.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); + SendMessageW(child->right.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); + SendMessageW(child->left.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); + SendMessageW(child->right.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); InvalidateRect(child->left.hwnd, NULL, TRUE); InvalidateRect(child->right.hwnd, NULL, TRUE); } @@ -314,9 +314,9 @@ static inline void choose_font(HWND hwnd) SelectObject(hdc, hFontOld); } else if (CommDlgExtendedError()) { - LoadString(Globals.hInstance, IDS_FONT_SEL_DLG_NAME, dlg_name, BUFFER_LEN); - LoadString(Globals.hInstance, IDS_FONT_SEL_ERROR, dlg_info, BUFFER_LEN); - MessageBox(hwnd, dlg_info, dlg_name, MB_OK); + LoadStringW(Globals.hInstance, IDS_FONT_SEL_DLG_NAME, dlg_name, BUFFER_LEN); + LoadStringW(Globals.hInstance, IDS_FONT_SEL_ERROR, dlg_info, BUFFER_LEN); + MessageBoxW(hwnd, dlg_info, dlg_name, MB_OK); } ReleaseDC(hwnd, hdc); @@ -2646,19 +2646,18 @@ static HWND create_header(HWND parent, Pane* pane, int id) static void init_output(HWND hwnd) { - static const TCHAR s1000[] = {'1','0','0','0','\0'}; - - TCHAR b[16]; + static const WCHAR s1000[] = {'1','0','0','0','\0'}; + WCHAR b[16]; HFONT old_font; HDC hdc = GetDC(hwnd); - if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, s1000, 0, b, 16) > 4) + if (GetNumberFormatW(LOCALE_USER_DEFAULT, 0, s1000, 0, b, 16) > 4) Globals.num_sep = b[1]; else Globals.num_sep = '.'; old_font = SelectObject(hdc, Globals.hfont); - GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize); + GetTextExtentPoint32W(hdc, sSpace, 1, &Globals.spaceSize); SelectObject(hdc, old_font); ReleaseDC(hwnd, hdc); }
1
0
0
0
Michael Stefaniuc : winefile: Move the font choosing code to a separate function.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 26369e1a8f71d655ca30dc14e8bfe03e47d25c70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26369e1a8f71d655ca30dc14e…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jul 25 23:21:43 2007 +0200 winefile: Move the font choosing code to a separate function. --- programs/winefile/winefile.c | 108 ++++++++++++++++++++++-------------------- 1 files changed, 56 insertions(+), 52 deletions(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index f26b75b..6160903 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -269,6 +269,59 @@ static inline INT set_check(HWND hwnd, INT id, BOOL on) return SendMessageW(GetDlgItem(hwnd, id), BM_SETCHECK, on?BST_CHECKED:BST_UNCHECKED, 0); } +static inline void choose_font(HWND hwnd) +{ + TCHAR dlg_name[BUFFER_LEN], dlg_info[BUFFER_LEN]; + CHOOSEFONT chFont; + LOGFONT lFont; + + HDC hdc = GetDC(hwnd); + chFont.lStructSize = sizeof(CHOOSEFONT); + chFont.hwndOwner = hwnd; + chFont.hDC = NULL; + chFont.lpLogFont = &lFont; + chFont.Flags = CF_SCREENFONTS | CF_FORCEFONTEXIST | CF_LIMITSIZE | CF_NOSCRIPTSEL; + chFont.rgbColors = RGB(0,0,0); + chFont.lCustData = 0; + chFont.lpfnHook = NULL; + chFont.lpTemplateName = NULL; + chFont.hInstance = Globals.hInstance; + chFont.lpszStyle = NULL; + chFont.nFontType = SIMULATED_FONTTYPE; + chFont.nSizeMin = 0; + chFont.nSizeMax = 24; + + if (ChooseFont(&chFont)) { + HWND childWnd; + HFONT hFontOld; + + DeleteObject(Globals.hfont); + Globals.hfont = CreateFontIndirect(&lFont); + hFontOld = SelectObject(hdc, Globals.hfont); + GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize); + + /* change font in all open child windows */ + for(childWnd=GetWindow(Globals.hmdiclient,GW_CHILD); childWnd; childWnd=GetNextWindow(childWnd,GW_HWNDNEXT)) { + ChildWnd* child = (ChildWnd*) GetWindowLongPtr(childWnd, GWLP_USERDATA); + SendMessage(child->left.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); + SendMessage(child->right.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); + SendMessage(child->left.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); + SendMessage(child->right.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); + InvalidateRect(child->left.hwnd, NULL, TRUE); + InvalidateRect(child->right.hwnd, NULL, TRUE); + } + + SelectObject(hdc, hFontOld); + } + else if (CommDlgExtendedError()) { + LoadString(Globals.hInstance, IDS_FONT_SEL_DLG_NAME, dlg_name, BUFFER_LEN); + LoadString(Globals.hInstance, IDS_FONT_SEL_ERROR, dlg_info, BUFFER_LEN); + MessageBox(hwnd, dlg_info, dlg_name, MB_OK); + } + + ReleaseDC(hwnd, hdc); +} + #ifdef __WINE__ #ifdef UNICODE @@ -2328,58 +2381,9 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM SendMessage(Globals.hmdiclient, WM_MDIICONARRANGE, 0, 0); break; - case ID_SELECT_FONT: { - TCHAR dlg_name[BUFFER_LEN], dlg_info[BUFFER_LEN]; - CHOOSEFONT chFont; - LOGFONT lFont; - - HDC hdc = GetDC(hwnd); - chFont.lStructSize = sizeof(CHOOSEFONT); - chFont.hwndOwner = hwnd; - chFont.hDC = NULL; - chFont.lpLogFont = &lFont; - chFont.Flags = CF_SCREENFONTS | CF_FORCEFONTEXIST | CF_LIMITSIZE | CF_NOSCRIPTSEL; - chFont.rgbColors = RGB(0,0,0); - chFont.lCustData = 0; - chFont.lpfnHook = NULL; - chFont.lpTemplateName = NULL; - chFont.hInstance = Globals.hInstance; - chFont.lpszStyle = NULL; - chFont.nFontType = SIMULATED_FONTTYPE; - chFont.nSizeMin = 0; - chFont.nSizeMax = 24; - - if (ChooseFont(&chFont)) { - HWND childWnd; - HFONT hFontOld; - - DeleteObject(Globals.hfont); - Globals.hfont = CreateFontIndirect(&lFont); - hFontOld = SelectObject(hdc, Globals.hfont); - GetTextExtentPoint32(hdc, sSpace, 1, &Globals.spaceSize); - - /* change font in all open child windows */ - for(childWnd=GetWindow(Globals.hmdiclient,GW_CHILD); childWnd; childWnd=GetNextWindow(childWnd,GW_HWNDNEXT)) { - ChildWnd* child = (ChildWnd*) GetWindowLongPtr(childWnd, GWLP_USERDATA); - SendMessage(child->left.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); - SendMessage(child->right.hwnd, WM_SETFONT, (WPARAM)Globals.hfont, TRUE); - SendMessage(child->left.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); - SendMessage(child->right.hwnd, LB_SETITEMHEIGHT, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3)); - InvalidateRect(child->left.hwnd, NULL, TRUE); - InvalidateRect(child->right.hwnd, NULL, TRUE); - } - - SelectObject(hdc, hFontOld); - } - else if (CommDlgExtendedError()) { - LoadString(Globals.hInstance, IDS_FONT_SEL_DLG_NAME, dlg_name, BUFFER_LEN); - LoadString(Globals.hInstance, IDS_FONT_SEL_ERROR, dlg_info, BUFFER_LEN); - MessageBox(hwnd, dlg_info, dlg_name, MB_OK); - } - - ReleaseDC(hwnd, hdc); - break; - } + case ID_SELECT_FONT: + choose_font(hwnd); + break; case ID_VIEW_TOOL_BAR: toggle_child(hwnd, cmd, Globals.htoolbar);
1
0
0
0
Roderick Colenbrander : wgl: Set pbuffer dimensions in HDC.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 1855eb25f3db8e1dfad0852c44e731cfe1c35811 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1855eb25f3db8e1dfad0852c4…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Wed Jul 25 23:18:50 2007 +0200 wgl: Set pbuffer dimensions in HDC. --- dlls/winex11.drv/opengl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index e2f09db..5a33913 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2153,6 +2153,8 @@ HDC X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *physDev, HPBUFFERARB hPbuffer) * All formats in our pixelformat list are compatible with each other and the main drawable. */ physDev->current_pf = object->pixelFormat; physDev->drawable = object->drawable; + SetRect( &physDev->drawable_rect, 0, 0, object->width, object->height ); + physDev->dc_rect = physDev->drawable_rect; TRACE("(%p)->(%p)\n", hPbuffer, physDev->hdc); return physDev->hdc;
1
0
0
0
Roderick Colenbrander : opengl: WGL_ARB_render_texture support.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 8a02dbb43ce453fb487da8ffc26232bedd3f39cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a02dbb43ce453fb487da8ffc…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Wed Jul 25 22:32:07 2007 +0200 opengl: WGL_ARB_render_texture support. --- dlls/winex11.drv/opengl.c | 88 ++++++++++++++++++++------------------------- 1 files changed, 39 insertions(+), 49 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 02dfbff..e2f09db 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -135,7 +135,7 @@ typedef struct wine_glpixelformat { static Wine_GLContext *context_list; static struct WineGLInfo WineGLInfo = { 0 }; -static int use_render_texture_emulation = 0; +static int use_render_texture_emulation = 1; static int use_render_texture_ati = 0; static int swap_interval = 1; @@ -207,6 +207,7 @@ MAKE_FUNCPTR(glXChooseVisual) MAKE_FUNCPTR(glXCreateContext) MAKE_FUNCPTR(glXCreateGLXPixmap) MAKE_FUNCPTR(glXGetCurrentContext) +MAKE_FUNCPTR(glXGetCurrentDrawable) MAKE_FUNCPTR(glXDestroyContext) MAKE_FUNCPTR(glXDestroyGLXPixmap) MAKE_FUNCPTR(glXGetConfig) @@ -259,7 +260,9 @@ MAKE_FUNCPTR(glGetString) MAKE_FUNCPTR(glIsEnabled) MAKE_FUNCPTR(glNewList) MAKE_FUNCPTR(glPixelStorei) +MAKE_FUNCPTR(glReadPixels) MAKE_FUNCPTR(glScissor) +MAKE_FUNCPTR(glTexImage2D) MAKE_FUNCPTR(glViewport) #undef MAKE_FUNCPTR @@ -364,6 +367,7 @@ LOAD_FUNCPTR(glXChooseVisual) LOAD_FUNCPTR(glXCreateContext) LOAD_FUNCPTR(glXCreateGLXPixmap) LOAD_FUNCPTR(glXGetCurrentContext) +LOAD_FUNCPTR(glXGetCurrentDrawable) LOAD_FUNCPTR(glXDestroyContext) LOAD_FUNCPTR(glXDestroyGLXPixmap) LOAD_FUNCPTR(glXGetConfig) @@ -401,7 +405,9 @@ LOAD_FUNCPTR(glGetString) LOAD_FUNCPTR(glIsEnabled) LOAD_FUNCPTR(glNewList) LOAD_FUNCPTR(glPixelStorei) +LOAD_FUNCPTR(glReadPixels) LOAD_FUNCPTR(glScissor) +LOAD_FUNCPTR(glTexImage2D) LOAD_FUNCPTR(glViewport) #undef LOAD_FUNCPTR @@ -2650,37 +2656,39 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf SetLastError(ERROR_INVALID_HANDLE); return GL_FALSE; } -/* Disable WGL_ARB_render_texture support until it is implemented properly - * using pbuffers or FBOs */ -#if 0 + if (!use_render_texture_ati && 1 == use_render_texture_emulation) { - int do_init = 0; - GLint prev_binded_tex; - pglGetIntegerv(object->texture_target, &prev_binded_tex); - if (NULL == object->render_ctx) { - object->render_hdc = X11DRV_wglGetPbufferDCARB(hPbuffer); - /* FIXME: This is routed through gdi32.dll to winex11.drv, replace this with GLX calls */ - object->render_ctx = wglCreateContext(object->render_hdc); - do_init = 1; + void *buf; + static int init = 0; + GLXContext prev_context = pglXGetCurrentContext(); + Drawable prev_drawable = pglXGetCurrentDrawable(); + + /* Our render_texture emulation is basic and lacks some features (1D/Cube support). + This is mostly due to lack of demos/games using them. Further the use of glReadPixels + isn't ideal performance wise but I wasn't able to get other ways working. + */ + if(!init) { + init = 1; /* Only show the FIXME once for performance reasons */ + FIXME("partial stub!\n"); } - object->prev_hdc = wglGetCurrentDC(); - object->prev_ctx = wglGetCurrentContext(); - /* FIXME: This is routed through gdi32.dll to winex11.drv, replace this with GLX calls */ - wglMakeCurrent(object->render_hdc, object->render_ctx); - /* - if (do_init) { - glBindTexture(object->texture_target, object->texture); - if (GL_RGBA == object->use_render_texture) { - glTexImage2D(object->texture_target, 0, GL_RGBA8, object->width, object->height, 0, GL_RGBA, GL_FLOAT, NULL); - } else { - glTexImage2D(object->texture_target, 0, GL_RGB8, object->width, object->height, 0, GL_RGB, GL_FLOAT, NULL); - } + + buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 4*object->width*object->height); + if(!buf) { + ERR("Unable to allocate a buffer for render_texture emulation\n"); + return GL_FALSE; } - */ - object->texture = prev_binded_tex; - return GL_TRUE; + + /* Switch to our pbuffer and readback its contents */ + pglXMakeCurrent(gdi_display, object->drawable, prev_context); + pglReadPixels(0, 0, object->width, object->height, GL_RGBA, GL_UNSIGNED_BYTE, buf); + + /* Switch back to the original drawable and upload the pbuffer-texture */ + pglXMakeCurrent(object->display, prev_drawable, prev_context); + pglTexImage2D(object->texture_target, 0, GL_RGBA8, object->width, object->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buf); + + HeapFree(GetProcessHeap(), 0, buf); } -#endif + if (NULL != pglXBindTexImageARB) { return pglXBindTexImageARB(object->display, object->drawable, iBuffer); } @@ -2705,26 +2713,6 @@ static GLboolean WINAPI X11DRV_wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int i return GL_FALSE; } if (!use_render_texture_ati && 1 == use_render_texture_emulation) { - /* - GLint prev_binded_tex; - glGetIntegerv(object->texture_target, &prev_binded_tex); - if (GL_TEXTURE_1D == object->texture_target) { - glCopyTexSubImage1D(object->texture_target, object->texture_level, 0, 0, 0, object->width); - } else { - glCopyTexSubImage2D(object->texture_target, object->texture_level, 0, 0, 0, 0, object->width, object->height); - } - glBindTexture(object->texture_target, prev_binded_tex); - SwapBuffers(object->render_hdc); - */ - pglBindTexture(object->texture_target, object->texture); - if (GL_TEXTURE_1D == object->texture_target) { - pglCopyTexSubImage1D(object->texture_target, object->texture_level, 0, 0, 0, object->width); - } else { - pglCopyTexSubImage2D(object->texture_target, object->texture_level, 0, 0, 0, 0, object->width, object->height); - } - - /* FIXME: This is routed through gdi32.dll to winex11.drv, replace this with GLX calls */ - wglMakeCurrent(object->prev_hdc, object->prev_ctx); return GL_TRUE; } if (NULL != pglXReleaseTexImageARB) { @@ -2965,8 +2953,10 @@ static void X11DRV_WineGL_LoadExtensions(void) register_extension(&WGL_ARB_pixel_format); + /* Support WGL_ARB_render_texture when there's support or pbuffer based emulation */ if (glxRequireExtension("GLX_ATI_render_texture") || - glxRequireExtension("GLX_ARB_render_texture")) + glxRequireExtension("GLX_ARB_render_texture") || + (glxRequireVersion(3) && glxRequireExtension("GLX_SGIX_pbuffer") && use_render_texture_emulation)) register_extension(&WGL_ARB_render_texture); /* EXT Extensions */
1
0
0
0
Roderick Colenbrander : opengl32: Relax extension checking.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 802c87d066371c04e4e9b812c214238e89962d39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=802c87d066371c04e4e9b812c…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Wed Jul 25 22:27:39 2007 +0200 opengl32: Relax extension checking. --- dlls/opengl32/wgl.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 5ab33d8..029f361 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -250,7 +250,6 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) { /* Check if the GL extension required by the function is available */ if(!is_extension_supported(ext_ret->extension)) { WARN("Extension '%s' required by function '%s' not supported!\n", ext_ret->extension, lpszProc); - return NULL; } local_func = wine_wgl.p_wglGetProcAddress(ext_ret->name);
1
0
0
0
Andrew Talbot : oleaut32: Constify some variables.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: f73821c286ff17444972dfdd4751e370a6a817de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f73821c286ff17444972dfdd4…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Wed Jul 25 21:37:23 2007 +0100 oleaut32: Constify some variables. --- dlls/oleaut32/tmarshal.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index 3772910..1a30aa3 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -96,7 +96,7 @@ xbuf_resize(marshal_state *buf, DWORD newsize) } static HRESULT -xbuf_add(marshal_state *buf, LPBYTE stuff, DWORD size) +xbuf_add(marshal_state *buf, const BYTE *stuff, DWORD size) { HRESULT hr; @@ -523,7 +523,7 @@ _argsize(DWORD vt) { } static int -_xsize(TYPEDESC *td) { +_xsize(const TYPEDESC *td) { switch (td->vt) { case VT_DATE: return sizeof(DATE); @@ -531,7 +531,7 @@ _xsize(TYPEDESC *td) { return sizeof(VARIANT)+3; case VT_CARRAY: { int i, arrsize = 1; - ARRAYDESC *adesc = td->u.lpadesc; + const ARRAYDESC *adesc = td->u.lpadesc; for (i=0;i<adesc->cDims;i++) arrsize *= adesc->rgbounds[i].cElements;
1
0
0
0
Jason Edmeades : comctl32: Fix missing toolbar button with HINST_COMMCTRL.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 718e23fb6857cb7abc23f1369197f6353f47aa7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=718e23fb6857cb7abc23f1369…
Author: Jason Edmeades <jason.edmeades(a)googlemail.com> Date: Wed Jul 25 20:51:18 2007 +0100 comctl32: Fix missing toolbar button with HINST_COMMCTRL. --- dlls/comctl32/commctrl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 086d0ed..c09bc04 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -704,7 +704,7 @@ CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps, /* add bitmaps */ - if (nBitmaps > 0) + if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL) { tbab.hInst = hBMInst; tbab.nID = wBMID;
1
0
0
0
Stefan Dösinger : wined3d: Do not fail if the adapter info can't be initialized.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 12788f6fc8987687453092cb3914fb46f2a4e4d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=12788f6fc8987687453092cb3…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jul 16 20:53:44 2007 +0200 wined3d: Do not fail if the adapter info can't be initialized. --- dlls/wined3d/device.c | 8 +++++++- dlls/wined3d/directx.c | 8 +++++--- dlls/wined3d/wined3d_main.c | 7 +++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d795e25..9f6d63b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -716,7 +716,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U /* Look at the implementation and set the correct Vtable */ switch(Impl) { case SURFACE_OPENGL: - /* Nothing to do, it's set already */ + /* Check if a 3D adapter is available when creating gl surfaces */ + if(!This->adapter) { + ERR("OpenGL surfaces are not available without opengl\n"); + HeapFree(GetProcessHeap(), 0, object->resource.allocatedMemory); + HeapFree(GetProcessHeap(), 0, object); + return WINED3DERR_NOTAVAILABLE; + } break; case SURFACE_GDI: diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 86eb0cc..1dfb16d 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2418,8 +2418,10 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, HDC hDC; int i; - /* Validate the adapter number */ - if (Adapter >= IWineD3D_GetAdapterCount(iface)) { + /* Validate the adapter number. If no adapters are available(no GL), ignore the adapter + * number and create a device without a 3D adapter for 2D only operation. + */ + if (IWineD3D_GetAdapterCount(iface) && Adapter >= IWineD3D_GetAdapterCount(iface)) { return WINED3DERR_INVALIDCALL; } @@ -2435,7 +2437,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, object->lpVtbl = &IWineD3DDevice_Vtbl; object->ref = 1; object->wineD3D = iface; - object->adapter = &Adapters[Adapter]; + object->adapter = numAdapters ? &Adapters[Adapter] : NULL; IWineD3D_AddRef(object->wineD3D); object->parent = parent; diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index d232a2b..d1cf28a 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -62,8 +62,11 @@ IWineD3D* WINAPI WineDirect3DCreate(UINT SDKVersion, UINT dxVersion, IUnknown *p IWineD3DImpl* object; if (!InitAdapters()) { - ERR("Failed to initialize direct3d adapters\n"); - return NULL; + WARN("Failed to initialize direct3d adapters, Direct3D will not be available\n"); + if(dxVersion > 7) { + ERR("Direct3D%d is not available without opengl\n", dxVersion); + return NULL; + } } object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DImpl));
1
0
0
0
Stefan Dösinger : wined3d: Set the pow2 sizes in gl surface private setup.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 59efd5c7eceded40483821d3e0f3774b97cc9dae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59efd5c7eceded40483821d3e…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jul 16 20:42:16 2007 +0200 wined3d: Set the pow2 sizes in gl surface private setup. --- dlls/wined3d/device.c | 27 --------------------------- dlls/wined3d/surface.c | 30 ++++++++++++++++++++++++++++++ dlls/wined3d/surface_gdi.c | 6 ------ 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 07d5a79..d795e25 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -575,7 +575,6 @@ If this flag is set, the contents of the depth stencil buffer will be invalid af static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IWineD3DSurface **ppSurface,WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, WINED3DSURFTYPE Impl, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */ - unsigned int pow2Width, pow2Height; unsigned int Size = 1; const PixelFormatDesc *tableEntry = getFormatDescEntry(Format); TRACE("(%p) Create surface\n",This); @@ -616,27 +615,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U * by the device. *******************************/ - /* Non-power2 support */ - if (GL_SUPPORT(ARB_TEXTURE_NON_POWER_OF_TWO)) { - pow2Width = Width; - pow2Height = Height; - } else { - /* Find the nearest pow2 match */ - pow2Width = pow2Height = 1; - while (pow2Width < Width) pow2Width <<= 1; - while (pow2Height < Height) pow2Height <<= 1; - } - - if (pow2Width > Width || pow2Height > Height) { - /** TODO: add support for non power two compressed textures (OpenGL 2 provices support for * non-power-two textures gratis) **/ - if (Format == WINED3DFMT_DXT1 || Format == WINED3DFMT_DXT2 || Format == WINED3DFMT_DXT3 - || Format == WINED3DFMT_DXT4 || Format == WINED3DFMT_DXT5) { - FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n", - This, Width, Height); - return WINED3DERR_NOTAVAILABLE; - } - } - /** DXTn mipmaps use the same number of 'levels' down to eg. 8x1, but since * it is based around 4x4 pixel blocks it requires padding, so allocate enough * space! @@ -675,13 +653,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U object->glDescription.level = Level; object->glDescription.target = GL_TEXTURE_2D; - /* Internal data */ - object->pow2Width = pow2Width; - object->pow2Height = pow2Height; - /* Flags */ object->Flags = 0; - object->Flags |= (pow2Width != Width || pow2Height != Height) ? SFLAG_NONPOW2 : 0; object->Flags |= Discard ? SFLAG_DISCARD : 0; object->Flags |= (WINED3DFMT_D16_LOCKABLE == Format) ? SFLAG_LOCKABLE : 0; object->Flags |= Lockable ? SFLAG_LOCKABLE : 0; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 11e0fba..f0a2b4c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3435,6 +3435,36 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Fla static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) { /** Check against the maximum texture sizes supported by the video card **/ IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; + unsigned int pow2Width, pow2Height; + + /* Non-power2 support */ + if (GL_SUPPORT(ARB_TEXTURE_NON_POWER_OF_TWO)) { + pow2Width = This->currentDesc.Width; + pow2Height = This->currentDesc.Height; + } else { + /* Find the nearest pow2 match */ + pow2Width = pow2Height = 1; + while (pow2Width < This->currentDesc.Width) pow2Width <<= 1; + while (pow2Height < This->currentDesc.Height) pow2Height <<= 1; + } + This->pow2Width = pow2Width; + This->pow2Height = pow2Height; + + if (pow2Width > This->currentDesc.Width || pow2Height > This->currentDesc.Height) { + WINED3DFORMAT Format = This->resource.format; + /** TODO: add support for non power two compressed textures **/ + if (Format == WINED3DFMT_DXT1 || Format == WINED3DFMT_DXT2 || Format == WINED3DFMT_DXT3 + || Format == WINED3DFMT_DXT4 || Format == WINED3DFMT_DXT5) { + FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n", + This, This->currentDesc.Width, This->currentDesc.Height); + return WINED3DERR_NOTAVAILABLE; + } + } + + if(pow2Width != This->currentDesc.Width || + pow2Height != This->currentDesc.Height) { + This->Flags |= SFLAG_NONPOW2; + } TRACE("%p\n", This); if ((This->pow2Width > GL_LIMITS(texture_size) || This->pow2Height > GL_LIMITS(texture_size)) && !(This->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_DEPTHSTENCIL))) { diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index c994000..f3a3fea 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -1513,7 +1513,6 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface) IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; HRESULT hr; HDC hdc; - long oldsize = This->resource.size; if(This->resource.usage & WINED3DUSAGE_OVERLAY) { @@ -1527,13 +1526,8 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface) This->resource.allocatedMemory = NULL; /* We don't mind the nonpow2 stuff in GDI */ - This->resource.size = IWineD3DSurface_GetPitch(iface) * This->currentDesc.Height; This->pow2Width = This->currentDesc.Width; This->pow2Height = This->currentDesc.Height; - This->Flags &= ~SFLAG_NONPOW2; - - /* Adjust the opengl mem counter */ - globalChangeGlRam(This->resource.size - oldsize); /* Call GetDC to create a DIB section. We will use that * DIB section for rendering
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
96
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200