Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d721eee1
Commit
d721eee1
authored
Apr 14, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux: Cleanup failure handling when processing main definition element, use better naming.
parent
52e4c5a8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
40 deletions
+31
-40
gameexplorer.c
dlls/gameux/gameexplorer.c
+31
-40
No files found.
dlls/gameux/gameexplorer.c
View file @
d721eee1
...
...
@@ -325,67 +325,58 @@ static HRESULT GAMEUX_ProcessGameDefinitionElement(
* GameData [O] structure where data loaded from
* XML element will be stored in
*/
static
HRESULT
GAMEUX_ParseGameDefinition
(
IXMLDOMElement
*
gdElement
,
struct
GAMEUX_GAME_DATA
*
GameData
)
static
HRESULT
GAMEUX_ParseGameDefinition
(
IXMLDOMElement
*
gamedef
,
struct
GAMEUX_GAME_DATA
*
game_data
)
{
static
const
WCHAR
sGameId
[]
=
{
'g'
,
'a'
,
'm'
,
'e'
,
'I'
,
'D'
,
0
};
HRESULT
hr
=
S_OK
;
BSTR
bstrAttribute
;
VARIANT
variant
;
IXMLDOMNodeList
*
childrenList
;
IXMLDOMNode
*
nextNode
;
IXMLDOMElement
*
nextElement
;
static
const
WCHAR
gameidW
[]
=
{
'g'
,
'a'
,
'm'
,
'e'
,
'I'
,
'D'
,
0
};
IXMLDOMNodeList
*
props
;
VARIANT
var
;
HRESULT
hr
;
BSTR
attr
;
TRACE
(
"(%p, %p)
\n
"
,
g
dElement
,
GameD
ata
);
TRACE
(
"(%p, %p)
\n
"
,
g
amedef
,
game_d
ata
);
bstrAttribute
=
SysAllocString
(
sGameId
);
if
(
!
bstrAttribute
)
hr
=
E_OUTOFMEMORY
;
attr
=
SysAllocString
(
gameidW
);
if
(
!
attr
)
return
E_OUTOFMEMORY
;
hr
=
IXMLDOMElement_getAttribute
(
gdElement
,
bstrAttribute
,
&
variant
);
hr
=
IXMLDOMElement_getAttribute
(
gamedef
,
attr
,
&
var
);
SysFreeString
(
attr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
hr
=
(
GUIDFromStringW
(
V_BSTR
(
&
variant
),
&
GameData
->
guidApplicationId
)
==
TRUE
?
S_OK
:
E_FAIL
);
SysFreeString
(
V_BSTR
(
&
variant
));
hr
=
CLSIDFromString
(
V_BSTR
(
&
var
),
&
game_data
->
guidApplicationId
);
VariantClear
(
&
var
);
}
SysFreeString
(
bstrAttribute
);
if
(
SUCCEEDED
(
hr
))
hr
=
IXMLDOMElement_get_childNodes
(
gamedef
,
&
props
);
/* browse subnodes */
if
(
SUCCEEDED
(
hr
))
hr
=
IXMLDOMElement_get_childNodes
(
gdElement
,
&
childrenList
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
SUCCEEDED
(
hr
))
{
do
{
hr
=
IXMLDOMNodeList_nextNode
(
childrenList
,
&
nextNode
)
;
IXMLDOMNode
*
prop
;
if
(
hr
==
S_OK
)
hr
=
IXMLDOMNodeList_nextNode
(
props
,
&
prop
);
if
(
hr
==
S_OK
)
{
hr
=
IXMLDOMNode_QueryInterface
(
nextNode
,
&
IID_IXMLDOMElement
,
(
LPVOID
*
)
&
nextElement
);
IXMLDOMElement
*
element
;
if
(
SUCCEEDED
(
hr
))
hr
=
IXMLDOMNode_QueryInterface
(
prop
,
&
IID_IXMLDOMElement
,
(
void
**
)
&
element
);
if
(
hr
==
S_OK
)
{
hr
=
GAMEUX_ProcessGameDefinitionElement
(
nextElement
,
GameD
ata
);
IXMLDOMElement_Release
(
nextE
lement
);
hr
=
GAMEUX_ProcessGameDefinitionElement
(
element
,
game_d
ata
);
IXMLDOMElement_Release
(
e
lement
);
}
IXMLDOMNode_Release
(
nextNode
);
}
IXMLDOMNode_Release
(
prop
);
}
while
(
hr
==
S_OK
);
hr
=
S_OK
;
IXMLDOMNodeList_Release
(
childrenList
);
}
while
(
hr
==
S_OK
);
IXMLDOMNodeList_Release
(
props
);
return
hr
;
return
FAILED
(
hr
)
?
hr
:
S_OK
;
}
struct
parse_gdf_thread_param
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment