Remove superfluos call to emscripten_set_canvas_size when handling sdl_resize.
This should be the other way round - sdl resize event gets triggered when emscripten_set_canvas_size is called. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5510 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
3304309867
commit
397a27fbc9
|
@ -48,7 +48,9 @@ dimension2d<u32> screenSize(640, 480);
|
|||
Handle changes in canvas size which are done with html/js.
|
||||
Note that it's only OK for windowed so far,
|
||||
the switch to fullscreen not yet working.
|
||||
*/
|
||||
Also the emscripten_get_canvas_size might cause a slow-down
|
||||
(but haven't found yet a way to avoid it with SDL1).
|
||||
*/
|
||||
void checkCanvasResize()
|
||||
{
|
||||
int w, h, fs;
|
||||
|
@ -84,7 +86,7 @@ void one_iter()
|
|||
}
|
||||
|
||||
// In case you have a resizeable canvas (resized from html)
|
||||
checkCanvasResize();
|
||||
//checkCanvasResize();
|
||||
|
||||
driver->beginScene(ECBF_COLOR | ECBF_DEPTH, SColor(255,100,101,140));
|
||||
|
||||
|
|
|
@ -587,7 +587,6 @@ bool CIrrDeviceSDL::run()
|
|||
Width = SDL_event.resize.w;
|
||||
Height = SDL_event.resize.h;
|
||||
#ifdef _IRR_EMSCRIPTEN_PLATFORM_
|
||||
emscripten_set_canvas_size( Width, Height);
|
||||
Screen = SDL_SetVideoMode( 0, 0, 32, SDL_OPENGL ); // 0,0 will use the canvas size
|
||||
#else //_IRR_EMSCRIPTEN_PLATFORM_
|
||||
Screen = SDL_SetVideoMode( Width, Height, 0, SDL_Flags );
|
||||
|
|
Loading…
Reference in New Issue