On Wed, Jun 7, 2023 at 10:29 AM Alon Zakai <alonza...@gmail.com> wrote:
> Yeah, this is tricky. I agree with Floh that our early ports of glfw etc. > are of limited use. Ideally they'd all be done like SDL2, that is, be in > upstream + use emscripten HTML5 C APIs as much as possible, to get > consistent input event handling etc., which is a common issue as you said, > Sam. > > Still, I'd like to remove SDL1 specifically because we do have an obvious > replacement, SDL2, which is also our best such implementation. > Although I'm normally in favor of removing stuff.. I'm not sure we have a good reason to in this case. It doesn't cost us much to maintain does it? > > - Alon > > > On Wed, Jun 7, 2023 at 9:16 AM 'Sam Clegg' via emscripten-discuss < > emscripten-discuss@googlegroups.com> wrote: > >> >> >> On Wed, Jun 7, 2023 at 5:36 AM Floh <flo...@gmail.com> wrote: >> >>> I wonder whether most of those old "portability wrappers" shouldn't be >>> deprecated tbh (SDL2 might be special because it has "official" upstream >>> support now?). >>> >>> Those wrappers were very helpful in the beginning to get things started, >>> but for instance (as far as I noticed) Dear ImGui was running into quite a >>> few confusing differences recently between Emscripten's GLFW wrapper and >>> "native" GLFW (mainly subtle things like mouse wheel input events behaving >>> differently). >>> >>> When people see Emscripten's GLFW support they probably expect that it >>> behaves identical with the "official" GLFW, but this would mean putting a >>> lot of effort into the "GLFW emulation" which should better go into the >>> "core product" (for instance more C API wrappers for web APIs). >>> >>> >> Are you suggesting that we could somehow use upstream GLFW? That seems >> unlikely since GLFW interacts so closely with input events and the >> display.. it seems like we would need a specific emscripten of that >> library. Or are you suggesting we invest in a port to emscripten in the >> upststram GLFW repo? >> >> I don't how that would prevent bugs like `mouse wheel input events >> behaving differently` since those could still conceivably occur, even in an >> upstream port simply due to the what the mouse wheel events are reported by >> the browser, no? >> >> Anyway, just my 2ct :) >>> >>> >>> >>> On Saturday, 3 June 2023 at 06:52:20 UTC+2 alon...@gmail.com wrote: >>> >>>> Hi everyone, >>>> >>>> I wonder if we still need our SDL1 (SDL 1.2, specifically) >>>> implementation at this time, given that we have excellent and stable SDL2 >>>> support? >>>> >>>> Context: SDL1 has been deprecated for many years now [1]. SDL2 is a >>>> decade old at this point [2], and other projects have removed SDL1 support >>>> (e.g. [3]). In fact, SDL is working on SDL3 now [4]. >>>> >>>> Historically, I think SDL1 was Emscripten's first supported graphics >>>> API, and that code is quite old and quirky, as I'm noticing while I'm >>>> working on WasmFS. The later SDL2 port was done in a much better way (and >>>> WasmFS, in particular, "just works" with it, unlike SDL1). So removing the >>>> weird SDL1 code could help speed up our development. >>>> >>> >>>> Is anyone using SDL1 and unable to upgrade to SDL2 (or to glfw etc.) >>>> for some reason? >>>> >>>> - Alon >>>> >>>> [1] https://github.com/libsdl-org/SDL-1.2 >>>> [2] https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer >>>> [3] >>>> https://patchwork.kernel.org/project/qemu-devel/patch/20180808104930....@redhat.com/ >>>> <https://patchwork.kernel.org/project/qemu-devel/patch/20180808104930.23133-4-berra...@redhat.com/> >>>> [4] https://discourse.libsdl.org/t/sdl-3-0/40374 >>>> >>> -- >>> 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 emscripten-discuss+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/emscripten-discuss/903c41e4-19e3-4fde-9816-312f1e7da3d4n%40googlegroups.com >>> <https://groups.google.com/d/msgid/emscripten-discuss/903c41e4-19e3-4fde-9816-312f1e7da3d4n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> 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 emscripten-discuss+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28cyxzdtfPTYJD1rCqN3OSy-qW_Mqpf2YLc6vZ2NE6MZA%40mail.gmail.com >> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28cyxzdtfPTYJD1rCqN3OSy-qW_Mqpf2YLc6vZ2NE6MZA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 emscripten-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpS41Y2rU6WoWRHb_4GZJ5o4PerPJnZpqbz7St_B48rjGg%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpS41Y2rU6WoWRHb_4GZJ5o4PerPJnZpqbz7St_B48rjGg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-rCxkKV_6%3D2eT7%2B0CtqyD26z_3nxR7CMJ_hXgUEw8zzw%40mail.gmail.com.