aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/gl_gen_erl.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-10-24 13:04:15 +0200
committerDan Gudmundsson <[email protected]>2016-10-24 13:04:15 +0200
commit16b6c991cc841ced6be466eca774dba1188f8640 (patch)
tree9b2d82c4e7572e45d8962e69b5c07e8d7da82873 /lib/wx/api_gen/gl_gen_erl.erl
parentf66073c2960a4b072e18c4e1dfed143b94cd60c6 (diff)
parente92d0d0c4b6991dc751dcc332e11c05d304175b6 (diff)
downloadotp-16b6c991cc841ced6be466eca774dba1188f8640.tar.gz
otp-16b6c991cc841ced6be466eca774dba1188f8640.tar.bz2
otp-16b6c991cc841ced6be466eca774dba1188f8640.zip
Merge branch 'dgud/wx/scale-factor' into maint
* dgud/wx/scale-factor: wx: Improve error handling wx: Add wxWindow:getContentScaleFactor
Diffstat (limited to 'lib/wx/api_gen/gl_gen_erl.erl')
-rw-r--r--lib/wx/api_gen/gl_gen_erl.erl14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl
index 1be8d775be..1f9407525d 100644
--- a/lib/wx/api_gen/gl_gen_erl.erl
+++ b/lib/wx/api_gen/gl_gen_erl.erl
@@ -116,7 +116,7 @@ gl_api(Fs) ->
w("call(Op, Args) ->~n", []),
w(" Port = get(opengl_port), ~n", []),
w(" _ = erlang:port_control(Port,Op,Args),~n", []),
- w(" rec().~n", []),
+ w(" rec(Op).~n", []),
w(" ~n", []),
w("%% @hidden~n", []),
w("cast(Op, Args) ->~n", []),
@@ -125,11 +125,15 @@ gl_api(Fs) ->
w(" ok.~n", []),
w(" ~n", []),
w("%% @hidden~n", []),
- w("rec() ->~n", []),
- w(" receive ~n", []),
+ w("rec(Op) ->~n", []),
+ w(" receive~n", []),
w(" {'_egl_result_', Res} -> Res;~n", []),
- w(" {'_egl_error_', Op, Res} -> error({error,Res,Op})~n", []),
- w(" end. ~n", []),
+ w(" {'_egl_error_', Op, Res} -> error({error,Res,Op});~n", []),
+ w(" {'_egl_error_', Other, Res} ->~n ", []),
+ w(" Err = io_lib:format(\"~~p in op: ~~p\", [Res, Other]),~n", []),
+ w(" error_logger:error_report([{gl, error}, {message, lists:flatten(Err)}]),~n", []),
+ w(" rec(Op)~n", []),
+ w(" end.~n", []),
w("~n", []),
w("%% @hidden~n", []),
w("send_bin(Bin) when is_binary(Bin) ->~n", []),