I'm referring to the callbacks from emscripten_set_resize_callback and emscripten_set_fullscreenchange_callback as declared in system/include/emscripten/html5.h. Those functions do I believe add listeners to those events you mentioned.
On Tuesday, February 25, 2014 6:26:55 PM UTC-8, msc wrote: > > On 2014/02/26 6:23, Joel Croteau wrote: > > Is there a good way to get the screen resolution when switching to full > screen? Calling emscripten_get_canvas_size from either the resize or > fullscreenchange callbacks seems to return the canvas size from before > going full screen. > > I don't know what resize or fullscreenchange callbacks you are referring > to. > > What I found is that you need to add you application's resize handler > function to Browser.resizeListeners. These are called (by the default > Emscripten HTML shell & JS) after the canvas has been resized. > Canvas.eventListeners are called when the canvas CSS size (clientWidth, > clientHeight) changes but before the canvas size (width, height) has been > changed. > > I guess emscripten_get_canvas_size returns canvas.width and canvas.height. > > Regards > > -Mark > -- > 注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 > 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます. > > NOTE: This electronic mail message may contain confidential and privileged > information from HI Corporation. If you are not the intended recipient, any > disclosure, photocopying, distribution or use of the contents of the > received information is prohibited. If you have received this e-mail in > error, please notify the sender immediately and permanently delete this > message and all related copies. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
