Skip to content

Commit

Permalink
Debug-Log the intercepted function before getting the spy.
Browse files Browse the repository at this point in the history
Instead of after getting the spy, since (only the first time) getting
the spy has side effects.
  • Loading branch information
pmuetschard committed Mar 30, 2019
1 parent 5f98597 commit 050dcee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapis/api/gles/templates/api_exports.cpp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ Symbol kGLESExports[] = {
{{$name := Macro "CmdName" $c}}
{{$imports := print (Title (Global "API")) "Spy::imports()"}}
EXPORT {{Template "C++.ReturnType" $c}} STDCALL {{$name}}({{Template "C++.CallParameters" $c}}) {
Spy* s = Spy::get();
GAPID_DEBUG({{Template "C++.PrintfCommandCall" $c}});
Spy* s = Spy::get();
auto spy_ctx = s->enter("{{$name}}", GlesAPI);
{{if not (IsVoid $c.Return.Type)}}auto _result_ = §{{end}}
s->{{$name}}({{Macro "C++.CallArguments" $c | Strings "spy_ctx" | JoinWith ", "}});
Expand Down

0 comments on commit 050dcee

Please sign in to comment.