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
June 2012
----- 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
827 discussions
Start a n
N
ew thread
Lucas Zawacki : joy.cpl: Added POV axis visualization.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: d0977a2b8b56ac54f51f8a752e8bcff25f8f95d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0977a2b8b56ac54f51f8a752…
Author: Lucas Zawacki <lfzawacki(a)gmail.com> Date: Wed Jun 27 00:09:51 2012 -0300 joy.cpl: Added POV axis visualization. --- dlls/joy.cpl/joy.h | 3 ++- dlls/joy.cpl/joy.rc | 1 + dlls/joy.cpl/main.c | 29 +++++++++++++++++++++++++++-- po/ar.po | 2 +- po/bg.po | 2 +- po/ca.po | 2 +- po/cs.po | 2 +- po/da.po | 2 +- po/de.po | 2 +- po/el.po | 2 +- po/en.po | 2 +- po/en_US.po | 2 +- po/eo.po | 2 +- po/es.po | 2 +- po/fa.po | 2 +- po/fi.po | 2 +- po/fr.po | 2 +- po/he.po | 2 +- po/hi.po | 2 +- po/hu.po | 2 +- po/it.po | 2 +- po/ja.po | 2 +- po/ko.po | 2 +- po/lt.po | 2 +- po/ml.po | 2 +- po/nb_NO.po | 2 +- po/nl.po | 2 +- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 2 +- po/pt_BR.po | 2 +- po/pt_PT.po | 2 +- po/rm.po | 2 +- po/ro.po | 2 +- po/ru.po | 2 +- po/sk.po | 2 +- po/sl.po | 2 +- po/sr_RS(a)cyrillic.po | 2 +- po/sr_RS(a)latin.po | 2 +- po/sv.po | 2 +- po/te.po | 2 +- po/th.po | 2 +- po/tr.po | 2 +- po/uk.po | 2 +- po/wa.po | 2 +- po/wine.pot | 2 +- po/zh_CN.po | 2 +- po/zh_TW.po | 2 +- 48 files changed, 75 insertions(+), 48 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d0977a2b8b56ac54f51f8…
1
0
0
0
Lucas Zawacki : joy.cpl: Make dialog the same size as the other cpl applets .
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 22e48becaad3502653edbdd8a28c79c5a3edec2d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22e48becaad3502653edbdd8a…
Author: Lucas Zawacki <lfzawacki(a)gmail.com> Date: Wed Jun 27 00:08:11 2012 -0300 joy.cpl: Make dialog the same size as the other cpl applets. --- dlls/joy.cpl/joy.h | 2 +- dlls/joy.cpl/joy.rc | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/joy.cpl/joy.h b/dlls/joy.cpl/joy.h index c4a13b8..c98f535 100644 --- a/dlls/joy.cpl/joy.h +++ b/dlls/joy.cpl/joy.h @@ -82,7 +82,7 @@ struct JoystickData { #define TEST_BUTTON_X 15 #define TEST_BUTTON_Y 200 #define TEST_NEXT_BUTTON_X 45 -#define TEST_NEXT_BUTTON_Y 30 +#define TEST_NEXT_BUTTON_Y 40 #define TEST_BUTTON_SIZE_X 30 #define TEST_BUTTON_SIZE_Y 25 diff --git a/dlls/joy.cpl/joy.rc b/dlls/joy.cpl/joy.rc index 1e94990..0636868 100644 --- a/dlls/joy.cpl/joy.rc +++ b/dlls/joy.cpl/joy.rc @@ -28,32 +28,32 @@ BEGIN IDS_CPL_NAME "Game Controllers" END -IDD_LIST DIALOG 0, 0, 250, 200 +IDD_LIST DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED CAPTION "Joysticks" FONT 8, "Ms Shell Dlg" { - PUSHBUTTON "&Disable", IDC_BUTTONDISABLE, 190, 20, 50, 15 - PUSHBUTTON "&Enable", IDC_BUTTONENABLE, 190, 95, 50, 15 + PUSHBUTTON "&Disable", IDC_BUTTONDISABLE, 200, 20, 50, 15 + PUSHBUTTON "&Enable", IDC_BUTTONENABLE, 200, 95, 50, 15 LTEXT "Connected", IDC_STATIC, 10, 10, 100, 10 - LISTBOX IDC_JOYSTICKLIST, 10, 20, 160, 70, WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY + LISTBOX IDC_JOYSTICKLIST, 10, 20, 180, 70, WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY LTEXT "Disabled", IDC_STATIC, 10, 85, 100, 10 - LISTBOX IDC_DISABLEDLIST, 10, 95, 160, 50, WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY + LISTBOX IDC_DISABLEDLIST, 10, 95, 180, 70, WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY } -IDD_TEST DIALOG 0, 0, 250, 200 +IDD_TEST DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED CAPTION "Test Joystick" FONT 8, "Ms Shell Dlg" { COMBOBOX IDC_TESTSELECTCOMBO, 5, 5, 100, 30, CBS_DROPDOWNLIST | CBS_HASSTRINGS - GROUPBOX "Buttons", IDC_STATIC, 0, 110, 250, 90 + GROUPBOX "Buttons", IDC_STATIC, 0, 110, 250, 110 GROUPBOX "", IDC_TESTGROUPXY, 15, 30, 60, 60 GROUPBOX "", IDC_TESTGROUPRXRY, 92, 30, 60, 60 GROUPBOX "", IDC_TESTGROUPZRZ, 169, 30, 60, 60 } -IDD_FORCEFEEDBACK DIALOG 0, 0, 250, 200 +IDD_FORCEFEEDBACK DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED CAPTION "Test Force Feedback" FONT 8, "Ms Shell Dlg"
1
0
0
0
Erich Hoover : hhctrl.ocx: Use document title for subtopics in the index.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 43ecfe036e792c8325461bddd7af37b3a796ac53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43ecfe036e792c8325461bddd…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Tue Jun 26 10:05:19 2012 -0600 hhctrl.ocx: Use document title for subtopics in the index. --- dlls/hhctrl.ocx/chm.c | 61 +++++++++++++++++++++++++++++++++++++++++++--- dlls/hhctrl.ocx/help.c | 2 + dlls/hhctrl.ocx/hhctrl.h | 1 + dlls/hhctrl.ocx/stream.h | 4 ++- 4 files changed, 63 insertions(+), 5 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index f051feb..cc92b89 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -20,6 +20,7 @@ */ #include "hhctrl.h" +#include "stream.h" #include "winreg.h" #include "shlwapi.h" @@ -27,10 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); -#define BLOCK_BITS 12 -#define BLOCK_SIZE (1 << BLOCK_BITS) -#define BLOCK_MASK (BLOCK_SIZE-1) - /* Reads a string from the #STRINGS section in the CHM file */ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) { @@ -413,6 +410,62 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file) return stream; } +/* + * Retrieve a CHM document and parse the data from the <title> element to get the document's title. + */ +WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document) +{ + strbuf_t node, node_name, content; + WCHAR *document_title = NULL; + IStream *str = NULL; + IStorage *storage; + stream_t stream; + HRESULT hres; + + TRACE("%s\n", debugstr_w(document)); + + storage = info->pStorage; + if(!storage) { + WARN("Could not open storage to obtain the title for a document.\n"); + return NULL; + } + IStorage_AddRef(storage); + + hres = IStorage_OpenStream(storage, document, NULL, STGM_READ, 0, &str); + IStorage_Release(storage); + if(FAILED(hres)) + WARN("Could not open stream: %08x\n", hres); + + stream_init(&stream, str); + strbuf_init(&node); + strbuf_init(&content); + strbuf_init(&node_name); + + while(next_node(&stream, &node)) { + get_node_name(&node, &node_name); + + TRACE("%s\n", node.buf); + + if(!strcasecmp(node_name.buf, "title")) { + if(next_content(&stream, &content) && content.len > 1) + { + document_title = strdupnAtoW(&content.buf[1], content.len-1); + FIXME("magic: %s\n", debugstr_w(document_title)); + break; + } + } + + strbuf_zero(&node); + } + + strbuf_free(&node); + strbuf_free(&content); + strbuf_free(&node_name); + IStream_Release(str); + + return document_title; +} + /* Opens the CHM file for reading */ CHMInfo *OpenCHM(LPCWSTR szFile) { diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 3acb024..87ea94f 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -634,6 +634,8 @@ static LRESULT OnTopicChange(HHInfo *info, void *user_data) IndexSubItem *item = &iiter->items[i]; WCHAR *name = iiter->keyword; + if(!item->name) + item->name = GetDocumentTitle(info->pCHMInfo, item->local); if(item->name) name = item->name; memset(&lvi, 0, sizeof(lvi)); diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index eea7f7f..8959748 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -189,6 +189,7 @@ CHMInfo *CloseCHM(CHMInfo *pCHMInfo) DECLSPEC_HIDDEN; void SetChmPath(ChmPath*,LPCWSTR,LPCWSTR) DECLSPEC_HIDDEN; IStream *GetChmStream(CHMInfo*,LPCWSTR,ChmPath*) DECLSPEC_HIDDEN; LPWSTR FindContextAlias(CHMInfo*,DWORD) DECLSPEC_HIDDEN; +WCHAR *GetDocumentTitle(CHMInfo*,LPCWSTR) DECLSPEC_HIDDEN; HHInfo *CreateHelpViewer(LPCWSTR) DECLSPEC_HIDDEN; void ReleaseHelpViewer(HHInfo*) DECLSPEC_HIDDEN; diff --git a/dlls/hhctrl.ocx/stream.h b/dlls/hhctrl.ocx/stream.h index 524109f..8d61ad5 100644 --- a/dlls/hhctrl.ocx/stream.h +++ b/dlls/hhctrl.ocx/stream.h @@ -19,7 +19,9 @@ #ifndef HHCTRL_STREAM_H #define HHCTRL_STREAM_H -#define BLOCK_SIZE 0x1000 +#define BLOCK_BITS 12 +#define BLOCK_SIZE (1 << BLOCK_BITS) +#define BLOCK_MASK (BLOCK_SIZE-1) typedef struct { char *buf;
1
0
0
0
Erich Hoover : hhctrl.ocx: Turn multiple index entries of the same name into a single entry.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 5874d6f1fd82cee01edb0c21c313b96388899c93 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5874d6f1fd82cee01edb0c21c…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Mon Jun 25 13:46:26 2012 -0600 hhctrl.ocx: Turn multiple index entries of the same name into a single entry. --- dlls/hhctrl.ocx/index.c | 33 ++++++++++++++++++++++++--------- 1 files changed, 24 insertions(+), 9 deletions(-) diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c index 2cc79a6..af1efb8 100644 --- a/dlls/hhctrl.ocx/index.c +++ b/dlls/hhctrl.ocx/index.c @@ -54,6 +54,15 @@ static void fill_index_tree(HWND hwnd, IndexItem *item) } } +static void item_realloc(IndexItem *item, int num_items) +{ + item->nItems = num_items; + item->items = heap_realloc(item->items, sizeof(IndexSubItem)*item->nItems); + item->items[item->nItems-1].name = NULL; + item->items[item->nItems-1].local = NULL; + item->itemFlags = 0x00; +} + /* Parse the attributes correspond to a list item, including sub-topics. * * Each list item has, at minimum, a param of type "keyword" and two @@ -77,13 +86,8 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text, UINT c /* Allocate a new sub-item, either on the first run or whenever a * sub-topic has filled out both the "name" and "local" params. */ - if(item->itemFlags == 0x11 && (!strncasecmp("name", ptr, len) || !strncasecmp("local", ptr, len))) { - item->nItems++; - item->items = heap_realloc(item->items, sizeof(IndexSubItem)*item->nItems); - item->items[item->nItems-1].name = NULL; - item->items[item->nItems-1].local = NULL; - item->itemFlags = 0x00; - } + if(item->itemFlags == 0x11 && (!strncasecmp("name", ptr, len) || !strncasecmp("local", ptr, len))) + item_realloc(item, item->nItems+1); if(!strncasecmp("keyword", ptr, len)) { param = &item->keyword; }else if(!item->keyword && !strncasecmp("name", ptr, len)) { @@ -228,8 +232,19 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item) TRACE("%s\n", node.buf); if(!strcasecmp(node_name.buf, "li")) { - item->next = parse_li(info, &stream); - if(item->next) { + IndexItem *new_item; + + new_item = parse_li(info, &stream); + if(new_item && item->keyword && strcmpW(new_item->keyword, item->keyword) == 0) { + int num_items = item->nItems; + + item_realloc(item, num_items+1); + memcpy(&item->items[num_items], &new_item->items[0], sizeof(IndexSubItem)); + heap_free(new_item->keyword); + heap_free(new_item->items); + heap_free(new_item); + } else if(new_item) { + item->next = new_item; item->next->merge = item->merge; item = item->next; item->indentLevel = indent_level;
1
0
0
0
Alexandre Julliard : winex11: Export wglMakeCurrent and wglMakeContextCurrentARB as standard extension functions .
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 4a367c57197b93a01c66d167db20420134e1f52c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a367c57197b93a01c66d167d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 27 14:43:36 2012 +0200 winex11: Export wglMakeCurrent and wglMakeContextCurrentARB as standard extension functions. --- dlls/gdi32/gdi32.spec | 3 +- dlls/gdi32/opengl.c | 70 --------------------------------------------- dlls/opengl32/wgl.c | 11 +++++-- dlls/winex11.drv/opengl.c | 22 +++++++------- 4 files changed, 20 insertions(+), 86 deletions(-) diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 2a7edc3..8fa7fe1 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -499,9 +499,8 @@ ################################################################ # Wine extensions: OpenGL support # -@ stdcall wglCreateContext(long) +@ stdcall -private wglCreateContext(long) @ stdcall -private wglGetProcAddress(str) -@ stdcall wglMakeCurrent(long long) ################################################################ # Wine extensions: Win16 functions that are needed by other dlls diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c index d2ab2aa..90c2a87 100644 --- a/dlls/gdi32/opengl.c +++ b/dlls/gdi32/opengl.c @@ -101,74 +101,6 @@ static HGLRC WINAPI wglCreateContextAttribsARB(HDC hdc, HGLRC hShareContext, con return ret; } -/*********************************************************************** - * wglMakeCurrent (OPENGL32.@) - */ -BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc) -{ - BOOL ret = FALSE; - DC * dc = NULL; - - /* When the context hglrc is NULL, the HDC is ignored and can be NULL. - * In that case use the global hDC to get access to the driver. */ - if(hglrc == NULL) - { - if (hdc == NULL && !NtCurrentTeb()->glContext) - { - WARN( "Current context is NULL\n"); - SetLastError( ERROR_INVALID_HANDLE ); - return FALSE; - } - dc = OPENGL_GetDefaultDC(); - } - else - dc = get_dc_ptr( hdc ); - - TRACE("hdc: (%p), hglrc: (%p)\n", hdc, hglrc); - - if (dc) - { - PHYSDEV physdev = GET_DC_PHYSDEV( dc, pwglMakeCurrent ); - update_dc( dc ); - ret = physdev->funcs->pwglMakeCurrent( physdev, hglrc ); - release_dc_ptr( dc ); - } - return ret; -} - -/*********************************************************************** - * wglMakeContextCurrentARB - */ -static BOOL WINAPI wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) -{ - BOOL ret = FALSE; - PHYSDEV draw_physdev, read_physdev; - DC *DrawDC; - DC *ReadDC; - - TRACE("hDrawDC: (%p), hReadDC: (%p) hglrc: (%p)\n", hDrawDC, hReadDC, hglrc); - - /* Both hDrawDC and hReadDC need to be valid */ - DrawDC = get_dc_ptr( hDrawDC ); - if (!DrawDC) return FALSE; - - ReadDC = get_dc_ptr( hReadDC ); - if (!ReadDC) { - release_dc_ptr( DrawDC ); - return FALSE; - } - - update_dc( DrawDC ); - update_dc( ReadDC ); - draw_physdev = GET_DC_PHYSDEV( DrawDC, pwglMakeContextCurrentARB ); - read_physdev = GET_DC_PHYSDEV( ReadDC, pwglMakeContextCurrentARB ); - if (draw_physdev->funcs == read_physdev->funcs) - ret = draw_physdev->funcs->pwglMakeContextCurrentARB(draw_physdev, read_physdev, hglrc); - release_dc_ptr( DrawDC ); - release_dc_ptr( ReadDC ); - return ret; -} - /************************************************************************************** * WINE-specific wglSetPixelFormat which can set the iPixelFormat multiple times * @@ -219,8 +151,6 @@ PROC WINAPI wglGetProcAddress(LPCSTR func) */ if(ret && strcmp(func, "wglCreateContextAttribsARB") == 0) return (PROC)wglCreateContextAttribsARB; - else if(ret && strcmp(func, "wglMakeContextCurrentARB") == 0) - return (PROC)wglMakeContextCurrentARB; else if(ret && strcmp(func, "wglSetPixelFormatWINE") == 0) return (PROC)wglSetPixelFormatWINE; diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index d286a2a..e400f2e 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -48,7 +48,6 @@ WINE_DECLARE_DEBUG_CHANNEL(opengl); static struct { PROC (WINAPI *p_wglGetProcAddress)(LPCSTR lpszProc); - BOOL (WINAPI *p_wglMakeCurrent)(HDC hdc, HGLRC hglrc); HGLRC (WINAPI *p_wglCreateContext)(HDC hdc); INT (WINAPI *p_GetPixelFormat)(HDC hdc); @@ -60,6 +59,7 @@ static struct HGLRC (WINAPI *p_wglGetCurrentContext)(void); HDC (WINAPI *p_wglGetCurrentDC)(void); void (WINAPI *p_wglGetIntegerv)(GLenum pname, GLint* params); + BOOL (WINAPI *p_wglMakeCurrent)(HDC hdc, HGLRC hglrc); BOOL (WINAPI *p_wglShareLists)(HGLRC hglrc1, HGLRC hglrc2); } wine_wgl; @@ -126,7 +126,12 @@ BOOL WINAPI wglDeleteContext(HGLRC hglrc) */ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc) { - return wine_wgl.p_wglMakeCurrent(hdc, hglrc); + if (!hglrc && !hdc && !NtCurrentTeb()->glContext) + { + SetLastError( ERROR_INVALID_HANDLE ); + return FALSE; + } + return wine_wgl.p_wglMakeCurrent(hdc, hglrc); } /*********************************************************************** @@ -1090,7 +1095,6 @@ static BOOL process_attach(void) } wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod_gdi32, "wglGetProcAddress"); - wine_wgl.p_wglMakeCurrent = (void *)GetProcAddress(mod_gdi32, "wglMakeCurrent"); wine_wgl.p_wglCreateContext = (void *)GetProcAddress(mod_gdi32, "wglCreateContext"); wine_wgl.p_GetPixelFormat = (void *)GetProcAddress(mod_gdi32, "GetPixelFormat"); @@ -1102,6 +1106,7 @@ static BOOL process_attach(void) wine_wgl.p_wglGetCurrentContext = (void *)wine_wgl.p_wglGetProcAddress("wglGetCurrentContext"); wine_wgl.p_wglGetCurrentDC = (void *)wine_wgl.p_wglGetProcAddress("wglGetCurrentDC"); wine_wgl.p_wglGetIntegerv = (void *)wine_wgl.p_wglGetProcAddress("wglGetIntegerv"); + wine_wgl.p_wglMakeCurrent = (void *)wine_wgl.p_wglGetProcAddress("wglMakeCurrent"); wine_wgl.p_wglShareLists = (void *)wine_wgl.p_wglGetProcAddress("wglShareLists"); return TRUE; } diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 672d8d0..b78edc3 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1469,6 +1469,8 @@ static HGLRC glxdrv_wglCreateContext(PHYSDEV dev) return (HGLRC) ret; } +static BOOL WINAPI X11DRV_wglMakeCurrent(HDC hdc, HGLRC hglrc); + /** * X11DRV_wglDeleteContext * @@ -1497,7 +1499,7 @@ static BOOL WINAPI X11DRV_wglDeleteContext(HGLRC hglrc) /* WGL makes a context not current if it is active before deletion. GLX waits until the context is not current. */ if (ctx == NtCurrentTeb()->glContext) - wglMakeCurrent(ctx->hdc, NULL); + X11DRV_wglMakeCurrent(ctx->hdc, NULL); wine_tsx11_lock(); list_remove( &ctx->entry ); @@ -1584,13 +1586,12 @@ static GLXPixmap get_context_pixmap( HDC hdc, struct wine_glcontext *ctx ) } /** - * glxdrv_wglMakeCurrent + * X11DRV_wglMakeCurrent * * For OpenGL32 wglMakeCurrent. */ -static BOOL glxdrv_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) +static BOOL WINAPI X11DRV_wglMakeCurrent(HDC hdc, HGLRC hglrc) { - HDC hdc = dev->hdc; BOOL ret; Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; Wine_GLContext *ctx = (Wine_GLContext *) hglrc; @@ -1667,14 +1668,12 @@ static BOOL glxdrv_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) } /** - * glxdrv_wglMakeContextCurrentARB + * X11DRV_wglMakeContextCurrentARB * * For OpenGL32 wglMakeContextCurrentARB */ -static BOOL glxdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, HGLRC hglrc ) +static BOOL WINAPI X11DRV_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, HGLRC hglrc ) { - HDC draw_hdc = draw_dev->hdc; - HDC read_hdc = read_dev->hdc; Wine_GLContext *ctx = (Wine_GLContext *)hglrc; Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; struct x11drv_escape_get_drawable escape_draw, escape_read; @@ -3070,6 +3069,7 @@ static const WineGLExtension WGL_internal_functions = { "wglGetCurrentContext", X11DRV_wglGetCurrentContext }, { "wglGetCurrentDC", X11DRV_wglGetCurrentDC }, { "wglGetIntegerv", X11DRV_wglGetIntegerv }, + { "wglMakeCurrent", X11DRV_wglMakeCurrent }, { "wglShareLists", X11DRV_wglShareLists }, } }; @@ -3096,7 +3096,7 @@ static const WineGLExtension WGL_ARB_make_current_read = "WGL_ARB_make_current_read", { { "wglGetCurrentReadDCARB", X11DRV_wglGetCurrentReadDCARB }, - { "wglMakeContextCurrentARB", (void *)1 /* not called directly */ }, + { "wglMakeContextCurrentARB", X11DRV_wglMakeContextCurrentARB }, } }; @@ -3584,8 +3584,8 @@ static const struct gdi_dc_funcs glxdrv_funcs = glxdrv_wglCreateContext, /* pwglCreateContext */ glxdrv_wglCreateContextAttribsARB, /* pwglCreateContextAttribsARB */ glxdrv_wglGetProcAddress, /* pwglGetProcAddress */ - glxdrv_wglMakeContextCurrentARB, /* pwglMakeContextCurrentARB */ - glxdrv_wglMakeCurrent, /* pwglMakeCurrent */ + NULL, /* pwglMakeContextCurrentARB */ + NULL, /* pwglMakeCurrent */ glxdrv_wglSetPixelFormatWINE, /* pwglSetPixelFormatWINE */ GDI_PRIORITY_GRAPHICS_DRV + 20 /* priority */ };
1
0
0
0
Alexandre Julliard : winex11: Use the GET_DRAWABLE escape to implement wglMakeContextCurrentARB.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: bebf84f7a8bbab92a4dd5261fa53c5c379921798 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bebf84f7a8bbab92a4dd5261f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 27 14:07:06 2012 +0200 winex11: Use the GET_DRAWABLE escape to implement wglMakeContextCurrentARB. --- dlls/winex11.drv/opengl.c | 41 ++++++++++++++++++++++++----------------- 1 files changed, 24 insertions(+), 17 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 9ae143e..672d8d0 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1673,14 +1673,14 @@ static BOOL glxdrv_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) */ static BOOL glxdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, HGLRC hglrc ) { + HDC draw_hdc = draw_dev->hdc; + HDC read_hdc = read_dev->hdc; + Wine_GLContext *ctx = (Wine_GLContext *)hglrc; Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; - struct glx_physdev *draw_physdev = get_glxdrv_dev( draw_dev ); - struct glx_physdev *read_physdev = get_glxdrv_dev( read_dev ); + struct x11drv_escape_get_drawable escape_draw, escape_read; BOOL ret; - TRACE("(%p,%p,%p)\n", draw_dev->hdc, read_dev->hdc, hglrc); - - if (!has_opengl()) return 0; + TRACE("(%p,%p,%p)\n", draw_hdc, read_hdc, hglrc); if (hglrc == NULL) { @@ -1691,7 +1691,18 @@ static BOOL glxdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, wine_tsx11_unlock(); NtCurrentTeb()->glContext = NULL; } - else if (!draw_physdev->pixel_format) + + escape_draw.code = X11DRV_GET_DRAWABLE; + if (!ExtEscape( draw_hdc, X11DRV_ESCAPE, sizeof(escape_draw.code), (LPCSTR)&escape_draw.code, + sizeof(escape_draw), (LPSTR)&escape_draw )) + return FALSE; + + escape_read.code = X11DRV_GET_DRAWABLE; + if (!ExtEscape( read_hdc, X11DRV_ESCAPE, sizeof(escape_read.code), (LPCSTR)&escape_read.code, + sizeof(escape_read), (LPSTR)&escape_read )) + return FALSE; + + if (!escape_draw.pixel_format) { WARN("Trying to use an invalid drawable\n"); SetLastError(ERROR_INVALID_HANDLE); @@ -1699,27 +1710,23 @@ static BOOL glxdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, } else { - Wine_GLContext *ctx = (Wine_GLContext *) hglrc; - Drawable draw_drawable = draw_physdev->drawable; - Drawable read_drawable = read_physdev->drawable; - if (!pglXMakeContextCurrent) return FALSE; - if (draw_physdev->type == DC_GL_BITMAP) draw_drawable = get_context_pixmap( draw_physdev->dev.hdc, ctx ); - if (read_physdev->type == DC_GL_BITMAP) read_drawable = get_context_pixmap( read_physdev->dev.hdc, ctx ); + if (escape_draw.gl_type == DC_GL_BITMAP) escape_draw.drawable = get_context_pixmap( draw_hdc, ctx ); + if (escape_read.gl_type == DC_GL_BITMAP) escape_read.drawable = get_context_pixmap( read_hdc, ctx ); wine_tsx11_lock(); - ret = pglXMakeContextCurrent(gdi_display, draw_drawable, read_drawable, ctx->ctx); + ret = pglXMakeContextCurrent(gdi_display, escape_draw.drawable, escape_read.drawable, ctx->ctx); if (ret) { if (prev_ctx) prev_ctx->tid = 0; ctx->has_been_current = TRUE; ctx->tid = GetCurrentThreadId(); - ctx->hdc = draw_dev->hdc; - ctx->read_hdc = read_dev->hdc; - ctx->drawables[0] = draw_drawable; - ctx->drawables[1] = read_drawable; + ctx->hdc = draw_hdc; + ctx->read_hdc = read_hdc; + ctx->drawables[0] = escape_draw.drawable; + ctx->drawables[1] = escape_read.drawable; ctx->refresh_drawables = FALSE; NtCurrentTeb()->glContext = ctx; }
1
0
0
0
Alexandre Julliard : winex11: Use the GET_DRAWABLE escape to implement wglMakeCurrent.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 7f4d3022d0f5f647bd4d9e049fadd4d8c0282235 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f4d3022d0f5f647bd4d9e049…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 27 13:58:23 2012 +0200 winex11: Use the GET_DRAWABLE escape to implement wglMakeCurrent. --- dlls/winex11.drv/opengl.c | 71 +++++++++++++++++--------------------------- 1 files changed, 28 insertions(+), 43 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index aa7faa8..9ae143e 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -631,26 +631,6 @@ static int describeContext(Wine_GLContext* ctx) { return ctx_vis_id; } -static BOOL describeDrawable( struct glx_physdev *physdev ) -{ - int tmp; - WineGLPixelFormat *fmt; - int fmt_count = 0; - - fmt = ConvertPixelFormatWGLtoGLX(gdi_display, physdev->pixel_format, TRUE /* Offscreen */, &fmt_count); - if(!fmt) return FALSE; - - TRACE(" HDC %p has:\n", physdev->dev.hdc); - TRACE(" - iPixelFormat %d\n", fmt->iPixelFormat); - TRACE(" - Drawable %lx\n", physdev->drawable); - TRACE(" - FBCONFIG_ID 0x%x\n", fmt->fmt_id); - - pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_VISUAL_ID, &tmp); - TRACE(" - VISUAL_ID 0x%x\n", tmp); - - return TRUE; -} - static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuffer* pbuf) { int nAttribs = 0; unsigned cur = 0; @@ -1584,13 +1564,13 @@ static PROC glxdrv_wglGetProcAddress(LPCSTR lpszProc) return NULL; } -static GLXPixmap get_context_pixmap( struct glx_physdev *physdev, struct wine_glcontext *ctx ) +static GLXPixmap get_context_pixmap( HDC hdc, struct wine_glcontext *ctx ) { if (!ctx->pixmap) { BITMAP bmp; - GetObjectW( GetCurrentObject( physdev->dev.hdc, OBJ_BITMAP ), sizeof(bmp), &bmp ); + GetObjectW( GetCurrentObject( hdc, OBJ_BITMAP ), sizeof(bmp), &bmp ); wine_tsx11_lock(); ctx->pixmap = XCreatePixmap( gdi_display, root_window, @@ -1610,14 +1590,13 @@ static GLXPixmap get_context_pixmap( struct glx_physdev *physdev, struct wine_gl */ static BOOL glxdrv_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) { - struct glx_physdev *physdev = get_glxdrv_dev( dev ); + HDC hdc = dev->hdc; BOOL ret; Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; Wine_GLContext *ctx = (Wine_GLContext *) hglrc; + struct x11drv_escape_get_drawable escape; - TRACE("(%p,%p)\n", dev->hdc, hglrc); - - if (!has_opengl()) return FALSE; + TRACE("(%p,%p)\n", hdc, hglrc); if (hglrc == NULL) { @@ -1627,36 +1606,42 @@ static BOOL glxdrv_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) ret = pglXMakeCurrent(gdi_display, None, NULL); wine_tsx11_unlock(); NtCurrentTeb()->glContext = NULL; + return TRUE; } - else if (!physdev->pixel_format) + + escape.code = X11DRV_GET_DRAWABLE; + if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape.code), (LPCSTR)&escape.code, + sizeof(escape), (LPSTR)&escape )) + return FALSE; + + if (!escape.pixel_format) { WARN("Trying to use an invalid drawable\n"); SetLastError(ERROR_INVALID_HANDLE); return FALSE; } - else if (ctx->fmt->iPixelFormat != physdev->pixel_format) + if (ctx->fmt->iPixelFormat != escape.pixel_format) { WARN( "mismatched pixel format hdc %p %u ctx %p %u\n", - dev->hdc, physdev->pixel_format, ctx, ctx->fmt->iPixelFormat ); + hdc, escape.pixel_format, ctx, ctx->fmt->iPixelFormat ); SetLastError( ERROR_INVALID_PIXEL_FORMAT ); return FALSE; } else { - Drawable drawable = physdev->drawable; - - if (physdev->type == DC_GL_BITMAP) drawable = get_context_pixmap( physdev, ctx ); + if (escape.gl_type == DC_GL_BITMAP) escape.drawable = get_context_pixmap( hdc, ctx ); wine_tsx11_lock(); if (TRACE_ON(wgl)) { - describeDrawable( physdev ); + int vis_id; + pglXGetFBConfigAttrib(gdi_display, ctx->fmt->fbconfig, GLX_VISUAL_ID, &vis_id); describeContext(ctx); + TRACE("hdc %p drawable %lx fmt %u vis %x ctx %p\n", hdc, + escape.drawable, escape.pixel_format, vis_id, ctx->ctx); } - TRACE(" make current for drawable %lx, ctx %p\n", drawable, ctx->ctx); - - ret = pglXMakeCurrent(gdi_display, drawable, ctx->ctx); + ret = pglXMakeCurrent(gdi_display, escape.drawable, ctx->ctx); if (ret) { @@ -1665,13 +1650,13 @@ static BOOL glxdrv_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc) ctx->has_been_current = TRUE; ctx->tid = GetCurrentThreadId(); - ctx->hdc = dev->hdc; - ctx->read_hdc = dev->hdc; - ctx->drawables[0] = drawable; - ctx->drawables[1] = drawable; + ctx->hdc = hdc; + ctx->read_hdc = hdc; + ctx->drawables[0] = escape.drawable; + ctx->drawables[1] = escape.drawable; ctx->refresh_drawables = FALSE; - if (physdev->type == DC_GL_BITMAP) pglDrawBuffer(GL_FRONT_LEFT); + if (escape.gl_type == DC_GL_BITMAP) pglDrawBuffer(GL_FRONT_LEFT); } else SetLastError(ERROR_INVALID_HANDLE); @@ -1720,8 +1705,8 @@ static BOOL glxdrv_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, if (!pglXMakeContextCurrent) return FALSE; - if (draw_physdev->type == DC_GL_BITMAP) draw_drawable = get_context_pixmap( draw_physdev, ctx ); - if (read_physdev->type == DC_GL_BITMAP) read_drawable = get_context_pixmap( read_physdev, ctx ); + if (draw_physdev->type == DC_GL_BITMAP) draw_drawable = get_context_pixmap( draw_physdev->dev.hdc, ctx ); + if (read_physdev->type == DC_GL_BITMAP) read_drawable = get_context_pixmap( read_physdev->dev.hdc, ctx ); wine_tsx11_lock(); ret = pglXMakeContextCurrent(gdi_display, draw_drawable, read_drawable, ctx->ctx);
1
0
0
0
Alexandre Julliard : winex11: Add a GET_DRAWABLE escape to mirror the SET_DRAWABLE one.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 3e8b3d0f66493ea0d75d3816c50df283c98e6480 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e8b3d0f66493ea0d75d3816c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 27 13:57:26 2012 +0200 winex11: Add a GET_DRAWABLE escape to mirror the SET_DRAWABLE one. --- dlls/winex11.drv/init.c | 8 ++++++++ dlls/winex11.drv/opengl.c | 10 ++++++++++ dlls/winex11.drv/x11drv.h | 11 +++++++++++ 3 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 46204d8..cf4d10c 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -362,6 +362,14 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d return TRUE; } break; + case X11DRV_GET_DRAWABLE: + if (out_count >= sizeof(struct x11drv_escape_get_drawable)) + { + struct x11drv_escape_get_drawable *data = out_data; + data->drawable = physDev->drawable; + return TRUE; + } + break; case X11DRV_START_EXPOSURES: wine_tsx11_lock(); XSetGraphicsExposures( gdi_display, physDev->gc, True ); diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index b49fd07..aa7faa8 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3436,6 +3436,16 @@ static INT glxdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d dev->hdc, physdev->drawable, physdev->pixel_format, physdev->type ); } break; + case X11DRV_GET_DRAWABLE: + if (out_count >= sizeof(struct x11drv_escape_get_drawable)) + { + struct x11drv_escape_get_drawable *data = out_data; + data->pixel_format = physdev->pixel_format; + data->gl_type = physdev->type; + data->gl_drawable = physdev->drawable; + data->pixmap = physdev->pixmap; + } + break; case X11DRV_FLUSH_GL_DRAWABLE: flush_gl_drawable( physdev ); return TRUE; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 1adecd8..df01379 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -289,6 +289,7 @@ extern void X11DRV_PALETTE_ComputeColorShifts(ColorShifts *shifts, unsigned long enum x11drv_escape_codes { X11DRV_SET_DRAWABLE, /* set current drawable for a DC */ + X11DRV_GET_DRAWABLE, /* get current drawable for a DC */ X11DRV_START_EXPOSURES, /* start graphics exposures */ X11DRV_END_EXPOSURES, /* end graphics exposures */ X11DRV_FLUSH_GL_DRAWABLE /* flush changes made to the gl drawable */ @@ -307,6 +308,16 @@ struct x11drv_escape_set_drawable enum dc_gl_type gl_type; /* type of GL device context */ }; +struct x11drv_escape_get_drawable +{ + enum x11drv_escape_codes code; /* escape code (X11DRV_GET_DRAWABLE) */ + Drawable drawable; /* X drawable */ + Drawable gl_drawable; /* GL drawable */ + Pixmap pixmap; /* Pixmap for a GLXPixmap gl_drawable */ + int pixel_format; /* internal GL pixel format */ + enum dc_gl_type gl_type; /* type of GL device context */ +}; + /************************************************************************** * X11 USER driver */
1
0
0
0
Alexandre Julliard : wined3d: Always load wgl functions from opengl32.dll.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 94abcd532f1ae8e69ed8f4345d11f2ba1b3cc6d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94abcd532f1ae8e69ed8f4345…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 27 14:38:58 2012 +0200 wined3d: Always load wgl functions from opengl32.dll. --- dlls/wined3d/directx.c | 28 +++++++++++----------------- dlls/wined3d/wined3d_gl.h | 7 +++++-- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 8fe7562..f576b33 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -5374,18 +5374,25 @@ static BOOL InitAdapters(struct wined3d *wined3d) TRACE("Initializing adapters\n"); if(!mod_gl) { -#ifdef USE_WIN32_OPENGL -#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn); mod_gl = LoadLibraryA("opengl32.dll"); if(!mod_gl) { ERR("Can't load opengl32.dll!\n"); goto nogl_adapter; } + } + +#ifdef USE_WIN32_OPENGL + pwglGetProcAddress = (void*)GetProcAddress(mod_gl, "wglGetProcAddress"); +#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn); #else + /* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 instead of opengl32 */ + pwglGetProcAddress = (void*)GetProcAddress(GetModuleHandleA("gdi32.dll"), "wglGetProcAddress"); #define USE_GL_FUNC(pfn) pfn = (void*)pwglGetProcAddress(#pfn); - /* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */ - mod_gl = GetModuleHandleA("gdi32.dll"); #endif + + if(!pwglGetProcAddress) { + ERR("Unable to load wglGetProcAddress!\n"); + goto nogl_adapter; } /* Load WGL core functions from opengl32.dll */ @@ -5393,11 +5400,6 @@ static BOOL InitAdapters(struct wined3d *wined3d) WGL_FUNCS_GEN; #undef USE_WGL_FUNC - if(!pwglGetProcAddress) { - ERR("Unable to load wglGetProcAddress!\n"); - goto nogl_adapter; - } - /* Dynamically load all GL core functions */ GL_FUNCS_GEN; #undef USE_GL_FUNC @@ -5408,17 +5410,9 @@ static BOOL InitAdapters(struct wined3d *wined3d) #ifdef USE_WIN32_OPENGL wglFinish = (void*)GetProcAddress(mod_gl, "glFinish"); wglFlush = (void*)GetProcAddress(mod_gl, "glFlush"); - pwglDeleteContext = (void*)GetProcAddress(mod_gl, "wglDeleteContext"); - pwglGetCurrentContext = (void*)GetProcAddress(mod_gl, "wglGetCurrentContext"); - pwglGetCurrentDC = (void*)GetProcAddress(mod_gl, "wglGetCurrentDC"); - pwglShareLists = (void*)GetProcAddress(mod_gl, "wglShareLists"); #else wglFinish = (void*)pwglGetProcAddress("wglFinish"); wglFlush = (void*)pwglGetProcAddress("wglFlush"); - pwglDeleteContext = (void*)pwglGetProcAddress("wglDeleteContext"); - pwglGetCurrentContext = (void*)pwglGetProcAddress("wglGetCurrentContext"); - pwglGetCurrentDC = (void*)pwglGetProcAddress("wglGetCurrentDC"); - pwglShareLists = (void*)pwglGetProcAddress("wglShareLists"); #endif glEnableWINE = glEnable; diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 2ffb14b..fe156d0 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -1713,8 +1713,11 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN; #define WGL_FUNCS_GEN \ USE_WGL_FUNC(wglCreateContext) \ - USE_WGL_FUNC(wglGetProcAddress) \ - USE_WGL_FUNC(wglMakeCurrent) + USE_WGL_FUNC(wglDeleteContext) \ + USE_WGL_FUNC(wglGetCurrentContext) \ + USE_WGL_FUNC(wglGetCurrentDC) \ + USE_WGL_FUNC(wglMakeCurrent) \ + USE_WGL_FUNC(wglShareLists) /* OpenGL extensions. */ enum wined3d_gl_extension
1
0
0
0
Dmitry Timoshkov : windowscodecs: Suppress libtiff warnings.
by Alexandre Julliard
28 Jun '12
28 Jun '12
Module: wine Branch: master Commit: 6207d9642cc2586394e5ae69ebeb0e9dcd8d8c2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6207d9642cc2586394e5ae69e…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Jun 27 20:33:14 2012 +0900 windowscodecs: Suppress libtiff warnings. --- dlls/windowscodecs/tiffformat.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 5351098..64e23de 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -67,6 +67,8 @@ MAKE_FUNCPTR(TIFFReadEncodedStrip); MAKE_FUNCPTR(TIFFReadEncodedTile); MAKE_FUNCPTR(TIFFSetDirectory); MAKE_FUNCPTR(TIFFSetField); +MAKE_FUNCPTR(TIFFSetWarningHandler); +MAKE_FUNCPTR(TIFFSetWarningHandlerExt); MAKE_FUNCPTR(TIFFWriteDirectory); MAKE_FUNCPTR(TIFFWriteScanline); #undef MAKE_FUNCPTR @@ -99,6 +101,8 @@ static void *load_libtiff(void) LOAD_FUNCPTR(TIFFReadEncodedTile); LOAD_FUNCPTR(TIFFSetDirectory); LOAD_FUNCPTR(TIFFSetField); + LOAD_FUNCPTR(TIFFSetWarningHandler); + LOAD_FUNCPTR(TIFFSetWarningHandlerExt); LOAD_FUNCPTR(TIFFWriteDirectory); LOAD_FUNCPTR(TIFFWriteScanline); #undef LOAD_FUNCPTR @@ -107,6 +111,9 @@ static void *load_libtiff(void) result = libtiff_handle; + pTIFFSetWarningHandler(NULL); + pTIFFSetWarningHandlerExt(NULL); + LeaveCriticalSection(&init_tiff_cs); return result; }
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
83
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
Results per page:
10
25
50
100
200